Fix Bug in handling wide moves shift scalar

This commit is contained in:
sBubshait 2024-06-14 02:01:40 +01:00
parent f3e1c1f150
commit d1815c0cce

View File

@ -85,8 +85,8 @@ word encodeDPImmediate(a64inst_instruction inst) {
// if wide move
else {
setBits(&wrd, 23, 26, 0x5); //opi
// TODO: Check the following line, is it shiftScalar?:
setBits(&wrd, 21, 23, (data.processOpData.wideMovData.shiftScalar == 12)); // hw
uint8_t hw = data.processOpData.wideMovData.shiftScalar / 16;
setBits(&wrd, 21, 23, hw); // hw
setBits(&wrd, 5, 21, data.processOpData.wideMovData.immediate); // imm16
}