root / target-m68k / op_mem.h @ 89fc88da
History | View | Annotate | Download (877 Bytes)
1 | 0633879f | pbrook | /* Load/store ops. */
|
---|---|---|---|
2 | 0633879f | pbrook | #define MEM_LD_OP(name,suffix) \
|
3 | 0633879f | pbrook | OP(glue(glue(ld,name),MEMSUFFIX)) \ |
4 | 0633879f | pbrook | { \ |
5 | 0633879f | pbrook | uint32_t addr = get_op(PARAM2); \ |
6 | 0633879f | pbrook | set_op(PARAM1, glue(glue(ld,suffix),MEMSUFFIX)(addr)); \ |
7 | 0633879f | pbrook | FORCE_RET(); \ |
8 | 0633879f | pbrook | } |
9 | 0633879f | pbrook | |
10 | 0633879f | pbrook | MEM_LD_OP(8u32,ub)
|
11 | 0633879f | pbrook | MEM_LD_OP(8s32,sb)
|
12 | 0633879f | pbrook | MEM_LD_OP(16u32,uw)
|
13 | 0633879f | pbrook | MEM_LD_OP(16s32,sw)
|
14 | 0633879f | pbrook | MEM_LD_OP(32,l)
|
15 | 0633879f | pbrook | |
16 | 0633879f | pbrook | #undef MEM_LD_OP
|
17 | 0633879f | pbrook | |
18 | 0633879f | pbrook | #define MEM_ST_OP(name,suffix) \
|
19 | 0633879f | pbrook | OP(glue(glue(st,name),MEMSUFFIX)) \ |
20 | 0633879f | pbrook | { \ |
21 | 0633879f | pbrook | uint32_t addr = get_op(PARAM1); \ |
22 | 0633879f | pbrook | glue(glue(st,suffix),MEMSUFFIX)(addr, get_op(PARAM2)); \ |
23 | 0633879f | pbrook | FORCE_RET(); \ |
24 | 0633879f | pbrook | } |
25 | 0633879f | pbrook | |
26 | 0633879f | pbrook | MEM_ST_OP(8,b)
|
27 | 0633879f | pbrook | MEM_ST_OP(16,w)
|
28 | 0633879f | pbrook | MEM_ST_OP(32,l)
|
29 | 0633879f | pbrook | |
30 | 0633879f | pbrook | #undef MEM_ST_OP
|
31 | 0633879f | pbrook | |
32 | 0633879f | pbrook | OP(glue(ldf64,MEMSUFFIX)) |
33 | 0633879f | pbrook | { |
34 | 0633879f | pbrook | uint32_t addr = get_op(PARAM2); |
35 | 0633879f | pbrook | set_opf64(PARAM1, glue(ldfq,MEMSUFFIX)(addr)); |
36 | 0633879f | pbrook | FORCE_RET(); |
37 | 0633879f | pbrook | } |
38 | 0633879f | pbrook | |
39 | 0633879f | pbrook | OP(glue(stf64,MEMSUFFIX)) |
40 | 0633879f | pbrook | { |
41 | 0633879f | pbrook | uint32_t addr = get_op(PARAM1); |
42 | 0633879f | pbrook | glue(stfq,MEMSUFFIX)(addr, get_opf64(PARAM2)); |
43 | 0633879f | pbrook | FORCE_RET(); |
44 | 0633879f | pbrook | } |
45 | 0633879f | pbrook | |
46 | 0633879f | pbrook | #undef MEMSUFFIX |