@@ -28,7 +28,6 @@ static unsigned getLoadImmediateOpcode(unsigned RegBitWidth) {
2828// Generates instruction to load an immediate value into a register.
2929static MCInst loadImmediate (MCRegister Reg, unsigned RegBitWidth,
3030 const APInt &Value) {
31- // 0 <= Value.getZExtValue() < 2**16
3231 assert (Value.getZExtValue () < (1 << 16 ) &&
3332 " Value must be in the range of the immediate opcode" );
3433 return MCInstBuilder (getLoadImmediateOpcode (RegBitWidth))
@@ -38,7 +37,6 @@ static MCInst loadImmediate(MCRegister Reg, unsigned RegBitWidth,
3837
3938static MCInst loadZPRImmediate (MCRegister Reg, unsigned RegBitWidth,
4039 const APInt &Value) {
41- // -127 <= Value.getZExtValue() < 128
4240 assert (Value.getZExtValue () < (1 << 7 ) &&
4341 " Value must be in the range of the immediate opcode" );
4442 return MCInstBuilder (AArch64::DUP_ZI_D)
@@ -69,12 +67,8 @@ static unsigned getLoadFPImmediateOpcode(unsigned RegBitWidth) {
6967// Generates instruction to load an FP immediate value into a register.
7068static MCInst loadFPImmediate (MCRegister Reg, unsigned RegBitWidth,
7169 const APInt &Value) {
72- // 0 <= Value.getZExtValue() < 2**8 (int Value)
73- // -31.0 <= Value.getZExtValue() < 31.0 (frac Value)
7470 assert (Value.getZExtValue () == 0 &&
75- " Value should be zero, temporary fix for now" );
76- assert (Value.getZExtValue () < (1 << 8 ) &&
77- " Value must be in the range of the immediate opcode" );
71+ " Expected initialisation value 0" );
7872 return MCInstBuilder (getLoadFPImmediateOpcode (RegBitWidth))
7973 .addReg (Reg)
8074 .addImm (Value.getZExtValue ());
0 commit comments