1 void glue(do_lsw
, MEMSUFFIX
) (int dst
)
8 fprintf(logfile
, "%s: addr=0x%08x count=%d reg=%d\n",
9 __func__
, T0
, T1
, dst
);
12 for (; T1
> 3; T1
-= 4, T0
+= 4) {
13 ugpr(dst
++) = glue(ldl
, MEMSUFFIX
)(T0
);
19 for (sh
= 24; T1
> 0; T1
--, T0
++, sh
-= 8) {
20 tmp
|= glue(ldub
, MEMSUFFIX
)(T0
) << sh
;
26 void glue(do_stsw
, MEMSUFFIX
) (int src
)
32 fprintf(logfile
, "%s: addr=0x%08x count=%d reg=%d\n",
33 __func__
, T0
, T1
, src
);
36 for (; T1
> 3; T1
-= 4, T0
+= 4) {
37 glue(stl
, MEMSUFFIX
)(T0
, ugpr(src
++));
42 for (sh
= 24; T1
> 0; T1
--, T0
++, sh
-= 8)
43 glue(stb
, MEMSUFFIX
)(T0
, (ugpr(src
) >> sh
) & 0xFF);
47 void glue(do_lsw_le
, MEMSUFFIX
) (int dst
)
54 fprintf(logfile
, "%s: addr=0x%08x count=%d reg=%d\n",
55 __func__
, T0
, T1
, dst
);
58 for (; T1
> 3; T1
-= 4, T0
+= 4) {
59 tmp
= glue(ldl
, MEMSUFFIX
)(T0
);
60 ugpr(dst
++) = ((tmp
& 0xFF000000) >> 24) | ((tmp
& 0x00FF0000) >> 8) |
61 ((tmp
& 0x0000FF00) << 8) | ((tmp
& 0x000000FF) << 24);
67 for (sh
= 0; T1
> 0; T1
--, T0
++, sh
+= 8) {
68 tmp
|= glue(ldub
, MEMSUFFIX
)(T0
) << sh
;
74 void glue(do_stsw_le
, MEMSUFFIX
) (int src
)
81 fprintf(logfile
, "%s: addr=0x%08x count=%d reg=%d\n",
82 __func__
, T0
, T1
, src
);
85 for (; T1
> 3; T1
-= 4, T0
+= 4) {
86 tmp
= ((ugpr(src
++) & 0xFF000000) >> 24);
87 tmp
|= ((ugpr(src
++) & 0x00FF0000) >> 8);
88 tmp
|= ((ugpr(src
++) & 0x0000FF00) << 8);
89 tmp
|= ((ugpr(src
++) & 0x000000FF) << 24);
90 glue(stl
, MEMSUFFIX
)(T0
, tmp
);
95 for (sh
= 0; T1
> 0; T1
--, T0
++, sh
+= 8)
96 glue(stb
, MEMSUFFIX
)(T0
, (ugpr(src
) >> sh
) & 0xFF);