Skip to content

Commit 4bbf543

Browse files
chedahubplafosse
authored andcommitted
Fix VLE I16L-form instructions to use rD instead of rA
1 parent 251799d commit 4bbf543

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

arch/powerpc/decode/vle32.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,12 @@ static void FillOperands32Vle(Instruction* instruction, uint32_t word32, uint64_
383383
case PPC_ID_VLE_E_AND2IS:
384384
case PPC_ID_VLE_E_OR2I:
385385
case PPC_ID_VLE_E_OR2IS:
386-
case PPC_ID_VLE_E_LIS:
387386
{
388387
uint32_t ui5_15 = word32 & 0x7ff;
389388
uint32_t ui0_4 = (word32 >> 16) & 0x1f;
390389
uint32_t ui = (ui0_4 << 11) | ui5_15;
391390

392-
PushRA(instruction, word32);
391+
PushRD(instruction, word32);
393392
if (translate)
394393
PushRS(instruction, word32);
395394

@@ -399,6 +398,16 @@ static void FillOperands32Vle(Instruction* instruction, uint32_t word32, uint64_
399398
break;
400399
}
401400

401+
case PPC_ID_VLE_E_LIS:
402+
{
403+
uint32_t ui5_15 = word32 & 0x7ff;
404+
uint32_t ui0_4 = (word32 >> 16) & 0x1f;
405+
uint32_t ui = (ui0_4 << 11) | ui5_15;
406+
PushRD(instruction, word32);
407+
PushUIMMValue(instruction, ui);
408+
break;
409+
}
410+
402411
// <op>[.] rA, rS, SH
403412
case PPC_ID_VLE_E_RLWIx:
404413
case PPC_ID_VLE_E_SLWIx:

0 commit comments

Comments
 (0)