&& !defined(GC_HAVE_BUILTIN_BACKTRACE)
# define GC_HAVE_BUILTIN_BACKTRACE
# endif
-# if defined(__i386__) || defined(__x86_64__)
+# if defined(__i386__) || defined(__amd64__) || defined(__x86_64__)
# define GC_CAN_SAVE_CALL_STACKS
# endif
#endif /* GLIBC */
/* gcc knows how to retrieve return address, but we don't know */
/* how to generate call stacks. */
# define GC_RETURN_ADDR (GC_word)__builtin_return_address(0)
-# define GC_RETURN_ADDR_PARENT (GC_word)__builtin_return_address(1)
+# if defined(__i386__) || defined(__amd64__) \
+ || defined(__x86_64__) /* and probably others... */
+# define GC_RETURN_ADDR_PARENT (GC_word)__builtin_return_address(1)
+# endif
# else
/* Just pass 0 for gcc compatibility. */
# define GC_RETURN_ADDR 0