summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename the AsmPrinter directory to InstPrinter for those targets that haveJim Grosbach2010-10-011-127/+0
| | | | | | | been MC-ized for assembly printing. MSP430 is mostly so, but still has the asm printer and lowering code in the printer subdir for the moment. llvm-svn: 115360
* Clean up asm writer usage for x86 and msp430 to flag that the writer shouldJim Grosbach2010-09-301-2/+0
| | | | | | | use MC instructions in the printInstruction() method via the tablegen flag for it rather than a #define prior to including the autogenerated bits. llvm-svn: 115238
* I have manually decoded the imm field of an insertps one too manyChris Lattner2010-08-281-0/+5
| | | | | | | | | | | | | | | | | times. This patch causes llc and llvm-mc (which both default to verbose-asm) to print out comments after a few common shuffle instructions which indicates the shuffle mask, e.g.: insertps $113, %xmm3, %xmm0 ## xmm0 = zero,xmm0[1,2],xmm3[1] unpcklps %xmm1, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] pshufd $1, %xmm1, %xmm1 ## xmm1 = xmm1[1,0,0,0] This is carefully factored to keep the information extraction (of the shuffle mask) separate from the printing logic. I plan to move the extraction part out somewhere else at some point for other parts of the x86 backend that want to introspect on the behavior of shuffles. llvm-svn: 112387
* Change LEA to have 5 operands for its memory operand, justChris Lattner2010-07-081-12/+9
| | | | | | | | | | | like all other instructions, even though a segment is not allowed. This resolves a bunch of gross hacks in the encoder and makes LEA more consistent with the rest of the instruction set. No functionality change. llvm-svn: 107934
* fix an ugly wart in the MCInstPrinter api where theChris Lattner2010-04-041-2/+2
| | | | | | | | 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-041-12/+18
| | | | | | member of AsmPrinter. Instead, pass it in explicitly. llvm-svn: 100306
* Make the operand and format specifier match, and print allDan Gohman2010-02-171-1/+1
| | | | | | 64 bits, fixing a variety of problems. llvm-svn: 96421
* enhance llvm-mc -show-inst to print the enum of an instruction, like so:Chris Lattner2010-02-111-0/+5
| | | | | | | | | | testb %al, %al ## <MCInst #2412 TEST8rr ## <MCOperand Reg:2> ## <MCOperand Reg:2>> jne LBB1_7 ## <MCInst #938 JNE_1 ## <MCOperand Expr:(LBB1_7)>> llvm-svn: 95935
* Add ability for MCInstPrinters to add comments for instructions.Chris Lattner2010-02-101-0/+5
| | | | | | | | | Enhance the x86 backend to show the hex values of immediates in comments when they are large. For example: movl $1072693248, 4(%esp) ## imm = 0x3FF00000 llvm-svn: 95728
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-031-1/+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
* remove the MAI argument to MCExpr::print and switch overthing to use << when ↵Chris Lattner2010-01-181-4/+3
| | | | | | printing them. llvm-svn: 93699
* print pcrel immediates as signed values instead of unsigned so that weChris Lattner2009-12-221-3/+5
| | | | | | | | | | | | | | get things like this out of the disassembler: 0x100000ecb: callq -96 instead of: 0x100000ecb: callq 4294967200 rdar://7491123 llvm-svn: 91864
* remove strings from instructions who are never asmprinted.Chris Lattner2009-10-191-3/+1
| | | | | | | | | All of these "subreg32" modifier instructions are handled explicitly by the MCInst lowering phase. If they got to the asmprinter, they would explode. They should eventually be replace with correct use of subregs. llvm-svn: 84526
* kill off printPICLabel now, it's specialness is handled byChris Lattner2009-09-201-5/+0
| | | | | | | the MachineInstr ->MCInst lowering process, not in the asmprinter. llvm-svn: 82388
* Fix cmake build, which has a different -I thatShantonu Sen2009-09-181-1/+1
| | | | | | causes the "../foo" to not find the file llvm-svn: 82270
* This file can need access to the X86 instruction enums when the table ↵Chris Lattner2009-09-181-0/+1
| | | | | | exceeds 32-bits. llvm-svn: 82235
* Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinterChris Lattner2009-09-141-3/+5
| | | | | | be a MCInstPrinter. llvm-svn: 81746
* tidy up a bit.Chris Lattner2009-09-141-16/+8
| | | | llvm-svn: 81744
* switch the x86 asmprinters to use getRegisterName instead Chris Lattner2009-09-131-2/+1
| | | | | | | of getting it from TRI, inst printing now is codegen context free! llvm-svn: 81710
* make intel asmprinter use TRI::getAsmName instead of TRI::getName likeChris Lattner2009-09-131-3/+1
| | | | | | | all the other targets. Add support for weak/linkonce linkage so it doesn't crash on basically all nontrivial testcases. llvm-svn: 81704
* split MCInst printing out of the X86ATTInstPrinterChris Lattner2009-09-131-10/+9
| | | | | | | | class into its own X86ATTInstPrinter class. The inst printer now has just one dependence on the code generator (TRI). llvm-svn: 81703
* eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol forChris Lattner2009-09-121-5/+0
| | | | | | MBB labels like everything else. llvm-svn: 81628
* tidy upChris Lattner2009-09-091-22/+3
| | | | llvm-svn: 81304
* Thread an MCAsmInfo pointer through the various MC printing APIs, Chris Lattner2009-09-031-3/+3
| | | | | | | and fix a few things using << on MCSymbols to use ->print(). No functionality change other than unbreaking my previous patch. llvm-svn: 80890
* llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.Daniel Dunbar2009-08-311-6/+7
| | | | | | Also, use MCInst::print instead of custom code in MCAsmPrinter. llvm-svn: 80575
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-1/+1
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-1/+1
| | | | llvm-svn: 79763
* Add X86 instruction printer support for printing MCValue operands.Daniel Dunbar2009-08-141-0/+8
| | | | llvm-svn: 78984
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-3/+3
| | | | | | own struct type. llvm-svn: 78610
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-141-1/+1
| | | | | | dynamic_cast<>. llvm-svn: 75670
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* eliminate extra space.Torok Edwin2009-07-141-4/+4
| | | | llvm-svn: 75630
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-3/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-1/+1
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Start converting to new error handling API.Torok Edwin2009-07-081-1/+2
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Reimplement rip-relative addressing in the X86-64 backend. The newChris Lattner2009-06-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation primarily differs from the former in that the asmprinter doesn't make a zillion decisions about whether or not something will be RIP relative or not. Instead, those decisions are made by isel lowering and propagated through to the asm printer. To achieve this, we: 1. Represent RIP relative addresses by setting the base of the X86 addr mode to X86::RIP. 2. When ISel Lowering decides that it is safe to use RIP, it lowers to X86ISD::WrapperRIP. When it is unsafe to use RIP, it lowers to X86ISD::Wrapper as before. 3. This removes isRIPRel from X86ISelAddressMode, representing it with a basereg of RIP instead. 4. The addressing mode matching logic in isel is greatly simplified. 5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate passed through various printoperand routines is gone now. 6. The various symbol printing routines in asmprinter now no longer infer when to emit (%rip), they just print the symbol. I think this is a big improvement over the previous situation. It does have two small caveats though: 1. I implemented a horrible "no-rip" modifier for the inline asm "P" constraint modifier. This is a short term hack, there is a much better, but more involved, solution. 2. I had to xfail an -aggressive-remat testcase because it isn't handling the use of RIP in the constant-pool reading instruction. This specific test is easy to fix without -aggressive-remat, which I intend to do next. llvm-svn: 74372
* remove #if 0 codeChris Lattner2009-06-211-262/+1
| | | | llvm-svn: 73837
* remove dead code, the main codepath never has to dealChris Lattner2009-06-201-10/+0
| | | | | | with MBB's. llvm-svn: 73830
* eliminate the "call" operand modifier from the asm descriptions, modelingChris Lattner2009-06-201-4/+19
| | | | | | | it as a pcrel immediate instead. This gets pc-rel weirdness out of the main printoperand codepath. llvm-svn: 73829
* fix edit-oChris Lattner2009-06-201-1/+2
| | | | llvm-svn: 73824
* some comments and cleanupChris Lattner2009-06-201-13/+4
| | | | llvm-svn: 73818
* implement support for lowering subregs when preparing to print Chris Lattner2009-06-201-11/+20
| | | | | | | | LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes. Implement support for printing mbb labels as operands. llvm-svn: 73817
* hook up printMemReference.Chris Lattner2009-06-201-4/+2
| | | | llvm-svn: 73811
* Start implementing translation of MachineInstr to MCInst. NextChris Lattner2009-06-201-8/+348
| | | | | | | | | step is to make tblgen generate something more appropriate for MCInst, and generate calls to operand translation routines where needed. This includes a bunch of #if 0 code which will slowly be refactored into something sensible. llvm-svn: 73810
* stub out some hacky code for wiring up the new asmprinter interfacesChris Lattner2009-06-191-3/+41
| | | | | | on X86. Not useful yet. llvm-svn: 73799
* add a file I missed, this goes with r73743Chris Lattner2009-06-191-0/+22
llvm-svn: 73744
OpenPOWER on IntegriCloud