def IsPIC : Predicate<"TM.isPositionIndependent()">;
def IsNotPIC : Predicate<"!TM.isPositionIndependent()">;
-def AtLeastM68000 : Predicate<"Subtarget->atLeastM68000()">;
-def AtLeastM68010 : Predicate<"Subtarget->atLeastM68010()">;
-def AtLeastM68020 : Predicate<"Subtarget->atLeastM68020()">;
-def AtLeastM68030 : Predicate<"Subtarget->atLeastM68030()">;
-def AtLeastM68040 : Predicate<"Subtarget->atLeastM68040()">;
+// ISA versions
+foreach i = [0,1,2,4,6] in
+def AtLeastM680 # i # "0" : Predicate<"Subtarget->atLeastM680"#i#"0()">,
+ AssemblerPredicate<(all_of
+ !cast<SubtargetFeature>("FeatureISA"#i#"0"))>;
//===----------------------------------------------------------------------===//
// Condition Codes
-# RUN: llvm-mc -disassemble %s -triple=m68k | FileCheck %s
+# RUN: llvm-mc -disassemble %s -triple=m68k -mcpu=M68020 | FileCheck %s
# CHECK: cas.b %d3, %d2, (%a2)
0x0a 0xd2 0x00 0x83
-; RUN: llvm-mc -show-encoding -triple=m68k %s | FileCheck %s
+; RUN: llvm-mc -show-encoding -triple=m68k -mcpu=M68020 %s | FileCheck %s
; CHECK: cas.b %d3, %d2, (%a2)
; CHECK-SAME: ; encoding: [0x0a,0xd2,0x00,0x83]
-; RUN: llvm-mc -triple=m68k -show-encoding %s | FileCheck %s
+; RUN: llvm-mc -triple=m68k -mcpu=M68010 -show-encoding %s | FileCheck %s
; CHECK: move.w %d1, %ccr
; CHECK-SAME: encoding: [0x44,0xc1]