Statistics
| Branch: | Revision:

root / target-m68k / op_mem.h @ 0633879f

History | View | Annotate | Download (877 Bytes)

1
/* Load/store ops.  */
2
#define MEM_LD_OP(name,suffix) \
3
OP(glue(glue(ld,name),MEMSUFFIX)) \
4
{ \
5
    uint32_t addr = get_op(PARAM2); \
6
    set_op(PARAM1, glue(glue(ld,suffix),MEMSUFFIX)(addr)); \
7
    FORCE_RET(); \
8
}
9

    
10
MEM_LD_OP(8u32,ub)
11
MEM_LD_OP(8s32,sb)
12
MEM_LD_OP(16u32,uw)
13
MEM_LD_OP(16s32,sw)
14
MEM_LD_OP(32,l)
15

    
16
#undef MEM_LD_OP
17

    
18
#define MEM_ST_OP(name,suffix) \
19
OP(glue(glue(st,name),MEMSUFFIX)) \
20
{ \
21
    uint32_t addr = get_op(PARAM1); \
22
    glue(glue(st,suffix),MEMSUFFIX)(addr, get_op(PARAM2)); \
23
    FORCE_RET(); \
24
}
25

    
26
MEM_ST_OP(8,b)
27
MEM_ST_OP(16,w)
28
MEM_ST_OP(32,l)
29

    
30
#undef MEM_ST_OP
31

    
32
OP(glue(ldf64,MEMSUFFIX))
33
{
34
    uint32_t addr = get_op(PARAM2);
35
    set_opf64(PARAM1, glue(ldfq,MEMSUFFIX)(addr));
36
    FORCE_RET();
37
}
38

    
39
OP(glue(stf64,MEMSUFFIX))
40
{
41
    uint32_t addr = get_op(PARAM1);
42
    glue(stfq,MEMSUFFIX)(addr, get_opf64(PARAM2));
43
    FORCE_RET();
44
}
45

    
46
#undef MEMSUFFIX