aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/op_mem.h
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 19:58:11 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-23 19:58:11 +0000
commit0633879f1ac38b18d84c46dda506300cc8329723 (patch)
tree8df64e0861c32132c7a08af16451629f1ec69112 /target-m68k/op_mem.h
parent9daea9067aae3e324f14c6b139621c10683fc550 (diff)
m68k/ColdFire system emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2851 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-m68k/op_mem.h')
-rw-r--r--target-m68k/op_mem.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/target-m68k/op_mem.h b/target-m68k/op_mem.h
new file mode 100644
index 0000000000..556829f691
--- /dev/null
+++ b/target-m68k/op_mem.h
@@ -0,0 +1,46 @@
+/* Load/store ops. */
+#define MEM_LD_OP(name,suffix) \
+OP(glue(glue(ld,name),MEMSUFFIX)) \
+{ \
+ uint32_t addr = get_op(PARAM2); \
+ set_op(PARAM1, glue(glue(ld,suffix),MEMSUFFIX)(addr)); \
+ FORCE_RET(); \
+}
+
+MEM_LD_OP(8u32,ub)
+MEM_LD_OP(8s32,sb)
+MEM_LD_OP(16u32,uw)
+MEM_LD_OP(16s32,sw)
+MEM_LD_OP(32,l)
+
+#undef MEM_LD_OP
+
+#define MEM_ST_OP(name,suffix) \
+OP(glue(glue(st,name),MEMSUFFIX)) \
+{ \
+ uint32_t addr = get_op(PARAM1); \
+ glue(glue(st,suffix),MEMSUFFIX)(addr, get_op(PARAM2)); \
+ FORCE_RET(); \
+}
+
+MEM_ST_OP(8,b)
+MEM_ST_OP(16,w)
+MEM_ST_OP(32,l)
+
+#undef MEM_ST_OP
+
+OP(glue(ldf64,MEMSUFFIX))
+{
+ uint32_t addr = get_op(PARAM2);
+ set_opf64(PARAM1, glue(ldfq,MEMSUFFIX)(addr));
+ FORCE_RET();
+}
+
+OP(glue(stf64,MEMSUFFIX))
+{
+ uint32_t addr = get_op(PARAM1);
+ glue(stfq,MEMSUFFIX)(addr, get_opf64(PARAM2));
+ FORCE_RET();
+}
+
+#undef MEMSUFFIX