@@ -1532,45 +1532,15 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
15321532 if (isRV64 ())
15331533 return generateImmOutOfRangeError (Operands, ErrorInfo, 1 , (1 << 6 ) - 1 );
15341534 return generateImmOutOfRangeError (Operands, ErrorInfo, 1 , (1 << 5 ) - 1 );
1535- case Match_InvalidUImm1:
1536- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 1 ) - 1 );
1537- case Match_InvalidUImm2:
1538- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 2 ) - 1 );
15391535 case Match_InvalidUImm2Lsb0:
15401536 return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , 2 ,
15411537 " immediate must be one of" );
1542- case Match_InvalidUImm3:
1543- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 3 ) - 1 );
1544- case Match_InvalidUImm4:
1545- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 4 ) - 1 );
1546- case Match_InvalidUImm5:
1547- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 5 ) - 1 );
15481538 case Match_InvalidUImm5NonZero:
15491539 return generateImmOutOfRangeError (Operands, ErrorInfo, 1 , (1 << 5 ) - 1 );
15501540 case Match_InvalidUImm5GT3:
15511541 return generateImmOutOfRangeError (Operands, ErrorInfo, 4 , (1 << 5 ) - 1 );
1552- case Match_InvalidUImm6:
1553- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 6 ) - 1 );
1554- case Match_InvalidUImm7:
1555- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 7 ) - 1 );
1556- case Match_InvalidUImm8:
1557- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 8 ) - 1 );
15581542 case Match_InvalidUImm8GE32:
15591543 return generateImmOutOfRangeError (Operands, ErrorInfo, 32 , (1 << 8 ) - 1 );
1560- case Match_InvalidSImm5:
1561- return generateImmOutOfRangeError (Operands, ErrorInfo, -(1 << 4 ),
1562- (1 << 4 ) - 1 );
1563- case Match_InvalidSImm6:
1564- return generateImmOutOfRangeError (Operands, ErrorInfo, -(1 << 5 ),
1565- (1 << 5 ) - 1 );
1566- case Match_InvalidSImm6NonZero:
1567- return generateImmOutOfRangeError (
1568- Operands, ErrorInfo, -(1 << 5 ), (1 << 5 ) - 1 ,
1569- " immediate must be non-zero in the range" );
1570- case Match_InvalidCLUIImm:
1571- return generateImmOutOfRangeError (
1572- Operands, ErrorInfo, 1 , (1 << 5 ) - 1 ,
1573- " immediate must be in [0xfffe0, 0xfffff] or" );
15741544 case Match_InvalidUImm5Lsb0:
15751545 return generateImmOutOfRangeError (
15761546 Operands, ErrorInfo, 0 , (1 << 5 ) - 2 ,
@@ -1607,10 +1577,6 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
16071577 return generateImmOutOfRangeError (
16081578 Operands, ErrorInfo, -(1 << 9 ), (1 << 9 ) - 16 ,
16091579 " immediate must be a multiple of 16 bytes and non-zero in the range" );
1610- case Match_InvalidUImm10:
1611- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 10 ) - 1 );
1612- case Match_InvalidUImm11:
1613- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 11 ) - 1 );
16141580 case Match_InvalidSImm12:
16151581 return generateImmOutOfRangeError (
16161582 Operands, ErrorInfo, -(1 << 11 ), (1 << 11 ) - 1 ,
@@ -1633,8 +1599,6 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
16331599 " operand must be a symbol with "
16341600 " %hi/%tprel_hi modifier or an integer in "
16351601 " the range" );
1636- case Match_InvalidUImm20:
1637- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 20 ) - 1 );
16381602 case Match_InvalidUImm20AUIPC:
16391603 return generateImmOutOfRangeError (
16401604 Operands, ErrorInfo, 0 , (1 << 20 ) - 1 ,
@@ -1645,11 +1609,6 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
16451609 return generateImmOutOfRangeError (
16461610 Operands, ErrorInfo, -(1 << 20 ), (1 << 20 ) - 2 ,
16471611 " immediate must be a multiple of 2 bytes in the range" );
1648- case Match_InvalidCSRSystemRegister: {
1649- return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , (1 << 12 ) - 1 ,
1650- " operand must be a valid system register "
1651- " name or an integer in the range" );
1652- }
16531612 case Match_InvalidVTypeI: {
16541613 SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc ();
16551614 return generateVTypeError (ErrorLoc);
@@ -1659,9 +1618,6 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
16591618 (1 << 4 ),
16601619 " immediate must be in the range" );
16611620 }
1662- case Match_InvalidSImm26:
1663- return generateImmOutOfRangeError (Operands, ErrorInfo, -(1 << 25 ),
1664- (1 << 25 ) - 1 );
16651621 case Match_InvalidRnumArg: {
16661622 return generateImmOutOfRangeError (Operands, ErrorInfo, 0 , 10 );
16671623 }
0 commit comments