mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
ARMv8: SWP and SWPB are obsoleted on ARMv8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ceda68fe24
commit
3f87f2510c
@ -196,6 +196,8 @@ def HasV7 : Predicate<"Subtarget->hasV7Ops()">,
|
||||
AssemblerPredicate<"HasV7Ops", "armv7">;
|
||||
def HasV8 : Predicate<"Subtarget->hasV8Ops()">,
|
||||
AssemblerPredicate<"HasV8Ops", "armv8">;
|
||||
def PreV8 : Predicate<"!Subtarget->hasV8Ops()">,
|
||||
AssemblerPredicate<"!HasV8Ops", "armv7 or earlier">;
|
||||
def NoVFP : Predicate<"!Subtarget->hasVFP2()">;
|
||||
def HasVFP2 : Predicate<"Subtarget->hasVFP2()">,
|
||||
AssemblerPredicate<"FeatureVFP2", "VFP2">;
|
||||
@ -4455,9 +4457,11 @@ def : ARMPat<(strex_2 (and GPR:$Rt, 0xffff), addr_offset_none:$addr),
|
||||
// SWP/SWPB are deprecated in V6/V7.
|
||||
let mayLoad = 1, mayStore = 1 in {
|
||||
def SWP : AIswp<0, (outs GPRnopc:$Rt),
|
||||
(ins GPRnopc:$Rt2, addr_offset_none:$addr), "swp", []>;
|
||||
(ins GPRnopc:$Rt2, addr_offset_none:$addr), "swp", []>,
|
||||
Requires<[PreV8]>;
|
||||
def SWPB: AIswp<1, (outs GPRnopc:$Rt),
|
||||
(ins GPRnopc:$Rt2, addr_offset_none:$addr), "swpb", []>;
|
||||
(ins GPRnopc:$Rt2, addr_offset_none:$addr), "swpb", []>,
|
||||
Requires<[PreV8]>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
7
test/MC/ARM/obsolete-v8.s
Normal file
7
test/MC/ARM/obsolete-v8.s
Normal file
@ -0,0 +1,7 @@
|
||||
@ RUN: not llvm-mc -triple=armv8 < %s 2>&1 | FileCheck %s
|
||||
|
||||
swp r0, r1, [r2]
|
||||
@ CHECK: instruction requires: armv7 or earlier
|
||||
|
||||
swpb r0, r1, [r2]
|
||||
@ CHECK: instruction requires: armv7 or earlier
|
Loading…
Reference in New Issue
Block a user