diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2020-02-29 11:07:13 +0100 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2020-02-29 14:28:48 +0100 |
commit | 09ba9099c1562c4af1e2f624b9aa2692e563118b (patch) | |
tree | 2ae06e83b4f993e2e2e9a01f6b1bf9c982d55fa2 /sis.h | |
parent | Avoid reserved word sparc on SPARC hosts (diff) | |
download | sis-09ba9099c1562c4af1e2f624b9aa2692e563118b.tar.bz2 |
Fix incorrect operation on big-endian hosts
Diffstat (limited to 'sis.h')
-rw-r--r-- | sis.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |