ruby-changes:68254
From: Rei <ko1@a...>
Date: Tue, 5 Oct 2021 13:10:45 +0900 (JST)
Subject: [ruby-changes:68254] 16ce578da1 (master): Enable inline assembly of SET_MACHINE_STACK_END on AIX
https://git.ruby-lang.org/ruby.git/commit/?id=16ce578da1 From 16ce578da1aee4f4a365a4010dc904bc2f3c4ff9 Mon Sep 17 00:00:00 2001 From: Rei Odaira <rodaira@u...> Date: Mon, 4 Oct 2021 23:06:43 -0500 Subject: Enable inline assembly of SET_MACHINE_STACK_END on AIX --- gc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gc.h b/gc.h index 63c60f5765..1ae7733e53 100644 --- a/gc.h +++ b/gc.h @@ -6,8 +6,10 @@ https://github.com/ruby/ruby/blob/trunk/gc.h#L6 #define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p))) #elif defined(__i386) && defined(__GNUC__) #define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p))) -#elif defined(__powerpc64__) && defined(__GNUC__) +#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && !defined(_AIX) #define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr\t%0, %%r1" : "=r" (*(p))) +#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && defined(_AIX) +#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr %0,1" : "=r" (*(p))) #elif defined(__aarch64__) && defined(__GNUC__) #define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mov\t%0, sp" : "=r" (*(p))) #else -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/