summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace r101053 with a fix for getSOImmValRotate() so that it will correctlyBob Wilson2010-04-131-1/+1
| | | | | | | recognize all the valid rotated immediates. This fixes the disassembler issue and will also help codegen for some unusual constant values. llvm-svn: 101114
* Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after callingJohnny Chen2010-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM_AM::getSoImmVal(V) with a legitimate so_imm value: #245 rotate right by 2. Introduce ARM_AM::getSOImmValOneOrNoRotate(unsigned Arg) which is called from ARMInstPrinter.cpp's printSOImm() function, replacing ARM_AM::getSOImmVal(V). [12:44:43] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ gdb Debug/bin/llvm-mc GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done (gdb) set args -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble (gdb) r Starting program: /Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble Reading symbols for shared libraries ++. done 0xf5 0x71 0xf0 0x53 Opcode=201 Name=MVNi Format=ARM_FORMAT_DPFRM(4) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------------------------------- | 0: 1: 0: 1| 0: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 1: 1| 0: 0: 0: 1| 1: 1: 1: 1| 0: 1: 0: 1| ------------------------------------------------------------------------------------------------- mvnpls r7, Assertion failed: (V != -1 && "Not a valid so_imm value!"), function printSOImm, file ARMInstPrinter.cpp, line 229. Program received signal SIGABRT, Aborted. 0x00007fff88c65886 in __kill () (gdb) bt #0 0x00007fff88c65886 in __kill () #1 0x00007fff88d05eae in abort () #2 0x00007fff88cf2ef0 in __assert_rtn () #3 0x000000010020e422 in printSOImm (O=@0x1010bdf80, V=-1, VerboseAsm=false, MAI=0x1020106d0) at ARMInstPrinter.cpp:229 #4 0x000000010020e5fe in llvm::ARMInstPrinter::printSOImmOperand (this=0x1020107e0, MI=0x7fff5fbfee70, OpNum=1, O=@0x1010bdf80) at ARMInstPrinter.cpp:254 #5 0x00000001001ffbc0 in llvm::ARMInstPrinter::printInstruction (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMGenAsmWriter.inc:3236 #6 0x000000010020c27c in llvm::ARMInstPrinter::printInst (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMInstPrinter.cpp:182 #7 0x000000010003cbff in PrintInsts (DisAsm=@0x10200f4e0, Printer=@0x1020107e0, Bytes=@0x7fff5fbff060, SM=@0x7fff5fbff078) at Disassembler.cpp:65 #8 0x000000010003c8b4 in llvm::Disassembler::disassemble (T=@0x1010c13c0, Triple=@0x1010b6798, Buffer=@0x102010690) at Disassembler.cpp:153 #9 0x000000010004095c in DisassembleInput (ProgName=0x7fff5fbff3f0 "/Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc") at llvm-mc.cpp:347 #10 0x000000010003eefb in main (argc=4, argv=0x7fff5fbff298) at llvm-mc.cpp:374 (gdb) q The program is running. Exit anyway? (y or n) y [13:36:26] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ llvm-svn: 101053
* remove the TargetLoweringObjectFileMachO::getMachoSectionChris Lattner2010-04-081-6/+6
| | | | | | api and update clients to use MCContext instead. llvm-svn: 100808
* don't use emitlabel in the arm asm printer yet, the order Chris Lattner2010-04-051-2/+7
| | | | | | | isn't well specified. ARM really needs to have its instprinter finished at some point. llvm-svn: 100439
* fix a couple problems I introduced handling symbolsChris Lattner2010-04-051-4/+10
| | | | | | with spaces in them. Sym->getName() != OS << *Sym llvm-svn: 100434
* just have all targets create the DwarfWriter.Chris Lattner2010-04-051-6/+0
| | | | llvm-svn: 100377
* simplify various getAnalysisUsage implementations.Chris Lattner2010-04-051-2/+0
| | | | llvm-svn: 100376
* clean up the asmprinter header and privatize some stuff.Chris Lattner2010-04-041-5/+5
| | | | llvm-svn: 100342
* remove TargetMachine.h #include, also, TRI isn't used frequently Chris Lattner2010-04-041-4/+5
| | | | | | enough to warrant caching in AsmPrinter, so remove it. llvm-svn: 100336
* Momentous day: remove the "O" member from AsmPrinter. Now all Chris Lattner2010-04-041-6/+3
| | | | | | | | | | "asm printering" happens through MCStreamer. This also Streamerizes PIC16 debug info, which escaped my attention. This removes a leak from LLVMTargetMachine of the 'legacy' output stream. llvm-svn: 100327
* mcize a bunch more stuff, using EmitRawText for things weChris Lattner2010-04-041-26/+38
| | | | | | don't have mcstreamer support for yet. llvm-svn: 100319
* convert the non-MCInstPrinter'ized EmitInstruction Chris Lattner2010-04-041-14/+14
| | | | | | | implementations to use EmitRawText instead of writing directly to "O". llvm-svn: 100318
* fix PrintAsmOperand and PrintAsmMemoryOperand to pass down Chris Lattner2010-04-041-4/+7
| | | | | | raw_ostream to print to. llvm-svn: 100313
* fix an ugly wart in the MCInstPrinter api where theChris Lattner2010-04-043-7/+6
| | | | | | | | raw_ostream to print an instruction to had to be specified at MCInstPrinter construction time instead of being able to pick at each call to printInstruction. llvm-svn: 100307
* change a ton of code to not implicitly use the "O" raw_ostreamChris Lattner2010-04-043-218/+349
| | | | | | member of AsmPrinter. Instead, pass it in explicitly. llvm-svn: 100306
* asmstreamerize the .size directive for function bodies, force clientsChris Lattner2010-04-031-1/+1
| | | | | | of printOffset to pass in a stream to print to. llvm-svn: 100296
* Comment the changes for r98218 and friends inside the source code.Bill Wendling2010-03-311-0/+5
| | | | llvm-svn: 100031
* Rip out the 'is temporary' nonsense from the MCContext interface toChris Lattner2010-03-302-5/+5
| | | | | | | | | create symbols. It is extremely error prone and a source of a lot of the remaining integrated assembler bugs on x86-64. This fixes rdar://7807601. llvm-svn: 99902
* Re-commit r98683 ("remove redundant writeback flag from ARM address mode 6")Bob Wilson2010-03-203-19/+25
| | | | | | | with changes to add a separate optional register update argument. Change all the NEON instructions with address register writeback to use it. llvm-svn: 99095
* Fix -Asserts warnings.Daniel Dunbar2010-03-191-5/+4
| | | | llvm-svn: 98928
* Refines 98745 so that it only contains the patch related to the output of theJohnny Chen2010-03-171-12/+1
| | | | | | | | | addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. This patch removes the impl of printT2AddrModeImm8s4OffsetOperand() from ARMAsmPrinter.cpp. It is used by disassembler as of now. llvm-svn: 98774
* Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrmJohnny Chen2010-03-173-55/+458
| | | | | | | | | | | | | instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] llvm-svn: 98745
* Revert 98683. It is breaking something in the disassembler.Bob Wilson2010-03-162-7/+20
| | | | llvm-svn: 98692
* Remove redundant writeback flag from ARM address mode 6. Also remove theBob Wilson2010-03-162-20/+7
| | | | | | | optional register update argument, which is currently unused -- when we add support for that, it can just be a separate operand. llvm-svn: 98683
* Remove redundant writeback flag in ARM addressing mode 5.Bob Wilson2010-03-162-4/+0
| | | | llvm-svn: 98648
* Remove the writeback flag from ARM's address mode 4. Now that we have separateBob Wilson2010-03-162-4/+0
| | | | | | instructions for ld/st with writeback, the flag is completely redundant. llvm-svn: 98643
* Fix unused variable warnings.Bob Wilson2010-03-162-2/+0
| | | | llvm-svn: 98642
* --- Reverse-merging r98637 into '.':Bob Wilson2010-03-163-464/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U test/CodeGen/ARM/tls2.ll U test/CodeGen/ARM/arm-negative-stride.ll U test/CodeGen/ARM/2009-10-30.ll U test/CodeGen/ARM/globals.ll U test/CodeGen/ARM/str_pre-2.ll U test/CodeGen/ARM/ldrd.ll U test/CodeGen/ARM/2009-10-27-double-align.ll U test/CodeGen/Thumb2/thumb2-strb.ll U test/CodeGen/Thumb2/ldr-str-imm12.ll U test/CodeGen/Thumb2/thumb2-strh.ll U test/CodeGen/Thumb2/thumb2-ldr.ll U test/CodeGen/Thumb2/thumb2-str_pre.ll U test/CodeGen/Thumb2/thumb2-str.ll U test/CodeGen/Thumb2/thumb2-ldrh.ll U utils/TableGen/TableGen.cpp U utils/TableGen/DisassemblerEmitter.cpp D utils/TableGen/RISCDisassemblerEmitter.h D utils/TableGen/RISCDisassemblerEmitter.cpp U Makefile.rules U lib/Target/ARM/ARMInstrNEON.td U lib/Target/ARM/Makefile U lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMInstPrinter.h D lib/Target/ARM/Disassembler U lib/Target/ARM/ARMInstrFormats.td U lib/Target/ARM/ARMAddressingModes.h U lib/Target/ARM/Thumb2ITBlockPass.cpp llvm-svn: 98640
* Initial ARM/Thumb disassembler check-in. It consists of a tablgen backendJohnny Chen2010-03-163-55/+464
| | | | | | | | | | | | | | | | | | (RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] llvm-svn: 98637
* Stop using the old pre-UAL syntax for LDM/STM instruction suffixes.Bob Wilson2010-03-162-20/+2
| | | | | | | This does not move entirely to UAL syntax, since the default "increment after" suffix is empty but we still use "IA" for that. llvm-svn: 98635
* eliminate the now-unneeded context argument of MBB::getSymbol()Chris Lattner2010-03-132-7/+7
| | | | llvm-svn: 98451
* rearrange MCContext ownership. Before LLVMTargetMachine created it Chris Lattner2010-03-131-3/+2
| | | | | | | | | | | and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450
* Change ARM ld/st multiple instructions to have variant instructions forBob Wilson2010-03-131-3/+4
| | | | | | | | | | | | | | | writebacks to the address register. This gets rid of the hack that the first register on the list was the magic writeback register operand. There was an implicit constraint that if that operand was not reg0 it had to match the base register operand. The post-RA scheduler's antidependency breaker did not understand that constraint and sometimes changed one without the other. This also fixes Radar 7495976 and should help the verifier work better for ARM code. There are now new ld/st instructions explicit writeback operands and explicit constraints that tie those registers together. llvm-svn: 98409
* Fix LLVM build when the user specifies CPPFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | llvm-svn: 98394
* inline GetGlobalValueSymbol into the rest its callers andChris Lattner2010-03-122-4/+6
| | | | | | remove it. llvm-svn: 98390
* When outputing a non-lazy pointer for a stub, we may need to fill in the valueBill Wendling2010-03-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | for the NLP because the object it's pointing to may be internal to the file. This seems counter-intuitive, but bear with me. When we place the LSDA into the TEXT section, the type info pointers need to be indirect and pc-rel. We accomplish this by using NLPs. However, sometimes the types are local to the file. GCC gets around this by not using a NLP in this case, but a "regular" indirection like this: GCC_except_tbl: .long Lfoo-. __ZTIA: @ This is local ... Lfoo: .long __ZTIA LLVM prefers NLPs on Darwin. In fact, it's more optimal for load performance to use them. llvm-svn: 98218
* Added Thumb2 LDRD/STRD pre/post variants for disassembly only.Johnny Chen2010-03-112-0/+2
| | | | | | Plus fixed the encoding of t2LDRDpci such that P = 1 and W = 0 (offset mode). llvm-svn: 98217
* Add a bit along with the MCSymbols stored in the MachineModuleInfo maps thatBill Wendling2010-03-101-7/+9
| | | | | | | | indicates that an MCSymbol is external or not. (It's true if it's external.) This will be used to specify the correct information to add to non-lazy pointers. That will be explained further when this bit is used. llvm-svn: 98199
* Factored out the disassembly printing of CPS option, MSR mask, and Negative ZeroJohnny Chen2010-03-102-1/+7
| | | | | | | operands into their own PrintMethod, in order not to pollute the printOperand() impl with disassembly only Imm modifiers. llvm-svn: 98172
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-102-5/+5
| | | | llvm-svn: 98124
* Print blank line and clear stubs vector.Bill Wendling2010-03-091-2/+13
| | | | llvm-svn: 98019
* MC-ize the stub printing in ARM.Bill Wendling2010-03-091-4/+17
| | | | llvm-svn: 98018
* AL is an optional mnemonic extension for always, except in IT instructions.Johnny Chen2010-03-023-0/+14
| | | | | | | Add printMandatoryPredicateOperand() PrintMethod for IT predicate printing. Ref: A8.3 Conditional execution llvm-svn: 97571
* Move TLOF implementations to libCodegen to resolve layering violation.Anton Korobeynikov2010-02-151-1/+1
| | | | llvm-svn: 96288
* print all the newlines at the end of instructions withChris Lattner2010-02-101-3/+3
| | | | | | OutStreamer.AddBlankLine instead of textually. llvm-svn: 95734
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-031-1/+1
| | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. llvm-svn: 95205
* print instructions through the mcstreamer.Chris Lattner2010-02-031-13/+6
| | | | llvm-svn: 95181
* rejigger the world so that EmitInstruction prints the \n atChris Lattner2010-02-031-0/+1
| | | | | | | | the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. llvm-svn: 95178
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-032-15/+0
| | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. llvm-svn: 95177
* refactor code so that LLVMTargetMachine creates the asmstreamer and Chris Lattner2010-02-021-2/+3
| | | | | | | mccontext instead of having AsmPrinter do it. This allows other types of MCStreamer's to be passed in. llvm-svn: 95155
OpenPOWER on IntegriCloud