The patch attached changes x86 -> stack and ppc -> register in the
relevant files. I have tested it successfully in a 'stack' environment
(Linux x86) but don't have a 'register' environment in which to test it.
Can someone please help out here? I would then apply it to trunk.
kid51
Index: config/auto/va_ptr/test_c.in
===================================================================
--- config/auto/va_ptr/test_c.in (revision 22794)
+++ config/auto/va_ptr/test_c.in (working copy)
@@ -1,10 +1,10 @@
#include <stdio.h>
#include <stdarg.h>
-#if defined VA_TYPE_PPC
+#if defined VA_TYPE_REGISTER
# define PARROT_VA_TO_VAPTR(x) (x)
#endif
-#if defined VA_TYPE_X86
+#if defined VA_TYPE_STACK
# define PARROT_VA_TO_VAPTR(x) (&(x))
#endif
Index: config/auto/va_ptr.pm
===================================================================
--- config/auto/va_ptr.pm (revision 22794)
+++ config/auto/va_ptr.pm (working copy)
@@ -35,17 +35,17 @@
my $va_type;
cc_gen('config/auto/va_ptr/test_c.in');
- eval { cc_build('-DVA_TYPE_X86'); };
+ eval { cc_build('-DVA_TYPE_STACK'); };
if ( $@ || cc_run() !~ /^ok/ ) {
- eval { cc_build('-DVA_TYPE_PPC'); };
+ eval { cc_build('-DVA_TYPE_REGISTER'); };
if ( $@ || cc_run() !~ /^ok/ ) {
die "Unknown va_ptr type";
}
- $va_type = 'ppc';
+ $va_type = 'register';
}
else {
- $va_type = 'x86';
+ $va_type = 'stack';
}
cc_clean();
$self->set_result($va_type);
Index: config/gen/config_h/feature_h.in
===================================================================
--- config/gen/config_h/feature_h.in (revision 22794)
+++ config/gen/config_h/feature_h.in (working copy)
@@ -73,13 +73,13 @@
/* from config/auto/va_ptr.pm: va_ptr_type => $va_result */
END_PRINT
-if (@va_ptr_type@ eq 'ppc') {
+if (@va_ptr_type@ eq 'register') {
print OUT <<'END_PRINT';
/* if defined __powerpc__ || defined __x86_64__ || defined __s390__ */
# define PARROT_VA_TO_VAPTR(x) (x)
END_PRINT
}
-if (@va_ptr_type@ eq 'x86') {
+if (@va_ptr_type@ eq 'stack') {
print OUT <<'END_PRINT';
# define PARROT_VA_TO_VAPTR(x) (&(x))
END_PRINT