From fb30922cd1d016493ba9bdd1d72aa8ef3295b2ad Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 9 Mar 2021 18:11:53 -0500 Subject: [PATCH] thumb32: Add supporting decoder entry for PLD (literal) LDRH (literal)'s pseduocode indicates that cases where Rt specifies the PC, that the instruction should be execured as if it were a PLD instruction. Curiously, however, within the ARM reference manual, the encodings in the case that happens doesn't match up. The bit pattern for LDRH (literal) has bit 21 set to 1, but the encoding of PLD (literal) has bit 21 set to zero for it's only thumb encoding. --- src/frontend/A32/decoder/thumb32.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/A32/decoder/thumb32.inc b/src/frontend/A32/decoder/thumb32.inc index 18e17de4..bf2bc56a 100644 --- a/src/frontend/A32/decoder/thumb32.inc +++ b/src/frontend/A32/decoder/thumb32.inc @@ -142,6 +142,7 @@ INST(thumb32_STR_reg, "STR (reg)", "111110000100nnnntttt00 // Load Byte and Memory Hints INST(thumb32_PLD_lit, "PLD (lit)", "11111000U00111111111iiiiiiiiiiii") +INST(thumb32_PLD_lit, "PLD (lit)", "11111000U01111111111iiiiiiiiiiii") INST(thumb32_PLD_reg, "PLD (reg)", "1111100000W1nnnn1111000000iimmmm") INST(thumb32_PLD_imm8, "PLD (imm8)", "1111100000W1nnnn11111100iiiiiiii") INST(thumb32_PLD_imm12, "PLD (imm12)", "1111100010W1nnnn1111iiiiiiiiiiii")