summaryrefslogtreecommitdiff
path: root/vm_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_exec.c')
-rw-r--r--vm_exec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm_exec.c b/vm_exec.c
index 3a29136..330d35a 100644
--- a/vm_exec.c
+++ b/vm_exec.c
@@ -24,6 +24,9 @@ static void vm_analysis_insn(int insn);
#elif defined(__GNUC__) && defined(__i386__)
#define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("e" reg)
+#elif defined(__GNUC__) && defined(__powerpc64__)
+#define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("r" reg)
+
#else
#define DECL_SC_REG(type, r, reg) register type reg_##r
#endif
@@ -70,6 +73,11 @@ vm_exec_core(rb_thread_t *th, VALUE initial)
# endif
#define USE_MACHINE_REGS 1
+#elif defined(__GNUC__) && defined(__powerpc64__)
+ DECL_SC_REG(VALUE *, pc, "14");
+ DECL_SC_REG(rb_control_frame_t *, cfp, "15");
+#define USE_MACHINE_REGS 1
+
#else
register rb_control_frame_t *reg_cfp;
VALUE *reg_pc;