[llvm] r214871 - Specify that the thumb setend and blx <immed> instructions are not valid on an m-class target
Keith Walker
kwalker at arm.com
Tue Aug 5 08:11:59 PDT 2014
Author: kwalker
Date: Tue Aug 5 10:11:59 2014
New Revision: 214871
URL: http://llvm.org/viewvc/llvm-project?rev=214871&view=rev
Log:
Specify that the thumb setend and blx <immed> instructions are not valid on an m-class target
Added:
llvm/trunk/test/MC/ARM/thumb-not-mclass.s (with props)
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=214871&r1=214870&r2=214871&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue Aug 5 10:11:59 2014
@@ -311,7 +311,7 @@ def tHLT : T1I<(outs), (ins imm0_63:$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};
Added: llvm/trunk/test/MC/ARM/thumb-not-mclass.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-not-mclass.s?rev=214871&view=auto
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-not-mclass.s (added)
+++ llvm/trunk/test/MC/ARM/thumb-not-mclass.s Tue Aug 5 10:11:59 2014
@@ -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.
+
+ at ------------------------------------------------------------------------------
+@ BLX (immediate)
+ at ------------------------------------------------------------------------------
+ blx _baz
+
+@ CHECK: error: instruction requires: !armv*m
+
+ at ------------------------------------------------------------------------------
+@ SETEND
+ at ------------------------------------------------------------------------------
+
+ setend be
+ setend le
+
+@ CHECK: error: invalid operand for instruction
+@ CHECK: error: invalid operand for instruction
Propchange: llvm/trunk/test/MC/ARM/thumb-not-mclass.s
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: llvm/trunk/test/MC/ARM/thumb-not-mclass.s
------------------------------------------------------------------------------
svn:keywords = Rev Date Author URL Id
More information about the llvm-commits
mailing list