mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
ARM MCR/MCR2 assembly parsing operand constraints.
The immediate operands are restricted to 0-7. Enforce that when parsing assembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3649,8 +3649,8 @@ class MovRCopro<string opc, bit direction, dag oops, dag iops,
|
||||
|
||||
def MCR : MovRCopro<"mcr", 0 /* from ARM core register to coprocessor */,
|
||||
(outs),
|
||||
(ins p_imm:$cop, i32imm:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, i32imm:$opc2),
|
||||
(ins p_imm:$cop, imm0_7:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, imm0_7:$opc2),
|
||||
[(int_arm_mcr imm:$cop, imm:$opc1, GPR:$Rt, imm:$CRn,
|
||||
imm:$CRm, imm:$opc2)]>;
|
||||
def MRC : MovRCopro<"mrc", 1 /* from coprocessor to ARM core register */,
|
||||
@@ -3686,8 +3686,8 @@ class MovRCopro2<string opc, bit direction, dag oops, dag iops,
|
||||
|
||||
def MCR2 : MovRCopro2<"mcr2", 0 /* from ARM core register to coprocessor */,
|
||||
(outs),
|
||||
(ins p_imm:$cop, i32imm:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, i32imm:$opc2),
|
||||
(ins p_imm:$cop, imm0_7:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, imm0_7:$opc2),
|
||||
[(int_arm_mcr2 imm:$cop, imm:$opc1, GPR:$Rt, imm:$CRn,
|
||||
imm:$CRm, imm:$opc2)]>;
|
||||
def MRC2 : MovRCopro2<"mrc2", 1 /* from coprocessor to ARM core register */,
|
||||
|
||||
@@ -3377,13 +3377,13 @@ class t2MovRRCopro<bits<4> Op, string opc, bit direction,
|
||||
/* from ARM core register to coprocessor */
|
||||
def t2MCR : t2MovRCopro<0b1110, "mcr", 0,
|
||||
(outs),
|
||||
(ins p_imm:$cop, i32imm:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, i32imm:$opc2),
|
||||
(ins p_imm:$cop, imm0_7:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, imm0_7:$opc2),
|
||||
[(int_arm_mcr imm:$cop, imm:$opc1, GPR:$Rt, imm:$CRn,
|
||||
imm:$CRm, imm:$opc2)]>;
|
||||
def t2MCR2 : t2MovRCopro<0b1111, "mcr2", 0,
|
||||
(outs), (ins p_imm:$cop, i32imm:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, i32imm:$opc2),
|
||||
(outs), (ins p_imm:$cop, imm0_7:$opc1, GPR:$Rt, c_imm:$CRn,
|
||||
c_imm:$CRm, imm0_7:$opc2),
|
||||
[(int_arm_mcr2 imm:$cop, imm:$opc1, GPR:$Rt, imm:$CRn,
|
||||
imm:$CRm, imm:$opc2)]>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user