mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
use memcpy to fix use of misaligned data
This commit is contained in:
parent
f4dbf0db95
commit
48683c91a8
1 changed files with 5 additions and 1 deletions
|
@ -124,7 +124,11 @@ static char *opnames[256] = {
|
||||||
#define loadWord(addr) __lwbrx(addr,0)
|
#define loadWord(addr) __lwbrx(addr,0)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define loadWord(addr) LittleLong(*((int *)addr))
|
static inline int loadWord(void *addr) {
|
||||||
|
int word;
|
||||||
|
memcpy(&word, addr, 4);
|
||||||
|
return LittleLong(word);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *VM_Indent( vm_t *vm ) {
|
char *VM_Indent( vm_t *vm ) {
|
||||||
|
|
Loading…
Reference in a new issue