diff options
Diffstat (limited to 'gdb/spu-tdep.h')
-rw-r--r-- | gdb/spu-tdep.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/spu-tdep.h b/gdb/spu-tdep.h index 4c75be5..3be1453 100644 --- a/gdb/spu-tdep.h +++ b/gdb/spu-tdep.h @@ -50,4 +50,12 @@ enum spu_regnum /* Local store. */ #define SPU_LS_SIZE 0x40000 +/* Address conversions. */ +#define SPUADDR(spu, addr) \ + ((spu) != -1? (ULONGEST)1 << 63 | (ULONGEST)(spu) << 32 | (addr) : (addr)) +#define SPUADDR_SPU(addr) \ + (((addr) & (ULONGEST)1 << 63)? (ULONGEST)(addr) >> 32 & 0x7fffffff : -1) +#define SPUADDR_ADDR(addr) \ + (((addr) & (ULONGEST)1 << 63)? (ULONGEST)(addr) & 0xffffffff : (addr)) + #endif |