summaryrefslogtreecommitdiffstats
path: root/sis.h
diff options
context:
space:
mode:
authorJiri Gaisler <jiri@gaisler.se>2020-02-29 11:07:13 +0100
committerJiri Gaisler <jiri@gaisler.se>2020-02-29 14:28:48 +0100
commit09ba9099c1562c4af1e2f624b9aa2692e563118b (patch)
tree2ae06e83b4f993e2e2e9a01f6b1bf9c982d55fa2 /sis.h
parentAvoid reserved word sparc on SPARC hosts (diff)
downloadsis-09ba9099c1562c4af1e2f624b9aa2692e563118b.tar.bz2
Fix incorrect operation on big-endian hosts
Diffstat (limited to 'sis.h')
-rw-r--r--sis.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sis.h b/sis.h
index d4d6f6a..35797e4 100644
--- a/sis.h
+++ b/sis.h
@@ -21,6 +21,8 @@
#endif
#define VAL(x) strtoul(x,(char **)NULL,0)
+#define SWAP_UINT16(x) (((x) >> 8) | ((x) << 8))
+#define SWAP_UINT32(x) (((x) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | ((x) << 24))
#define I_ACC_EXC 1
#define NWIN 8
@@ -179,7 +181,7 @@ struct evcell
struct cpu_arch
{
- int endian;
+ int bswap;
int (*dispatch_instruction) (struct pstate * sregs);
int (*execute_trap) (struct pstate * sregs);
int (*check_interrupts) (struct pstate * sregs);