[PATCH v3 11/26] target/m68k: Use OS_UNSIZED in LEA, PEA, JMP

Richard Henderson posted 26 patches 2 months, 2 weeks ago
[PATCH v3 11/26] target/m68k: Use OS_UNSIZED in LEA, PEA, JMP
Posted by Richard Henderson 2 months, 2 weeks ago
For LEA and PEA, while the manual says "size = (long)", it also says
that the pre-decrement and post-increment addressing modes are illegal.
For JMP, the manual says "unsized".  OS_UNSIZED is the way to signal
gen_lea_mode to reject those addressing modes.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/translate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 71dfa6d9a2..c94ed8d463 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2560,7 +2560,7 @@ DISAS_INSN(lea)
     TCGv tmp;
 
     reg = AREG(insn, 9);
-    tmp = gen_lea(env, s, insn, OS_LONG);
+    tmp = gen_lea(env, s, insn, OS_UNSIZED);
     if (IS_NULL_QREG(tmp)) {
         gen_addr_fault(s);
         return;
@@ -2657,7 +2657,7 @@ DISAS_INSN(pea)
 {
     TCGv tmp;
 
-    tmp = gen_lea(env, s, insn, OS_LONG);
+    tmp = gen_lea(env, s, insn, OS_UNSIZED);
     if (IS_NULL_QREG(tmp)) {
         gen_addr_fault(s);
         return;
@@ -2908,7 +2908,7 @@ DISAS_INSN(jump)
      * Load the target address first to ensure correct exception
      * behavior.
      */
-    tmp = gen_lea(env, s, insn, OS_LONG);
+    tmp = gen_lea(env, s, insn, OS_UNSIZED);
     if (IS_NULL_QREG(tmp)) {
         gen_addr_fault(s);
         return;
-- 
2.43.0