From 0ef4c3f83b044a9ed4b49f4ebc9d8480ca9aa4fe Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Fri, 21 May 2021 22:40:04 +0900 Subject: sim: h8300 Fixed different behavior in preinc/predec. * sim-main.h (h8_typecodes): Add operand type OP_REG_DEC, OP_REG_INC. * compile.c (decode): Rewrite oprand type for specific case. (fetch_1): Add handling OP_REG_DEC and OP_REG_INC. (step_once): Fix operand fetch order. --- sim/h8300/sim-main.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sim/h8300/sim-main.h') diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h index a0aa9ef..f27ba68 100644 --- a/sim/h8300/sim-main.h +++ b/sim/h8300/sim-main.h @@ -82,7 +82,9 @@ enum h8_typecodes { /* FIXME: memory indirect? */ OP_INDEXB, /* Byte index mode */ OP_INDEXW, /* Word index mode */ - OP_INDEXL /* Long index mode */ + OP_INDEXL, /* Long index mode */ + OP_REG_DEC, /* Register direct. affect address decrement. */ + OP_REG_INC, /* Register direct. affect address increment. */ }; #include "sim-basics.h" -- cgit v1.1