summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/stack_align.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/testsuite/stack_align.c b/testsuite/stack_align.c
index b2c1a69..9772332 100644
--- a/testsuite/stack_align.c
+++ b/testsuite/stack_align.c
@@ -238,14 +238,14 @@ void realign(int align)
#ifdef HAVE_GCC_ASM
#ifdef HAVE_I386
__asm__ __volatile__ (
- " sub %%ebx, %%esp\n"
+ " sub %%edi, %%esp\n"
#ifdef HAVE_SYMBOL_UNDERSCORE
" call _check_class_with_alignment\n"
#else
" call check_class_with_alignment\n"
#endif
- " add %%ebx, %%esp\n"
- :: "b" (align)
+ " add %%edi, %%esp\n"
+ :: "D" (align)
);
#endif
#ifdef HAVE_AMD64
@@ -333,6 +333,13 @@ int main (int argc, char *argv[])
oil_init ();
+#ifdef __APPLE__
+ /* the dynamic loader on MacOS/X crashes if someone unaligns the stack, so it's
+ unlikely that any code gets away with doing it. Our test code doesn't get
+ away with it either, so we'll just bail out. */
+ return 0;
+#endif
+
n = oil_class_get_n_classes ();
for (i = 0; i < n; i++) {
OilFunctionClass *klass = oil_class_get_by_index(i);