mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 20:33:15 +00:00
Specify that the thumb setend and blx <immed> instructions are not valid on an m-class target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
966fc9344b
commit
f2115a0b0d
@ -311,7 +311,7 @@ def tHLT : T1I<(outs), (ins imm0_63:$val), NoItinerary, "hlt\t$val",
|
||||
}
|
||||
|
||||
def tSETEND : T1I<(outs), (ins setend_op:$end), NoItinerary, "setend\t$end",
|
||||
[]>, T1Encoding<0b101101>, Deprecated<HasV8Ops> {
|
||||
[]>, T1Encoding<0b101101>, Requires<[IsNotMClass]>, Deprecated<HasV8Ops> {
|
||||
bits<1> end;
|
||||
// A8.6.156
|
||||
let Inst{9-5} = 0b10010;
|
||||
@ -466,7 +466,7 @@ let isCall = 1,
|
||||
(outs), (ins pred:$p, t_blxtarget:$func), IIC_Br,
|
||||
"blx${p}\t$func",
|
||||
[(ARMcall tglobaladdr:$func)]>,
|
||||
Requires<[IsThumb, HasV5T]>, Sched<[WriteBrL]> {
|
||||
Requires<[IsThumb, HasV5T, IsNotMClass]>, Sched<[WriteBrL]> {
|
||||
bits<24> func;
|
||||
let Inst{26} = func{23};
|
||||
let Inst{25-16} = func{20-11};
|
||||
|
26
test/MC/ARM/thumb-not-mclass.s
Normal file
26
test/MC/ARM/thumb-not-mclass.s
Normal file
@ -0,0 +1,26 @@
|
||||
@ RUN: not llvm-mc -triple=thumbv7m-apple-darwin -show-encoding < %s 2> %t
|
||||
@ RUN: FileCheck < %t %s
|
||||
@ RUN: not llvm-mc -triple=thumbv6m -show-encoding < %s 2> %t
|
||||
@ RUN: FileCheck < %t %s
|
||||
.syntax unified
|
||||
.globl _func
|
||||
|
||||
@ Check that the assembler rejects thumb instructions that are not valid
|
||||
@ on mclass.
|
||||
|
||||
@------------------------------------------------------------------------------
|
||||
@ BLX (immediate)
|
||||
@------------------------------------------------------------------------------
|
||||
blx _baz
|
||||
|
||||
@ CHECK: error: instruction requires: !armv*m
|
||||
|
||||
@------------------------------------------------------------------------------
|
||||
@ SETEND
|
||||
@------------------------------------------------------------------------------
|
||||
|
||||
setend be
|
||||
setend le
|
||||
|
||||
@ CHECK: error: invalid operand for instruction
|
||||
@ CHECK: error: invalid operand for instruction
|
Loading…
x
Reference in New Issue
Block a user