summaryrefslogtreecommitdiff
path: root/target-sparc/vis_helper.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-07-03 10:42:23 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-10-23 15:09:13 +0000
commit2e2f4ade86e335ea7ffa2b5f32e3ad50619fb4e5 (patch)
tree0b752e454f81d7b63acaef2965fcd835f317ba28 /target-sparc/vis_helper.c
parent1bccec25e10e9073e21c2f71cd16a0b3ffe06c39 (diff)
downloadqemu-2e2f4ade86e335ea7ffa2b5f32e3ad50619fb4e5.tar.gz
Sparc: avoid AREG0 for float and VIS ops
Make floating point and VIS ops take a parameter for CPUState instead of relying on global env. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/vis_helper.c')
-rw-r--r--target-sparc/vis_helper.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c
index 87a86efef6..a22c10bb43 100644
--- a/target-sparc/vis_helper.c
+++ b/target-sparc/vis_helper.c
@@ -18,7 +18,6 @@
*/
#include "cpu.h"
-#include "dyngen-exec.h"
#include "helper.h"
#define DT0 (env->dt0)
@@ -34,7 +33,8 @@
#define GET_FIELD_SP(X, FROM, TO) \
GET_FIELD(X, 63 - (TO), 63 - (FROM))
-target_ulong helper_array8(target_ulong pixel_addr, target_ulong cubesize)
+target_ulong helper_array8(CPUState *env, target_ulong pixel_addr,
+ target_ulong cubesize)
{
return (GET_FIELD_SP(pixel_addr, 60, 63) << (17 + 2 * cubesize)) |
(GET_FIELD_SP(pixel_addr, 39, 39 + cubesize - 1) << (17 + cubesize)) |
@@ -47,7 +47,8 @@ target_ulong helper_array8(target_ulong pixel_addr, target_ulong cubesize)
GET_FIELD_SP(pixel_addr, 11, 12);
}
-target_ulong helper_alignaddr(target_ulong addr, target_ulong offset)
+target_ulong helper_alignaddr(CPUState *env, target_ulong addr,
+ target_ulong offset)
{
uint64_t tmp;
@@ -57,7 +58,7 @@ target_ulong helper_alignaddr(target_ulong addr, target_ulong offset)
return tmp & ~7ULL;
}
-void helper_faligndata(void)
+void helper_faligndata(CPUState *env)
{
uint64_t tmp;
@@ -101,7 +102,7 @@ typedef union {
float32 f;
} VIS32;
-void helper_fpmerge(void)
+void helper_fpmerge(CPUState *env)
{
VIS64 s, d;
@@ -121,7 +122,7 @@ void helper_fpmerge(void)
DT0 = d.d;
}
-void helper_fmul8x16(void)
+void helper_fmul8x16(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -145,7 +146,7 @@ void helper_fmul8x16(void)
DT0 = d.d;
}
-void helper_fmul8x16al(void)
+void helper_fmul8x16al(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -169,7 +170,7 @@ void helper_fmul8x16al(void)
DT0 = d.d;
}
-void helper_fmul8x16au(void)
+void helper_fmul8x16au(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -193,7 +194,7 @@ void helper_fmul8x16au(void)
DT0 = d.d;
}
-void helper_fmul8sux16(void)
+void helper_fmul8sux16(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -217,7 +218,7 @@ void helper_fmul8sux16(void)
DT0 = d.d;
}
-void helper_fmul8ulx16(void)
+void helper_fmul8ulx16(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -241,7 +242,7 @@ void helper_fmul8ulx16(void)
DT0 = d.d;
}
-void helper_fmuld8sux16(void)
+void helper_fmuld8sux16(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -264,7 +265,7 @@ void helper_fmuld8sux16(void)
DT0 = d.d;
}
-void helper_fmuld8ulx16(void)
+void helper_fmuld8ulx16(CPUState *env)
{
VIS64 s, d;
uint32_t tmp;
@@ -287,7 +288,7 @@ void helper_fmuld8ulx16(void)
DT0 = d.d;
}
-void helper_fexpand(void)
+void helper_fexpand(CPUState *env)
{
VIS32 s;
VIS64 d;
@@ -303,7 +304,7 @@ void helper_fexpand(void)
}
#define VIS_HELPER(name, F) \
- void name##16(void) \
+ void name##16(CPUState *env) \
{ \
VIS64 s, d; \
\
@@ -318,7 +319,8 @@ void helper_fexpand(void)
DT0 = d.d; \
} \
\
- uint32_t name##16s(uint32_t src1, uint32_t src2) \
+ uint32_t name##16s(CPUState *env, uint32_t src1, \
+ uint32_t src2) \
{ \
VIS32 s, d; \
\
@@ -331,7 +333,7 @@ void helper_fexpand(void)
return d.l; \
} \
\
- void name##32(void) \
+ void name##32(CPUState *env) \
{ \
VIS64 s, d; \
\
@@ -344,7 +346,8 @@ void helper_fexpand(void)
DT0 = d.d; \
} \
\
- uint32_t name##32s(uint32_t src1, uint32_t src2) \
+ uint32_t name##32s(CPUState *env, uint32_t src1, \
+ uint32_t src2) \
{ \
VIS32 s, d; \
\
@@ -362,7 +365,7 @@ VIS_HELPER(helper_fpadd, FADD)
VIS_HELPER(helper_fpsub, FSUB)
#define VIS_CMPHELPER(name, F) \
- uint64_t name##16(void) \
+ uint64_t name##16(CPUState *env) \
{ \
VIS64 s, d; \
\
@@ -378,7 +381,7 @@ VIS_HELPER(helper_fpsub, FSUB)
return d.ll; \
} \
\
- uint64_t name##32(void) \
+ uint64_t name##32(CPUState *env) \
{ \
VIS64 s, d; \
\