mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Tighten operand checking of register-shifted-register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d40aa24ebf
commit
de317f40f7
@ -439,7 +439,7 @@ def so_reg_reg : Operand<i32>, // reg reg imm
|
||||
let PrintMethod = "printSORegRegOperand";
|
||||
let DecoderMethod = "DecodeSORegRegOperand";
|
||||
let ParserMatchClass = ShiftedRegAsmOperand;
|
||||
let MIOperandInfo = (ops GPR, GPR, i32imm);
|
||||
let MIOperandInfo = (ops GPRnopc, GPRnopc, i32imm);
|
||||
}
|
||||
|
||||
def ShiftedImmAsmOperand : AsmOperandClass { let Name = "RegShiftedImm"; }
|
||||
@ -2541,9 +2541,9 @@ def MOVr_TC : AsI1<0b1101, (outs tcGPR:$Rd), (ins tcGPR:$Rm), DPFrm,
|
||||
let Inst{15-12} = Rd;
|
||||
}
|
||||
|
||||
def MOVsr : AsI1<0b1101, (outs GPR:$Rd), (ins shift_so_reg_reg:$src),
|
||||
def MOVsr : AsI1<0b1101, (outs GPRnopc:$Rd), (ins shift_so_reg_reg:$src),
|
||||
DPSoRegRegFrm, IIC_iMOVsr,
|
||||
"mov", "\t$Rd, $src", [(set GPR:$Rd, shift_so_reg_reg:$src)]>,
|
||||
"mov", "\t$Rd, $src", [(set GPRnopc:$Rd, shift_so_reg_reg:$src)]>,
|
||||
UnaryDP {
|
||||
bits<4> Rd;
|
||||
bits<12> src;
|
||||
|
@ -683,8 +683,8 @@ static bool DecodeSORegRegOperand(llvm::MCInst &Inst, unsigned Val,
|
||||
unsigned Rs = fieldFromInstruction32(Val, 8, 4);
|
||||
|
||||
// Register-register
|
||||
DecodeGPRRegisterClass(Inst, Rm, Address, Decoder);
|
||||
DecodeGPRRegisterClass(Inst, Rs, Address, Decoder);
|
||||
if (!DecodeGPRnopcRegisterClass(Inst, Rm, Address, Decoder)) return false;
|
||||
if (!DecodeGPRnopcRegisterClass(Inst, Rs, Address, Decoder)) return false;
|
||||
|
||||
ARM_AM::ShiftOpc Shift = ARM_AM::lsl;
|
||||
switch (type) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||
# XFAIL: *
|
||||
|
||||
# Opcode=196 Name=MOVs Format=ARM_FORMAT_DPSOREGFRM(5)
|
||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# | 1: 1: 1: 0| 0: 0: 0: 1| 1: 0: 1: 0| 0: 0: 0: 0| 1: 1: 1: 1| 0: 0: 0: 1| 0: 0: 0: 1| 0: 0: 1: 0|
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
@ -1,8 +1,7 @@
|
||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||
# XFAIL: *
|
||||
|
||||
# Opcode=261 Name=RSCrs Format=ARM_FORMAT_DPSOREGFRM(5)
|
||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# | 0: 0: 1: 1| 0: 0: 0: 0| 1: 1: 1: 0| 0: 1: 0: 0| 1: 1: 1: 1| 1: 0: 0: 0| 0: 1: 0: 1| 1: 1: 1: 1|
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user