summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMCodeEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a stepEvan Cheng2011-01-131-1/+1
| | | | | | | | in the right direction. It eliminated some hacks and will unblock codegen work. But it's far from being done. It doesn't reject illegal expressions, e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all. llvm-svn: 123369
* Add support for MC-ized encoding of tLEApcrel and tLEApcrelJT. rdar://8755755Jim Grosbach2010-12-141-0/+2
| | | | llvm-svn: 121798
* The tLDR et al instructions were emitting either a reg/reg or reg/immBill Wendling2010-12-141-1/+3
| | | | | | | | | | | | | | | | instruction based on the t_addrmode_s# mode and what it returned. There is some obvious badness to this. In particular, it's hard to do MC-encoding when the instruction may change out from underneath you after the t_addrmode_s# variable is finally resolved. The solution is to revert a long-ago change that merged the reg/reg and reg/imm versions. There is the addition of several new addressing modes. They no longer have extraneous operands associated with them. I.e., if it's reg/reg we don't have to have a dummy zero immediate tacked on to the SDNode. There are some obvious cleanups here, which will happen shortly. llvm-svn: 121747
* Second attempt at make Thumb2 LEAs pseudos. This time, perform the lowering ↵Owen Anderson2010-12-141-0/+2
| | | | | | | | much later, which makes the entire process cleaner. llvm-svn: 121735
* Revert r121721, which broke buildbots.Owen Anderson2010-12-131-2/+0
| | | | llvm-svn: 121726
* Make Thumb2 LEA-like instruction into pseudos, which map down to ADR. ↵Owen Anderson2010-12-131-0/+2
| | | | | | | | Provide correct fixups for Thumb2 ADR, which is _of course_ different from ARM ADR fixups, or any other Thumb2 fixup. llvm-svn: 121721
* In Thumb2, direct branches can be encoded as either a "short" conditional ↵Owen Anderson2010-12-131-0/+2
| | | | | | | | | | branch with a null predicate, or as a "long" direct branch. While the mnemonics are the same, they encode the branch offset differently, and the Darwin assembler appears to prefer the "long" form for direct branches. Thus, in the name of bitwise equivalence, provide encoding and fixup support for it. llvm-svn: 121710
* Fix encoding of Thumb1 LDRB and STRB.Owen Anderson2010-12-101-0/+2
| | | | llvm-svn: 121581
* Thumb unconditional branch binary encoding. rdar://8754994Jim Grosbach2010-12-101-0/+2
| | | | llvm-svn: 121496
* Thumb conditional branch binary encodings. rdar://8745367Jim Grosbach2010-12-101-0/+2
| | | | llvm-svn: 121493
* Thumb ldr reg+imm offsets were encoded incorrectly. The scaling factor of theBill Wendling2010-12-091-5/+1
| | | | | | | t_addrmode_s# address modes is used for ASM printing, not for encoding. <rdar://problem/8745375> llvm-svn: 121417
* Rename the encoder method for t_cbtarget to match.Jim Grosbach2010-12-091-1/+1
| | | | llvm-svn: 121399
* The BLX instruction is encoded differently than the BL, because why not? InBill Wendling2010-12-091-0/+2
| | | | | | | | | | particular, the immediate has 20-bits of value instead of 21. And bit 0 is '0' always. Going through the BL fixup encoding was trashing the "bit 0 is '0'" invariant. Attempt to get the encoding at slightly more correct with this. llvm-svn: 121336
* Support the "target" encodings for the CB[N]Z instructions.Bill Wendling2010-12-081-0/+2
| | | | llvm-svn: 121308
* Add support for loading from a constant pool.Bill Wendling2010-12-081-0/+2
| | | | llvm-svn: 121226
* Binary encoding for ARM tLDRspi and tSTRspi.Jim Grosbach2010-12-071-0/+2
| | | | llvm-svn: 121186
* Add fixup for Thumb1 BL/BLX instructions.Jim Grosbach2010-12-061-0/+2
| | | | llvm-svn: 121072
* Add a post encoder method to the VFP instructions to convert them to the Thumb2Bill Wendling2010-12-011-0/+2
| | | | | | encoding if we're in that mode. llvm-svn: 120608
* Refactor LEApcrelJT as a pseudo-instructionlowered to a cannonical ADRJim Grosbach2010-12-011-0/+2
| | | | | | | instruction at MC lowering. Add binary encoding information for the ADR, including fixup data for the label operand. llvm-svn: 120594
* Add correct encodings for STRD and LDRD, including fixup support. ↵Owen Anderson2010-12-011-0/+2
| | | | | | Additionally, update these to unified syntax. llvm-svn: 120589
* * Add support for encoding t_addrmode_s2 and t_addrmode_s1. They are the same asBill Wendling2010-11-301-0/+4
| | | | | | | | | | t_addrmode_s4, but with a different scaling factor. * Encode the Thumb1 load and store instructions. This involved a bit of refactoring (hi, Chris! :-). Some of the patterns became dead afterwards and were removed. llvm-svn: 120482
* Add encoding support for Thumb2 PLD and PLI instructions.Owen Anderson2010-11-301-0/+2
| | | | llvm-svn: 120449
* Add parsing for the Thumb t_addrmode_s4 addressing mode. This can almostBill Wendling2010-11-301-2/+4
| | | | | | | | | | certainly be made more generic. But it does allow us to parse something like: ldr r3, [r2, r4] correctly in Thumb mode. llvm-svn: 120408
* Rename BX/BRIND/etc patterns to clarify which is actually the BX instructionJim Grosbach2010-11-301-4/+4
| | | | | | and which are pseudos. llvm-svn: 120366
* Correct Thumb2 encodings for a much wider range of loads and stores.Owen Anderson2010-11-301-0/+2
| | | | llvm-svn: 120364
* Fix the encoding of VLD4-dup alignment.Bob Wilson2010-11-301-0/+2
| | | | | | | | The only reasonable way I could find to do this is to provide an alternate version of the addrmode6 operand with a different encoding function. Use it for all the VLD-dup instructions for the sake of consistency. llvm-svn: 120358
* Provide Thumb2 encodings for basic loads and stores.Owen Anderson2010-11-291-0/+6
| | | | llvm-svn: 120340
* Have the getAddrMode3OpValue() function in ARMCodeEmitter.cpp produce the sameBill Wendling2010-11-201-9/+21
| | | | | | value that the one in ARMMCCodeEmitter.cpp does. llvm-svn: 119878
* Minor cleanups to a few llvm_unreachable() calls.Jim Grosbach2010-11-191-6/+2
| | | | llvm-svn: 119767
* Fix .o emission of ARM movt/movw. MCSymbolRefExpr::VK_ARM_(HI||LO)16 for the ↵Jason W Kim2010-11-181-0/+5
| | | | | | | | | .o path now works for ARM. Note: lo16AllZero remains in ARMInstrInfo.td - It can be factored out when Thumb movt is repaired. Existing tests cover this update. llvm-svn: 119760
* Clean up LEApcrel instuction(s) a bit. It's not really a Pseudo, so don't markJim Grosbach2010-11-171-0/+8
| | | | | | it as such. Add some encoding information. llvm-svn: 119588
* Fix comment typo.Jim Grosbach2010-11-171-1/+1
| | | | llvm-svn: 119573
* The machine instruction no longer encodes the submode as a separate operand. WeBill Wendling2010-11-171-4/+4
| | | | | | should get the submode from the load/store multiple instruction's opcode. llvm-svn: 119461
* ARM LDR_PRE/LDR_POST/STR_PRE/STR_POST (and the *B counterparts) binary encoding.Jim Grosbach2010-11-151-0/+4
| | | | llvm-svn: 119180
* Eliminate ARM::MOVi2pieces. Just use MOVi32imm and expand it to either ↵Evan Cheng2010-11-121-5/+5
| | | | | | movi+orr or movw+movt depending on the subtarget. llvm-svn: 118938
* First stab at providing correct Thumb2 encodings, start with adc.Owen Anderson2010-11-121-0/+4
| | | | llvm-svn: 118924
* Fill out support for Thumb2 encodings of NEON instructions.Owen Anderson2010-11-111-0/+2
| | | | llvm-svn: 118854
* Add correct Thumb2 encodings for NEON vst[1,2,3,4] and vld[1,2,3,4].Owen Anderson2010-11-111-0/+2
| | | | llvm-svn: 118843
* Add support for Thumb2 encodings of NEON data processing instructions, using ↵Owen Anderson2010-11-111-0/+2
| | | | | | | | the new PostEncoderMethod infrastructure. More tests to come. llvm-svn: 118819
* Encoding of destination fixup for ARM branch and conditional branchJim Grosbach2010-11-111-0/+2
| | | | | | instructions. llvm-svn: 118801
* Encoding for ARM LDRSH_POST.Jim Grosbach2010-11-111-0/+2
| | | | llvm-svn: 118794
* ARM STRH encoding information.Jim Grosbach2010-11-111-0/+2
| | | | llvm-svn: 118757
* ARM LDM encoding for the mode (ia, ib, da, db) operand.Jim Grosbach2010-11-101-0/+2
| | | | llvm-svn: 118736
* Add encoder method for ARM load/store shifted register offset operands.Jim Grosbach2010-11-091-0/+2
| | | | llvm-svn: 118513
* The MC code couldn't handle ARM LDR instructions with negative offsets:Bill Wendling2010-11-031-11/+30
| | | | | | | | | | | | vldr.64 d1, [r0, #-32] The problem was with how the addressing mode 5 encodes the offsets. This change makes sure that the way offsets are handled in addressing mode 5 is consistent throughout the MC code. It involves re-refactoring the "getAddrModeImmOpValue" method into an "Imm12" and "addressing mode 5" version. But not to worry! The majority of the duplicated code has been unified. llvm-svn: 118144
* Rename getAddrModeImm12OpValue to getAddrModeImmOpValue and expand it to workBill Wendling2010-11-021-19/+20
| | | | | | | | with immediates up to 16-bits in size. The same logic is applied to other LDR encodings, e.g. VLDR, but which use a different immediate bit width (8-bits in VLDR's case). Removing the "12" allows it to be more generic. llvm-svn: 118094
* Rename encoder methods to match naming convention.Owen Anderson2010-11-021-5/+2
| | | | llvm-svn: 118093
* Add correct NEON encodings for vld2, vld3, and vld4 basic variants.Owen Anderson2010-11-021-0/+3
| | | | llvm-svn: 117997
* Add correct NEON encodings for the "multiple single elements" form of vld.Owen Anderson2010-11-021-1/+4
| | | | llvm-svn: 117984
* Encode the register list operands for ARM mode LDM/STM instructions.Jim Grosbach2010-10-301-0/+3
| | | | llvm-svn: 117753
OpenPOWER on IntegriCloud