| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain ARM instructions accept 32-bit immediate operands encoded as a 8-bit
integer value (0-255) and a 4-bit rotation (0-30, even). Current ARM assembly
syntax support in LLVM allows the decoded (32-bit) immediate to be specified
as a single immediate operand for such instructions:
mov r0, #4278190080
The ARMARM defines an extended assembly syntax allowing the encoding to be made
more explicit, as in:
mov r0, #255, #8 ; (same 32-bit value as above)
The behaviour of the two instructions can be different w.r.t flags, which is
documented under "Modified immediate constants" in ARMARM. This patch enables
support for this extended syntax at the MC layer.
llvm-svn: 223113
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove its definition and
update appropriate tests.
LLVM defines both a cortex-a9 CPU and a cortex-a9-mp CPU. The only
difference between the two CPU definitions in ARM.td is that
cortex-a9-mp contains the feature FeatureMP for multiprocessing
extensions.
This is redundant since the Cortex-A9 is defined as having
multiprocessing extensions in the TRMs. armcc also defines the
Cortex-A9 as having multiprocessing extensions by default.
Change-Id: Ifcadaa6c322be0a33d9d2a39cfdd7da1d75981a7
llvm-svn: 221166
|
|
|
|
|
|
|
|
|
| |
The cdp2 instruction should have the same restrictions as cdp on the
co-processor registers.
VFP instructions on v8/AArch32 share the same encoding space as cdp2.
llvm-svn: 184445
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the ARM reference manual, constant offsets are mandatory for pre-indexed addressing modes.
The MC disassembler was not obeying this when the offset is 0.
It was producing instructions like: str r0, [r1]!.
Correct syntax is: str r0, [r1, #0]!.
This change modifies the dumping of operands so that the offset is always printed, regardless of its value, when pre-indexed addressing mode is used.
Patch by Mihail Popa <Mihail.Popa@arm.com>
llvm-svn: 179398
|
|
|
|
| |
llvm-svn: 155604
|
|
|
|
|
|
| |
coprocessor number was removed for this instruction.
llvm-svn: 155000
|
|
|
|
|
|
| |
of the STRD, STRH, LDRD, LDRH, LDRSH and LDRSB instructions on ARM.
llvm-svn: 153252
|
|
|
|
|
|
|
| |
Canonicallize on the non-suffixed form, but continue to accept assembly that
has any correctly sized type suffix.
llvm-svn: 144583
|
|
|
|
|
|
| |
One-register lists are legal on LDM/STM instructions, but we should not print the PUSH/POP aliases when they appear. This fixes round tripping on this instruction.
llvm-svn: 143557
|
|
|
|
|
|
| |
reading of the ARMv7 docs.
llvm-svn: 142626
|
|
|
|
| |
llvm-svn: 142624
|
|
|
|
| |
llvm-svn: 141705
|
|
|
|
|
|
| |
predicate checking to the Disassembler.
llvm-svn: 139250
|
|
|
|
|
|
|
|
| |
for the purposes of decoding all operands except the predicate.
Found by randomized testing.
llvm-svn: 138003
|
|
|
|
|
|
| |
have it unset.
llvm-svn: 138000
|
|
|
|
| |
llvm-svn: 137644
|
|
|
|
| |
llvm-svn: 137347
|
|
|
|
|
|
| |
additional encoding fixes added by me.
llvm-svn: 137322
|
|
|
|
|
|
| |
Not sure about BLXi, but this is what the old disassembler did.
llvm-svn: 137156
|
|
|
|
|
|
|
|
|
|
| |
FixedLenDecoderEmitter.
This new disassembler can correctly decode all the testcases that the old one did, though
some "expected failure" testcases are XFAIL'd for now because it is not (yet) as strict in
operand checking as the old one was.
llvm-svn: 137144
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Memory operand parsing is a bit haphazzard at the moment, in no small part
due to the even more haphazzard representations of memory operands in the .td
files. Start cleaning that all up, at least a bit.
The addressing modes in the .td files will be being simplified to not be
so monolithic, especially with regards to immediate vs. register offsets
and post-indexed addressing. addrmode3 is on its way with this patch, for
example.
This patch is foundational to enable going back to smaller incremental patches
for the individual memory referencing instructions themselves. It does just
enough to get the basics in place and handle the "make check" regression tests
we already have.
Follow-up work will be fleshing out the details and adding more robust test
cases for the individual instructions, starting with ARM mode and moving from
there into Thumb and Thumb2.
llvm-svn: 136845
|
|
|
|
|
|
|
|
| |
Fix the instruction encoding for operands. Refactor mode to use explicit
instruction definitions per FIXME to be more consistent with loads/stores.
Fix disassembler accordingly. Add tests.
llvm-svn: 136509
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Modified the patch to .td file supplied by Jyun-Yan You. Add a test case and
modified ARMDisassemblerCore.cpp a little bit.
llvm-svn: 131859
|
|
|
|
| |
llvm-svn: 130345
|
|
|
|
|
|
|
| |
PR9650
rdar://problem/9257565
llvm-svn: 129147
|
|
|
|
|
|
| |
Add tests for that.
llvm-svn: 129137
|
|
|
|
|
|
| |
Add more test cases to exercise the logical branches related to the above change.
llvm-svn: 129117
|
|
|
|
|
|
|
|
| |
extend instructions.
Add some test cases.
llvm-svn: 129098
|
|
|
|
|
|
| |
And two test cases.
llvm-svn: 129090
|
|
|
|
|
|
|
|
|
|
| |
Add more complete sanity check for LdStFrm instructions where if IBit (Inst{25})
is 1, Inst{4} should be 0. Otherwise, we should reject the insn as invalid.
rdar://problem/9239347
rdar://problem/9239467
llvm-svn: 128977
|
|
|
|
|
|
|
|
|
|
| |
illegal register
encodings for DisassembleArithMiscFrm().
rdar://problem/9238659
llvm-svn: 128958
|
|
|
|
|
|
|
|
| |
Modify DisassembleCoprocessor() of ARMDisassemblerCore.cpp to react to the change.
rdar://problem/9236873
llvm-svn: 128922
|
|
|
|
| |
llvm-svn: 128909
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
operand in am2offset;
instead of the second operand in addrmode_imm12.
rdar://problem/9225289
llvm-svn: 128757
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
definition so that
all the instruction have:
let Inst{31-27} = 0b1110; // non-predicated
Before, the ARM decoder was confusing:
> 0x40 0xf3 0xb8 0x80
as:
Opcode=16 Name=ADCSSrs Format=ARM_FORMAT_DPSOREGFRM(5)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
adcs pc, r8, r0, asr #6
since the cond field for ADCSSrs is a wild card, and so is ADCrs, with the ADCSSrs having Inst{20} as '1'.
Now, the AR decoder behaves correctly:
> 0x40 0xf3 0xb8 0x80
> END
Executing command: /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc -disassemble -triple=arm-apple-darwin -debug-only=arm-disassembler mc-input.txt
Opcode=19 Name=ADCrs Format=ARM_FORMAT_DPSOREGFRM(5)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------------------------------------------------------------------------------------------
| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 1| 0: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0|
-------------------------------------------------------------------------------------------------
adcshi pc, r8, r0, asr #6
>
rdar://problem/9223094
llvm-svn: 128746
|
|
|
|
|
|
|
|
| |
should reject the instruction
as invalid.
llvm-svn: 128734
|
|
|
|
|
|
|
|
| |
$addrmode_imm12 => (ops GPR:$base, i32imm:$offsimm).
rdar://problem/9219356
llvm-svn: 128722
|
|
|
|
|
|
|
|
| |
A8.6.23 BLX (immediate)
rdar://problem/9212921
llvm-svn: 128644
|
|
|
|
| |
llvm-svn: 128494
|
|
|
|
|
|
|
|
| |
The STC_OPTION and STC2_OPTION instructions should have their coprocessor option enclosed in {}.
rdar://problem/9200661
llvm-svn: 128478
|
|
|
|
| |
llvm-svn: 128476
|
|
|
|
|
|
| |
actually exist.
llvm-svn: 128461
|
|
|
|
|
|
|
|
| |
some test cases.
Add comments to ThumbDisassemblerCore.h for recent change made for t2PLD disassembly.
llvm-svn: 128417
|
|
|
|
| |
llvm-svn: 128306
|
|
|
|
|
|
|
|
| |
Modify the disassembler to handle that.
rdar://problem/9184053
llvm-svn: 128285
|
|
|
|
|
|
|
|
|
| |
was fooled.
Set the encoding bits to {0,?,?,0}, not 0. Plus delegate the disassembly of ADR to
the more generic ADDri/SUBri instructions, and add a test case for that.
llvm-svn: 128234
|
|
|
|
|
|
|
| |
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt. Also add two test cases.
llvm-svn: 128191
|