diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-20 18:53:08 +0100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-12-20 18:53:08 +0100 |
commit | 1d328fe60389fd4dad1103e39d9de43247fe568e (patch) | |
tree | 650ed45547a7e14d0fd5d2a48624dc746ff29b75 /clients | |
parent | deb63aa40e3de657edb426355a01fe7850cf05e9 (diff) | |
download | SLOF-1d328fe60389fd4dad1103e39d9de43247fe568e.zip SLOF-1d328fe60389fd4dad1103e39d9de43247fe568e.tar.gz SLOF-1d328fe60389fd4dad1103e39d9de43247fe568e.tar.bz2 |
Fixed assembler constraints for lwbrx and lhbrx
The biosemu on bimini had some problems with newer versions of GCC ... I saw
on a couple of websites that for lwbrx and lhbrx, the assembler constraint
"Z" should be used instead of "r". This seems to fix the hang.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/net-snk/app/biosemu/device.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/net-snk/app/biosemu/device.h b/clients/net-snk/app/biosemu/device.h index 074bd69..ce2991f 100644 --- a/clients/net-snk/app/biosemu/device.h +++ b/clients/net-snk/app/biosemu/device.h @@ -121,7 +121,8 @@ static inline uint32_t in32le(void *addr) { uint32_t val; - asm volatile ("lwbrx %0, 0, %1":"=r" (val):"r"(addr)); + const uint32_t *zaddr = addr; + asm volatile ("lwbrx %0, %y1" : "=r"(val) : "Z"(*zaddr)); return val; } @@ -135,7 +136,8 @@ static inline uint16_t in16le(void *addr) { uint16_t val; - asm volatile ("lhbrx %0, 0, %1":"=r" (val):"r"(addr)); + const uint16_t *zaddr = addr; + asm volatile ("lhbrx %0, %y1" : "=r"(val) : "Z"(*zaddr)); return val; } |