summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-11-21 20:06:06 +0000
committerJens Arnold <amiconn@rockbox.org>2006-11-21 20:06:06 +0000
commit210fb6ac44c579c9a19839f613ec351ca45e925e (patch)
tree459776200806a088d4f91b6788258a3d1b0d96a4 /tools
parent4a82f81f79ddb921328cd88fde8579fbd11b89e8 (diff)
downloadrockbox-210fb6ac44c579c9a19839f613ec351ca45e925e.tar.gz
rockbox-210fb6ac44c579c9a19839f613ec351ca45e925e.tar.bz2
rockbox-210fb6ac44c579c9a19839f613ec351ca45e925e.zip
Fix sh2d to work properly on non-32bit hosts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11565 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/sh2d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/sh2d.c b/tools/sh2d.c
index aee69d324e..cb78df840e 100644
--- a/tools/sh2d.c
+++ b/tools/sh2d.c
@@ -8,6 +8,7 @@
*/
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -441,7 +442,7 @@ void SH2Disasm(unsigned v_addr, unsigned char *p_addr, int mode, char *m_addr)
}
else /* .L */
{
- unsigned char *b_addr = (unsigned char *)((int)p_addr & 0xfffffffc);
+ unsigned char *b_addr = (unsigned char *)((intptr_t)p_addr & ~3);
int dat = (unsigned int) (*(imm + b_addr) << 24) | (*(imm + b_addr + 1) << 16)
| (*(imm + b_addr + 2) << 8) | *(imm + b_addr + 3) ;
/* SH-1 register name lookup */