Skip to content

Commit

Permalink
[M68k] Replace IsM680x0 with predicates AtLeastM680x0
Browse files Browse the repository at this point in the history
The former is incorrect.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D137425
  • Loading branch information
0x59616e committed Nov 9, 2022
1 parent d0133bf commit c7d6a0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/M68k/M68kInstrData.td
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ def MOV8cd : MxMoveToCCRPseudo<MxOp8AddrMode_d.Op>;
let Uses = [CCR] in {
class MxMoveFromCCR_R
: MxInst<(outs MxDRD16:$dst), (ins CCRC:$src), "move.w\t$src, $dst", []>,
Requires<[ IsM68010 ]> {
Requires<[ AtLeastM68010 ]> {
let Inst = (descend 0b0100001011, MxEncAddrMode_d<"dst">.EA);
}

class MxMoveFromCCR_M<MxOperand MEMOp, MxEncMemOp DST_ENC>
: MxInst<(outs), (ins MEMOp:$dst, CCRC:$src), "move.w\t$src, $dst", []>,
Requires<[ IsM68010 ]> {
Requires<[ AtLeastM68010 ]> {
let Inst = (ascend
(descend 0b0100001011, DST_ENC.EA),
DST_ENC.Supplement
Expand Down
10 changes: 5 additions & 5 deletions llvm/lib/Target/M68k/M68kInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ def NearData : Predicate<"TM.getCodeModel() == CodeModel::Small ||"
"TM.getCodeModel() == CodeModel::Kernel">;
def IsPIC : Predicate<"TM.isPositionIndependent()">;
def IsNotPIC : Predicate<"!TM.isPositionIndependent()">;
def IsM68000 : Predicate<"Subtarget.IsM68000()">;
def IsM68010 : Predicate<"Subtarget.IsM68010()">;
def IsM68020 : Predicate<"Subtarget.IsM68020()">;
def IsM68030 : Predicate<"Subtarget.IsM68030()">;
def IsM68040 : Predicate<"Subtarget.IsM68040()">;

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()">;

//===----------------------------------------------------------------------===//
// Condition Codes
Expand Down

0 comments on commit c7d6a0f

Please sign in to comment.