Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | MC: Move target specific fixup info descriptors to TargetAsmBackend instead of | Daniel Dunbar | 2010-12-16 | 1 | -39/+0 |
| | | | | | | | the MCCodeEmitter, which seems like a better organization. - Also, cleaned up some magic constants while in the area. llvm-svn: 121953 | ||||
* | Delete an extra "Imm5 = ", caught by GCC's -Wsequence-point but not by Clang | Matt Beaumont-Gay | 2010-12-16 | 1 | -1/+1 |
| | | | | | | (see PR4579). llvm-svn: 121939 | ||||
* | Remove fixup_arm_thumb_ldst. The code was never calling the "fixup" stuff for | Bill Wendling | 2010-12-16 | 1 | -11/+1 |
| | | | | | | it. I.e., it was always an immediate value. llvm-svn: 121932 | ||||
* | If we're changing the frame register to a physical register other than SP, we | Bill Wendling | 2010-12-15 | 1 | -2/+1 |
| | | | | | | need to use tLDRi and tSTRi instead of tLDRspi and tSTRspi respectively. llvm-svn: 121915 | ||||
* | Implement cleanups suggested by Daniel. | Owen Anderson | 2010-12-15 | 1 | -4/+4 |
| | | | | llvm-svn: 121875 | ||||
* | Add fixups for Thumb LDR/STR instructions. | Bill Wendling | 2010-12-15 | 1 | -3/+13 |
| | | | | llvm-svn: 121858 | ||||
* | thumb adr fixup needs alignment just like the t2 version. | Jim Grosbach | 2010-12-14 | 1 | -1/+2 |
| | | | | llvm-svn: 121812 | ||||
* | Add support for MC-ized encoding of tLEApcrel and tLEApcrelJT. rdar://8755755 | Jim Grosbach | 2010-12-14 | 1 | -0/+13 |
| | | | | llvm-svn: 121798 | ||||
* | MC/ARM: Fix-up fixup offset for fixup_arm_branch target specific fixup. | Daniel Dunbar | 2010-12-14 | 1 | -1/+1 |
| | | | | llvm-svn: 121772 | ||||
* | The tLDR et al instructions were emitting either a reg/reg or reg/imm | Bill Wendling | 2010-12-14 | 1 | -23/+17 |
| | | | | | | | | | | | | | | | | 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 Anderson | 2010-12-14 | 1 | -0/+15 |
| | | | | | | | | much later, which makes the entire process cleaner. llvm-svn: 121735 | ||||
* | Revert r121721, which broke buildbots. | Owen Anderson | 2010-12-13 | 1 | -15/+0 |
| | | | | llvm-svn: 121726 | ||||
* | Make Thumb2 LEA-like instruction into pseudos, which map down to ADR. ↵ | Owen Anderson | 2010-12-13 | 1 | -0/+15 |
| | | | | | | | | 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 Anderson | 2010-12-13 | 1 | -2/+33 |
| | | | | | | | | | | 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 | ||||
* | Add FIXME | Jim Grosbach | 2010-12-10 | 1 | -0/+2 |
| | | | | llvm-svn: 121598 | ||||
* | Attempt to get Thumb2 branch fixups working properly. | Owen Anderson | 2010-12-10 | 1 | -2/+1 |
| | | | | llvm-svn: 121593 | ||||
* | Fix merge error in my last fix to Thumb2 vldr fixups. | Owen Anderson | 2010-12-10 | 1 | -1/+1 |
| | | | | llvm-svn: 121588 | ||||
* | Fixups for Thumb2 vldr's need to have the effective PC aligned as well. | Owen Anderson | 2010-12-10 | 1 | -1/+2 |
| | | | | llvm-svn: 121587 | ||||
* | The MCFixupKindInfo table needs to be in the order that the enums were | Bill Wendling | 2010-12-10 | 1 | -16/+19 |
| | | | | | | declared. Add a note specifying this and spruce up the list a bit. llvm-svn: 121586 | ||||
* | Fix encoding of Thumb1 LDRB and STRB. | Owen Anderson | 2010-12-10 | 1 | -0/+15 |
| | | | | llvm-svn: 121581 | ||||
* | Trailing whitespace. | Jim Grosbach | 2010-12-10 | 1 | -16/+16 |
| | | | | llvm-svn: 121580 | ||||
* | Fix encoding of 'U' bit for Thumb2 STRD/LDRD instructions. rdar://8755726 | Jim Grosbach | 2010-12-10 | 1 | -4/+4 |
| | | | | llvm-svn: 121524 | ||||
* | Thumb unconditional branch binary encoding. rdar://8754994 | Jim Grosbach | 2010-12-10 | 1 | -1/+13 |
| | | | | llvm-svn: 121496 | ||||
* | Thumb conditional branch binary encodings. rdar://8745367 | Jim Grosbach | 2010-12-10 | 1 | -0/+12 |
| | | | | llvm-svn: 121493 | ||||
* | Thumb ldr reg+imm offsets were encoded incorrectly. The scaling factor of the | Bill Wendling | 2010-12-09 | 1 | -36/+8 |
| | | | | | | | t_addrmode_s# address modes is used for ASM printing, not for encoding. <rdar://problem/8745375> llvm-svn: 121417 | ||||
* | Use the new IsAligned fixup flag to improve fixup encodings for Thumb2 ↵ | Owen Anderson | 2010-12-09 | 1 | -1/+2 |
| | | | | | | | | branches. This is still not perfect, but it gets many more of them correct than it did previously. llvm-svn: 121414 | ||||
* | Fix an issue in some Thumb fixups, where the effective PC address needs to ↵ | Owen Anderson | 2010-12-09 | 1 | -1/+2 |
| | | | | | | | | | | be 4-byte aligned when calculating the offset. Add a new fixup flag to represent this, and use it for the one fixups that I have a testcase for needing this. It's quite likely that the other Thumb fixups will need this too, and to have their fixup encoding logic adjusted accordingly. llvm-svn: 121408 | ||||
* | Rename CB/CBZ specific fixup accordingly. | Jim Grosbach | 2010-12-09 | 1 | -2/+2 |
| | | | | llvm-svn: 121404 | ||||
* | Rename the encoder method for t_cbtarget to match. | Jim Grosbach | 2010-12-09 | 1 | -4/+4 |
| | | | | llvm-svn: 121399 | ||||
* | Fix Thumb2 fixups for ldr. | Owen Anderson | 2010-12-09 | 1 | -1/+7 |
| | | | | llvm-svn: 121350 | ||||
* | The BLX instruction is encoded differently than the BL, because why not? In | Bill Wendling | 2010-12-09 | 1 | -12/+16 |
| | | | | | | | | | | 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 | ||||
* | Fix Thumb2 BCC encoding and fixups. | Owen Anderson | 2010-12-09 | 1 | -0/+4 |
| | | | | llvm-svn: 121329 | ||||
* | Support the "target" encodings for the CB[N]Z instructions. | Bill Wendling | 2010-12-08 | 1 | -28/+33 |
| | | | | llvm-svn: 121308 | ||||
* | Add support for loading from a constant pool. | Bill Wendling | 2010-12-08 | 1 | -3/+27 |
| | | | | llvm-svn: 121226 | ||||
* | VLDR fixups need special handling under Thumb. While the encoding is the same, | Owen Anderson | 2010-12-08 | 1 | -1/+7 |
| | | | | | | the order of the bytes in the data stream is flipped around. llvm-svn: 121215 | ||||
* | Fix a warning about a variable which is only used in an assertion. | Matt Beaumont-Gay | 2010-12-07 | 1 | -2/+2 |
| | | | | llvm-svn: 121206 | ||||
* | Binary encoding for ARM tLDRspi and tSTRspi. | Jim Grosbach | 2010-12-07 | 1 | -0/+19 |
| | | | | llvm-svn: 121186 | ||||
* | Second attempt at converting Thumb2's LDRpci, including updating the ↵ | Owen Anderson | 2010-12-07 | 1 | -3/+8 |
| | | | | | | gazillion places that need to know about it. llvm-svn: 121082 | ||||
* | Add fixup for Thumb1 BL/BLX instructions. | Jim Grosbach | 2010-12-06 | 1 | -0/+24 |
| | | | | llvm-svn: 121072 | ||||
* | Encode the 32-bit wide Thumb (and Thumb2) instructions with the high order | Jim Grosbach | 2010-12-03 | 1 | -1/+9 |
| | | | | | | halfword being emitted to the stream first. rdar://8728174 llvm-svn: 120848 | ||||
* | The tLDR instruction wasn't encoded properly: | Bill Wendling | 2010-12-03 | 1 | -2/+6 |
| | | | | | | | | | <MCInst 2251 <MCOperand Reg:70> <MCOperand Reg:66> <MCOperand Imm:0> <MCOperand Reg:0> <MCOperand Imm:14> <MCOperand Reg:0>> Notice that the "reg" here is 0, which is an invalid register. Put a check in the code for this to prevent crashing. llvm-svn: 120766 | ||||
* | Add support for binary encoding of ARM 'adr' instructions referencing constant | Jim Grosbach | 2010-12-02 | 1 | -13/+10 |
| | | | | | | pool entries (LEApcrel pseudo). Ongoing saga of rdar://8542291. llvm-svn: 120635 | ||||
* | Add a post encoder method to the VFP instructions to convert them to the Thumb2 | Bill Wendling | 2010-12-01 | 1 | -3/+15 |
| | | | | | | encoding if we're in that mode. llvm-svn: 120608 | ||||
* | Use the correct fixup type for ARM VLDR* | Jim Grosbach | 2010-12-01 | 1 | -2/+2 |
| | | | | llvm-svn: 120604 | ||||
* | Refactor LEApcrelJT as a pseudo-instructionlowered to a cannonical ADR | Jim Grosbach | 2010-12-01 | 1 | -0/+23 |
| | | | | | | | 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 Anderson | 2010-12-01 | 1 | -2/+42 |
| | | | | | | Additionally, update these to unified syntax. llvm-svn: 120589 | ||||
* | 10 bits, not 12. | Jim Grosbach | 2010-12-01 | 1 | -2/+2 |
| | | | | llvm-svn: 120584 | ||||
* | Fix typo. | Jim Grosbach | 2010-11-30 | 1 | -1/+1 |
| | | | | llvm-svn: 120499 | ||||
* | Thanks to JimG for catching this! | Jason W Kim | 2010-11-30 | 1 | -0/+2 |
| | | | | llvm-svn: 120494 | ||||
* | * Add support for encoding t_addrmode_s2 and t_addrmode_s1. They are the same as | Bill Wendling | 2010-11-30 | 1 | -5/+33 |
| | | | | | | | | | | 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 |