summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More refactoring.Evan Cheng2011-07-251-1055/+0
| | | | llvm-svn: 135939
* Refactor X86 target to separate MC code from Target code.Evan Cheng2011-07-251-20/+29
| | | | llvm-svn: 135930
* Extend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.Eli Friedman2011-07-201-1/+3
| | | | llvm-svn: 135607
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-181-1/+1
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* Next round of MC refactoring. This patch factor MC table instantiations, MCEvan Cheng2011-07-141-3/+0
| | | | | | registeration and creation code into XXXMCDesc libraries. llvm-svn: 135184
* - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfoEvan Cheng2011-07-111-21/+24
| | | | | | | | | | | | and MCSubtargetInfo. - Added methods to update subtarget features (used when targets automatically detect subtarget features or switch modes). - Teach X86Subtarget to update MCSubtargetInfo features bits since the MCSubtargetInfo layer can be shared with other modules. - These fixes .code 16 / .code 32 support since mode switch is updated in MCSubtargetInfo so MC code emitter can do the right thing. llvm-svn: 134884
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-281-9/+9
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* ADD64ri32 sign extends its argument, so we need to use a R_X86_64_32S.Rafael Espindola2011-05-191-1/+2
| | | | | | | | Fixes PR9934. We really need to start tblgening the relocation info :-( llvm-svn: 131669
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Add support for the VIA PadLock instructions.Joerg Sonnenberger2011-04-041-0/+10
| | | | llvm-svn: 128826
* Expand Op0Mask by one bit in preparation for the PadLock prefixes.Joerg Sonnenberger2011-04-041-9/+9
| | | | | | | | Define most shift masks incrementally to reduce the redundant hard-coding. Introduce new shift for the VEX flags to replace the magic constant 32 in various places. llvm-svn: 128822
* Implement xgetbv and xsetbv.Rafael Espindola2011-02-221-0/+8
| | | | | | Patch by Jai Menon. llvm-svn: 126165
* Make pushq produce signed relocations.Rafael Espindola2010-12-161-1/+4
| | | | llvm-svn: 122005
* MC: Move target specific fixup info descriptors to TargetAsmBackend instead ofDaniel Dunbar2010-12-161-20/+0
| | | | | | | the MCCodeEmitter, which seems like a better organization. - Also, cleaned up some magic constants while in the area. llvm-svn: 121953
* Define generic 1, 2 and 4 byte pc relative relocations. They are commonRafael Espindola2010-11-281-16/+7
| | | | | | and at least the 4 byte one will be needed to implement the .cfi_* directives. llvm-svn: 120240
* Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.Rafael Espindola2010-11-231-8/+12
| | | | llvm-svn: 120006
* add fields to the .td files unconditionally, simplifying tblgen a bit.Chris Lattner2010-11-151-1/+1
| | | | | | Switch the ARM backend to use 'let' instead of 'set' with this change. llvm-svn: 119120
* Add X86::reloc_global_offset_table and use it to have a single place whereRafael Espindola2010-10-241-5/+6
| | | | | | we check for _GLOBAL_OFFSET_TABLE_. llvm-svn: 117241
* Handle _GLOBAL_OFFSET_TABLE_ correctly.Rafael Espindola2010-10-201-0/+27
| | | | llvm-svn: 116932
* Remove the x86 MOV{32,64}{rr,rm,mr}_TC instructions.Jakob Stoklund Olesen2010-10-121-2/+1
| | | | | | | | | | | The reg-reg copies were no longer being generated since copyPhysReg copies physical registers only. The loads and stores are not necessary - The TC constraint is imposed by the TAILJMP and TCRETURN instructions, there should be no need for constrained loads and stores. llvm-svn: 116314
* Implement support for the bizarre 3DNow! encoding (which is unlike anythingChris Lattner2010-10-031-0/+9
| | | | | | | | | | | else in X86), and add support for pavgusb. This is apparently the only instruction (other than movsx) that is preventing ffmpeg from building with clang. If someone else is interested in banging out the rest of the 3DNow! instructions, it should be quite easy now. llvm-svn: 115466
* Correctly produce R_X86_64_32 or R_X86_64_32S.Rafael Espindola2010-09-301-6/+15
| | | | | | | | | | | | | With this patch in movq $foo, foo(%rip) foo: .long foo We produce a R_X86_64_32S for the first relocation and R_X86_64_32 for the second one. llvm-svn: 115134
* Add parens to fix GCC warning:Nick Lewycky2010-09-291-2/+2
| | | | | | lib/Target/X86/X86MCCodeEmitter.cpp: 190: error: suggest parentheses around '&&' within '||' llvm-svn: 115064
* make the x86 mccode emitter emit the 0x67 and 0x66 prefix bytes in the sameChris Lattner2010-09-291-4/+4
| | | | | | order as cctools for diffability. llvm-svn: 115022
* implement support for 32-bit address operands in 64-bit mode, which Chris Lattner2010-09-291-5/+18
| | | | | | are defined to emit the 0x67 prefix byte. rdar://8482675 llvm-svn: 115021
* fix rdar://8444631 - encoder crash on 'enter'Chris Lattner2010-09-171-0/+7
| | | | | | What a weird instruction. llvm-svn: 114190
* Fix PR7748 without using microsoft extensionsBruno Cardoso Lopes2010-08-261-7/+7
| | | | llvm-svn: 112128
* fix PR7465, mishandling of lcall and ljmp: intersegment long Chris Lattner2010-08-191-0/+8
| | | | | | call and jumps. llvm-svn: 111496
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-151-3/+2
| | | | llvm-svn: 111102
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-141-2/+3
| | | | llvm-svn: 111082
* Add AVX only vzeroall and vzeroupper instructionsBruno Cardoso Lopes2010-07-211-2/+4
| | | | llvm-svn: 109002
* Add new AVX vmaskmov instructions, and also fix the VEX encoding bits to ↵Bruno Cardoso Lopes2010-07-211-9/+20
| | | | | | support it llvm-svn: 108983
* AVX 256-bit conversion instructionsBruno Cardoso Lopes2010-07-131-0/+3
| | | | | | Add the x86 VEX_L form to handle special cases where VEX_L must be set. llvm-svn: 108274
* Start the support for AVX instructions with 256-bit %ymm registers. A couple ofBruno Cardoso Lopes2010-07-091-1/+11
| | | | | | | | | | | | | | | notes: - The instructions are being added with dummy placeholder patterns using some 256 specifiers, this is not meant to work now, but since there are some multiclasses generic enough to accept them, when we go for codegen, the stuff will be already there. - Add VEX encoding bits to support YMM - Add MOVUPS and MOVAPS in the first round - Use "Y" as suffix for those Instructions: MOVUPSYrr, ... - All AVX instructions in X86InstrSSE.td will move soon to a new X86InstrAVX file. llvm-svn: 107996
* Merge VEX enums with other x86 enum forms. Also fix all checks of which VEXBruno Cardoso Lopes2010-07-091-6/+6
| | | | | | fields to use. llvm-svn: 107952
* Factor out x86 segment override prefix encoding, and also use it for VEXBruno Cardoso Lopes2010-07-091-18/+33
| | | | llvm-svn: 107942
* reject pseudo instructions early in the encoder.Chris Lattner2010-07-091-10/+5
| | | | llvm-svn: 107939
* Remove trailing whitespaces from fileBruno Cardoso Lopes2010-07-091-66/+66
| | | | llvm-svn: 107937
* Change LEA to have 5 operands for its memory operand, justChris Lattner2010-07-081-9/+1
| | | | | | | | | | | 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
* add some long-overdue enums to refer to the parts of the 5-operandChris Lattner2010-07-081-7/+7
| | | | | | X86 memory operand. llvm-svn: 107925
* Rework segment prefix emission code to handle segmentsChris Lattner2010-07-081-47/+41
| | | | | | | | | | | | in memory operands at the same type as hard coded segments. This fixes problems where we'd emit the segment override after the REX prefix on instructions like: mov %gs:(%rdi), %rax This fixes rdar://8127102. I have several cleanup patches coming next. llvm-svn: 107917
* finish up support for callw: PR7195Chris Lattner2010-07-071-1/+1
| | | | llvm-svn: 107826
* Implement the major chunk of PR7195: support for 'callw'Chris Lattner2010-07-071-2/+5
| | | | | | | in the integrated assembler. Still some discussion to be done. llvm-svn: 107825
* Fix comment from previous patchBruno Cardoso Lopes2010-07-061-1/+1
| | | | llvm-svn: 107717
* Add AVX vblendvpd, vblendvps and vpblendvb instructionsBruno Cardoso Lopes2010-07-061-5/+23
| | | | | | Update VEX encoding to support those new instructions llvm-svn: 107715
* indentationChris Lattner2010-07-041-2/+3
| | | | llvm-svn: 107599
* - Add support for the rest of AVX SSE3 instructionsBruno Cardoso Lopes2010-07-021-1/+1
| | | | | | | - Fix VEX prefix to be emitted with 3 bytes whenever VEX_5M represents a REX equivalent two byte leading opcode llvm-svn: 107523
* - Add AVX SSE2 Move doubleword and quadword instructions.Bruno Cardoso Lopes2010-07-011-5/+13
| | | | | | | | - Add encode bits for VEX_W - All 128-bit SSE 1 & SSE2 instructions that are described in the .td file now have a AVX encoded form already working. llvm-svn: 107365
* - Add AVX form of all SSE2 logical instructionsBruno Cardoso Lopes2010-06-301-22/+37
| | | | | | - Add VEX encoding bits to x86 MRM0r-MRM7r llvm-svn: 107238
* Add AVX ld/st XCSR register.Bruno Cardoso Lopes2010-06-291-5/+7
| | | | | | Add VEX encoding bits for MRMXm x86 form llvm-svn: 107204
OpenPOWER on IntegriCloud