arm-asm: Improve immediate error message in asm_data_processing_opcode.

This commit is contained in:
Danny Milosavljevic 2021-01-03 15:40:44 +01:00
parent a7205f738b
commit 78d0f07e32
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5

View File

@ -643,6 +643,7 @@ static void asm_data_processing_opcode(TCCState *s1, int token)
immediate_value = ((immediate_value & 0x3FFFFFFF) << 2) | ((immediate_value & 0xC0000000) >> 30);
}
if (half_immediate_rotation >= 16) {
immediate_value = ops[2].e.v;
tcc_error("immediate value 0x%X cannot be encoded into ARM immediate", (unsigned) immediate_value);
return;
}