diff options
Diffstat (limited to 'src/base/elfcore.h')
-rw-r--r-- | src/base/elfcore.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/base/elfcore.h b/src/base/elfcore.h index 34a96de..122fbb1 100644 --- a/src/base/elfcore.h +++ b/src/base/elfcore.h @@ -37,11 +37,11 @@ extern "C" { #endif -/* We currently only support x86-32, x86-64, ARM, and MIPS on Linux. +/* We currently only support x86-32, x86-64, ARM, MIPS, PPC on Linux. * Porting to other related platforms should not be difficult. */ #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ - defined(__mips__)) && defined(__linux) + defined(__mips__) || defined(__PPC__)) && defined(__linux) #include <stdarg.h> #include <stdint.h> @@ -108,6 +108,21 @@ extern "C" { unsigned long cp0_cause; unsigned long unused; } mips_regs; +#elif defined (__PPC__) + typedef struct ppc_regs { + #define SP uregs[1] /* Stack pointer */ + #define IP rip /* Program counter */ + #define LR lr /* Link register */ + unsigned long uregs[32]; /* General Purpose Registers - r0-r31. */ + double fpr[32]; /* Floating-Point Registers - f0-f31. */ + unsigned long rip; /* Program counter. */ + unsigned long msr; + unsigned long ccr; + unsigned long lr; + unsigned long ctr; + unsigned long xeq; + unsigned long mq; + } ppc_regs; #endif #if defined(__i386__) && defined(__GNUC__) |