1 /* ARM memory operations. */
3 void helper_ld(uint32_t);
4 /* Load from address T1 into T0. */
5 #define MEM_LD_OP(name) \
6 void OPPROTO glue(op_ld##name,MEMSUFFIX)(void) \
8 T0 = glue(ld##name,MEMSUFFIX)(T1); \
20 /* Store T0 to address T1. */
21 #define MEM_ST_OP(name) \
22 void OPPROTO glue(op_st##name,MEMSUFFIX)(void) \
24 glue(st##name,MEMSUFFIX)(T1, T0); \
34 /* Swap T0 with memory at address T1. */
35 /* ??? Is this exception safe? */
36 #define MEM_SWP_OP(name, lname) \
37 void OPPROTO glue(op_swp##name,MEMSUFFIX)(void) \
41 tmp = glue(ld##lname,MEMSUFFIX)(T1); \
42 glue(st##name,MEMSUFFIX)(T1, T0); \
53 /* Load-locked, store exclusive. */
54 #define EXCLUSIVE_OP(suffix, ldsuffix) \
55 void OPPROTO glue(op_ld##suffix##ex,MEMSUFFIX)(void) \
58 helper_mark_exclusive(env, T1); \
59 T0 = glue(ld##ldsuffix,MEMSUFFIX)(T1); \
64 void OPPROTO glue(op_st##suffix##ex,MEMSUFFIX)(void) \
68 failed = helper_test_exclusive(env, T1); \
69 /* ??? Is it safe to hold the cpu lock over a store? */ \
71 glue(st##suffix,MEMSUFFIX)(T1, T0); \
84 /* Load exclusive T0:T1 from address T1. */
85 void OPPROTO
glue(op_ldqex
,MEMSUFFIX
)(void)
88 helper_mark_exclusive(env
, T1
);
89 T0
= glue(ldl
,MEMSUFFIX
)(T1
);
90 T1
= glue(ldl
,MEMSUFFIX
)((T1
+ 4));
95 /* Store exclusive T0:T2 to address T1. */
96 void OPPROTO
glue(op_stqex
,MEMSUFFIX
)(void)
100 failed
= helper_test_exclusive(env
, T1
);
101 /* ??? Is it safe to hold the cpu lock over a store? */
103 glue(stl
,MEMSUFFIX
)(T1
, T0
);
104 glue(stl
,MEMSUFFIX
)((T1
+ 4), T2
);
111 /* Floating point load/store. Address is in T1 */
112 #define VFP_MEM_OP(p, w) \
113 void OPPROTO glue(op_vfp_ld##p,MEMSUFFIX)(void) \
115 FT0##p = glue(ldf##w,MEMSUFFIX)(T1); \
118 void OPPROTO glue(op_vfp_st##p,MEMSUFFIX)(void) \
120 glue(stf##w,MEMSUFFIX)(T1, FT0##p); \
129 /* iwMMXt load/store. Address is in T1 */
130 #define MMX_MEM_OP(name, ldname) \
131 void OPPROTO glue(op_iwmmxt_ld##name,MEMSUFFIX)(void) \
133 M0 = glue(ld##ldname,MEMSUFFIX)(T1); \
136 void OPPROTO glue(op_iwmmxt_st##name,MEMSUFFIX)(void) \
138 glue(st##name,MEMSUFFIX)(T1, M0); \