case Match_UImm6_0:
return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
"expected 6-bit unsigned immediate");
+ case Match_UImm8_0:
+ return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
+ "expected 8-bit unsigned immediate");
}
llvm_unreachable("Implement any new match types added!");
let DiagnosticType = "UImm" # Bits # "_" # Offset;
}
+def ConstantUImm8AsmOperandClass
+ : ConstantUImmAsmOperandClass<8, []>;
def ConstantUImm6AsmOperandClass
- : ConstantUImmAsmOperandClass<6, []>;
+ : ConstantUImmAsmOperandClass<6, [ConstantUImm8AsmOperandClass]>;
def ConstantUImm5Plus32AsmOperandClass
: ConstantUImmAsmOperandClass<5, [ConstantUImm6AsmOperandClass], 32>;
def ConstantUImm5Plus32NormalizeAsmOperandClass
}
// Unsigned Operands
-foreach I = {1, 2, 3, 4, 5, 6} in
+foreach I = {1, 2, 3, 4, 5, 6, 8} in
def uimm # I : Operand<i32> {
let PrintMethod = "printUnsignedImm";
let ParserMatchClass =
let PrintMethod = "printUnsignedImm8";
}
-def uimm8 : Operand<i32> {
- let PrintMethod = "printUnsignedImm8";
-}
-
def simm5 : Operand<i32>;
def vsplat_uimm1 : Operand<vAny> {
sat_u.w $w31, $w31, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate
sat_u.d $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate
sat_u.d $w31, $w31, 64 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate
+ shf.b $w19, $w30, -1 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
+ shf.h $w17, $w8, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
+ shf.w $w14, $w3, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
sldi.b $w0, $w29[-1] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate
sldi.b $w0, $w29[16] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate
sldi.d $w4, $w12[-1] # CHECK: :[[@LINE]]:22: error: expected 1-bit unsigned immediate
sat_u.w $w31, $w31, 32 # CHECK: :[[@LINE]]:25: error: expected 5-bit unsigned immediate
sat_u.d $w31, $w31, -1 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate
sat_u.d $w31, $w31, 64 # CHECK: :[[@LINE]]:25: error: expected 6-bit unsigned immediate
+ shf.b $w19, $w30, -1 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
+ shf.b $w19, $w30, 256 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
+ shf.h $w17, $w8, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
+ shf.h $w17, $w8, 256 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
+ shf.w $w14, $w3, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
+ shf.w $w14, $w3, 256 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
sldi.b $w0, $w29[-1] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate
sldi.b $w0, $w29[16] # CHECK: :[[@LINE]]:22: error: expected 4-bit unsigned immediate
sldi.d $w4, $w12[-1] # CHECK: :[[@LINE]]:22: error: expected 1-bit unsigned immediate