aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo/gpu.h
diff options
context:
space:
mode:
authornotaz2011-01-23 21:29:29 +0200
committernotaz2011-01-24 00:38:48 +0200
commit0d16cda294b8f4655dda849a526b336a5b46aa16 (patch)
tree722d7ff7663e71badbbc4bf3273180bcc83413de /plugins/dfxvideo/gpu.h
parent7c0f51de89955f60f5c7304ab8c4a8f8e9b7f185 (diff)
downloadpcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.tar.gz
pcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.tar.bz2
pcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.zip
fix some alignment issues
Diffstat (limited to 'plugins/dfxvideo/gpu.h')
-rw-r--r--plugins/dfxvideo/gpu.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/dfxvideo/gpu.h b/plugins/dfxvideo/gpu.h
index 740add5..b7b171e 100644
--- a/plugins/dfxvideo/gpu.h
+++ b/plugins/dfxvideo/gpu.h
@@ -104,10 +104,17 @@
#define GETLEs32(X) ((int16_t)GETLE32((uint16_t *)X))
#define GETLE16(X) LE2HOST16(*(uint16_t *)X)
-#define GETLE32(X) LE2HOST32(*(uint32_t *)X)
+#define GETLE32_(X) LE2HOST32(*(uint32_t *)X)
#define GETLE16D(X) ({uint32_t val = GETLE32(X); (val<<16 | val >> 16);})
#define PUTLE16(X, Y) do{*((uint16_t *)X)=HOST2LE16((uint16_t)Y);}while(0)
-#define PUTLE32(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0)
+#define PUTLE32_(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0)
+#ifdef __arm__
+#define GETLE32(X) (*(uint16_t *)X|(((uint16_t *)X)[1]<<16))
+#define PUTLE32(X, Y) do{*((uint16_t *)X)=(uint32_t)Y;((uint16_t *)X)[1]=(uint32_t)(Y)>>16;}while(0)
+#else
+#define GETLE32 GETLE32_
+#define PUTLE32 PUTLE32_
+#endif
/////////////////////////////////////////////////////////////////////////////