From 9b285ff003b2c65aac18836ef764e6b147d21f12 Mon Sep 17 00:00:00 2001 From: chedahub <2017000029@ushs.hs.kr> Date: Sat, 1 Nov 2025 21:11:12 +0900 Subject: Fix PPCVLE I16L-form immediate decoding: use 5-bit mask for ui0_4 --- arch/powerpc/decode/vle32.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/decode/vle32.c b/arch/powerpc/decode/vle32.c index 7f87689d..3b67184c 100644 --- a/arch/powerpc/decode/vle32.c +++ b/arch/powerpc/decode/vle32.c @@ -383,9 +383,10 @@ static void FillOperands32Vle(Instruction* instruction, uint32_t word32, uint64_ case PPC_ID_VLE_E_AND2IS: case PPC_ID_VLE_E_OR2I: case PPC_ID_VLE_E_OR2IS: + case PPC_ID_VLE_E_LIS: { uint32_t ui5_15 = word32 & 0x7ff; - uint32_t ui0_4 = (word32 >> 16) & 0xf; + uint32_t ui0_4 = (word32 >> 16) & 0x1f; uint32_t ui = (ui0_4 << 11) | ui5_15; PushRA(instruction, word32); @@ -622,11 +623,6 @@ static void FillOperands32Vle(Instruction* instruction, uint32_t word32, uint64_ break; } - case PPC_ID_VLE_E_LIS: - PushRD(instruction, word32); - PushUIMMValue(instruction, ui_split16); - break; - case PPC_ID_VLE_E_MCRF: PushCRFD(instruction, word32); PushCRFS(instruction, word32); -- cgit v1.3.1