| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Start of cleaning this up a bit. First step is to remove the encoder hook by
storing the operand as the bits it'll actually encode to so it can just be
directly used. Map it to the assembly source values 8/16/24 when we print it.
llvm-svn: 136152
|
|
|
|
| |
llvm-svn: 136006
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the Rn register encoding for both SSAT and USAT. Update the parsing of the
shift operand to correctly handle the allowed shift types and immediate ranges
and issue meaningful diagnostics when an illegal value or shift type is
specified. Add aliases to parse an ommitted shift operand (default value of
'lsl #0').
Add tests for diagnostics and proper encoding.
llvm-svn: 135990
|
|
|
|
| |
llvm-svn: 135825
|
|
|
|
|
|
|
|
|
| |
The immediate is in the range 1-32, but is encoded as 0-31 in a 5-bit bitfield.
Update the representation such that we store the operand as 0-31, allowing us
to remove the encoder method and the special case handling in the disassembler.
Update the assembly parser and the instruction printer accordingly.
llvm-svn: 135823
|
|
|
|
|
|
| |
necessitates a lot of changes to related bits.
llvm-svn: 135722
|
|
|
|
|
|
| |
ARM MC code from target.
llvm-svn: 135636
|
|
|
|
|
|
|
|
|
|
| |
Move the shift operator and special value (32 encoded as 0 for PKHTB) handling
into the instruction printer. This cleans up a bit of the disassembler
special casing for these instructions, more easily handles not printing the
operand at all for "lsl #0" and prepares for correct asm parsing of these
operands.
llvm-svn: 135626
|
|
|
|
|
|
|
|
| |
The system register spec should be case insensitive. The preferred form for
output with mask values of 4, 8, and 12 references APSR rather than CPSR.
Update and tidy up tests accordingly.
llvm-svn: 135532
|
|
|
|
|
|
| |
multiple instructions with the same encoding. This resolves another conflict when bringing up the new-style disassembler.
llvm-svn: 135442
|
|
|
|
|
|
|
| |
Now works for parsing register shifted register and register shifted
immediate arithmetic instructions, including the 'rrx' rotate with extend.
llvm-svn: 135049
|
|
|
|
|
|
|
|
|
| |
Print shifted immediate values directly rather than as a payload+shifter
value pair. This makes for more readable output assembly code, simplifies
the instruction printer, and is consistent with how Thumb immediates are
displayed.
llvm-svn: 134902
|
|
|
|
| |
llvm-svn: 132451
|
|
|
|
|
|
|
|
|
|
| |
An alternative syntax is available for a modified immediate constant that permits the programmer to specify
the encoding directly. In this syntax, #<const> is instead written as #<byte>,#<rot>, where:
<byte> is the numeric value of abcdefgh, in the range 0-255
<rot> is twice the numeric value of rotation, an even number in the range 0-30.
llvm-svn: 128897
|
|
|
|
|
|
|
|
|
|
| |
also fix the encoding of the later.
- Add a new encoding bit to describe the index mode used in AM3.
- Teach printAddrMode3Operand to check by the addressing mode which
index mode to print.
- Testcases.
llvm-svn: 128832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all LDR/STR changes and left them to a future patch. Passing all
checks now.
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
fix the encoding wherever is possible.
- Add a new encoding bit to describe the index mode used and teach
printAddrMode2Operand to check by the addressing mode which index
mode to print.
- Testcases
llvm-svn: 128689
|
|
|
|
| |
llvm-svn: 128635
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implement asm parsing support for LDRT, LDRBT, STRT, STRBT and
{STR,LDC}{2}_{PRE,POST} fixing the encoding wherever is possible.
- Move all instructions which use am2offset without a pattern to use
addrmode2.
- Add a new encoding bit to describe the index mode used and teach
printAddrMode2Operand to check by the addressing mode which index
mode to print.
- Testcases
llvm-svn: 128632
|
|
|
|
|
|
| |
This revision introduced a dependency cycle, as nlewycky mentioned by email.
llvm-svn: 128597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{STR,LDC}{2}_PRE.
- Fixed the encoding in some places.
- Some of those instructions were using am2offset and now use addrmode2.
Codegen isn't affected, instructions which use SelectAddrMode2Offset were not
touched.
- Teach printAddrMode2Operand to check by the addressing mode which index
mode to print.
- This is a work in progress, more work to come. The idea is to change places
which use am2offset to use addrmode2 instead, as to unify assembly parser.
- Add testcases for assembly parser
llvm-svn: 128585
|
|
|
|
| |
llvm-svn: 128236
|
|
|
|
| |
llvm-svn: 127601
|
|
|
|
|
|
|
| |
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.
llvm-svn: 127101
|
|
|
|
|
|
| |
testcases for the disassembler to make sure it still works for "msr".
llvm-svn: 125948
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.
llvm-svn: 125489
|
|
|
|
|
|
| |
(which worked around it). This should get us back to the old, correct behavior, though it will make the integrated assembler unhappy for the time being.
llvm-svn: 125127
|
|
|
|
|
|
|
| |
parser. The parser will always give us a binary representation of the floating
point number.
llvm-svn: 124318
|
|
|
|
| |
llvm-svn: 124233
|
|
|
|
|
|
| |
appropriately so that it prints out the decimal representation.
llvm-svn: 124230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requires supporting
the symbolic immediate names used for these instructions, fixing their pretty-printers, and
adding proper encoding information for them.
With this, we can properly pretty-print and encode assembly like:
mrc p15, #0, r3, c13, c0, #3
Fixes <rdar://problem/8857858>.
llvm-svn: 123404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
gazillion places that need to know about it.
llvm-svn: 121082
|
|
|
|
|
|
| |
32-bit wide version by adding the .w suffix.
llvm-svn: 120838
|
|
|
|
|
|
| |
instructions. This simplifies instruction printing and disassembly.
llvm-svn: 120333
|
|
|
|
|
|
| |
data. Next up, pseudo-izing them.
llvm-svn: 120320
|
|
|
|
|
|
|
|
|
| |
'db', 'ib', 'da') instead of having that mode as a separate field in the
instruction. It's more convenient for the asm parser and much more readable for
humans.
<rdar://problem/8654088>
llvm-svn: 119310
|
|
|
|
|
|
|
| |
- Get the opcode once.
- Add a ParserMatchClass to reglist.
llvm-svn: 118997
|
|
|
|
|
|
| |
with movi + orr.
llvm-svn: 118945
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 118141
|
|
|
|
|
|
| |
printOperand() asm printer helper functions. rdar://8425198
llvm-svn: 118140
|
|
|
|
| |
llvm-svn: 118139
|
|
|
|
|
|
|
| |
parts. Represent the operation mode as an optional operand instead.
rdar://8614429
llvm-svn: 118137
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the opcode string in the inst dump, e.g.:
vmov r2, r3, d17 @ encoding: [0x31,0x2b,0x53,0xec]
@ <MCInst #989 VMOVRRD
@ <MCOperand Reg:68>
@ <MCOperand Reg:69>
@ <MCOperand Reg:19>
@ <MCOperand Imm:14>
@ <MCOperand Reg:0>>
The "VMOVRRD" is new.
llvm-svn: 117609
|
|
|
|
| |
llvm-svn: 117571
|
|
|
|
|
|
| |
integer values), not with the addrmode2 encoding.
llvm-svn: 117429
|
|
|
|
|
|
|
|
| |
explicit about the operands. Split out the different variants into separate
instructions. This gives us the ability to, among other things, assign
different scheduling itineraries to the variants. rdar://8477752.
llvm-svn: 117409
|
|
|
|
| |
llvm-svn: 117291
|
|
|
|
|
|
|
| |
and handle the operand explicitly. Flesh out encoding information. Add an
explicit disassembler testcase for the instruction.
llvm-svn: 116432
|
|
|
|
| |
llvm-svn: 115845
|