| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes pr23772 [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80".
The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable.
To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP).
Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations.
When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant )
It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt).
Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma, andreadb
Reviewed By: efriedma
Subscribers: gbedwell, john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70680
|
|
|
|
|
|
|
|
| |
Summary: This reverts commit 8c12769f3046029e2a9b4e48e1645b1a77d28650.
Reviewers:
Subscribers:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes pr23772 [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80".
The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable.
To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP).
Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations.
When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant )
It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt).
Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma
Reviewed By: efriedma
Subscribers: john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Thumb1, only one variant is supported: CPS{effect} {flags}
Thumb2 supports three:
CPS{effect}.W {flags}
CPS{effect} {flags} {mode}
CPS {mode}
Canonically, .W should be used only when ambiguity is present between encodings of different width.
The wide suffix is still accepted for the latter two forms via aliases.
llvm-svn: 188071
|
|
|
|
|
|
|
| |
was stc2 p0, c0, [r0]!
instead of stc2 p0, c0, [r0,#0]!
llvm-svn: 183975
|
|
|
|
|
|
|
|
|
| |
When the operand is a plain immediate rather than a label, print it
as [pc, #imm] like we do for the Thumb2 wide encoding variant.
rdar://12154503
llvm-svn: 166991
|
|
|
|
|
|
|
|
|
| |
for the assembler and disassembler. Which were not being set/read correctly
for offsets greater than 22 bits in some cases.
Changes to lib/Target/ARM/ARMAsmBackend.cpp from Gideon Myles!
llvm-svn: 156118
|
|
|
|
| |
llvm-svn: 155604
|
|
|
|
| |
llvm-svn: 141811
|
|
|
|
|
|
|
|
|
|
|
|
| |
forgotten to commit.
Build on previous patches to successfully distinguish between an M-series and A/R-series MSR and MRS instruction. These take different mask names and have a *slightly* different opcode format.
Add decoder and disassembler tests.
Improvement on the previous patch - successfully distinguish between valid v6m and v7m masks (one is a subset of the other). The patch had to be edited slightly to apply to ToT.
llvm-svn: 140696
|
|
|
|
| |
llvm-svn: 140423
|
|
|
|
|
|
| |
as [pc, #123] rather than simply #123.
llvm-svn: 140283
|
|
|
|
| |
llvm-svn: 139256
|
|
|
|
|
|
| |
predicate checking to the Disassembler.
llvm-svn: 139250
|
|
|
|
| |
llvm-svn: 139244
|
|
|
|
|
|
| |
remaining Thumb2 decoding failures found by randomized testing so far.
llvm-svn: 138341
|
|
|
|
|
|
| |
Found by randomized testing.
llvm-svn: 138337
|
|
|
|
| |
llvm-svn: 138301
|
|
|
|
| |
llvm-svn: 138300
|
|
|
|
| |
llvm-svn: 138298
|
|
|
|
|
|
| |
randomized testing.
llvm-svn: 138292
|
|
|
|
|
|
|
|
| |
Fix base register type and canonicallize to the "ldm" spelling rather than
"ldmia." Add diagnostics for incorrect writeback token and out-of-range
registers.
llvm-svn: 137986
|
|
|
|
| |
llvm-svn: 137645
|
|
|
|
| |
llvm-svn: 137636
|
|
|
|
| |
llvm-svn: 137236
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
immediate operand.
llvm-svn: 131565
|
|
|
|
| |
llvm-svn: 130345
|
|
|
|
|
|
|
|
|
|
| |
should
print out ldr, not ldr.n.
rdar://problem/9267772
llvm-svn: 130008
|
|
|
|
|
|
| |
rdar://problem/9292717
llvm-svn: 129619
|
|
|
|
|
|
| |
operations.
llvm-svn: 129531
|
|
|
|
|
|
| |
rdar://problem/9280370
llvm-svn: 129480
|
|
|
|
|
|
|
|
| |
instructions (tBcc and t2Bcc).
rdar://problem/9280470
llvm-svn: 129471
|
|
|
|
|
|
|
|
| |
not properly handled.
rdar://problem/9276427
llvm-svn: 129456
|
|
|
|
|
|
|
|
|
|
| |
In addition, the base register is not rGPR, but GPR with th exception that:
if n == 15 then UNPREDICTABLE
rdar://problem/9273836
llvm-svn: 129391
|
|
|
|
|
|
|
|
|
|
| |
its Inst{23}
be specified as '1' (add = TRUE).
Also add a utility function for Thumb2.
llvm-svn: 129377
|
|
|
|
| |
llvm-svn: 129327
|
|
|
|
|
|
| |
rdar://problem/9267838
llvm-svn: 129320
|
|
|
|
|
|
|
|
| |
instructions are incorrectly disassembled.
rdar://problem/9266265
llvm-svn: 129298
|
|
|
|
|
|
|
| |
PR9648
rdar://problem/9257634
llvm-svn: 129146
|
|
|
|
|
|
|
|
|
|
| |
Since these "Advanced SIMD and VFP" instructions have more specfic encoding bits
specified, if coproc == 10 or 11, we should reject the insn as invalid.
rdar://problem/9239922
rdar://problem/9239596
llvm-svn: 129027
|
|
|
|
| |
llvm-svn: 128913
|
|
|
|
| |
llvm-svn: 128517
|
|
|
|
| |
llvm-svn: 128322
|
|
|
|
| |
llvm-svn: 128306
|
|
|
|
| |
llvm-svn: 128305
|
|
|
|
|
|
|
|
|
|
| |
GPRRegClassID.
Also add some test cases.
rdar://problem/9189829
llvm-svn: 128304
|
|
|
|
|
|
|
|
| |
RegClass. Add two test cases.
rdar://problem/9182892
llvm-svn: 128299
|
|
|
|
|
|
| |
Add two test cases.
llvm-svn: 128295
|