@@ -1,9 +1,12 @@
.global dumpregs
.global myfunc
+ .global main.myfunc
.type dumpregs,%function
.type myfunc,%function
+ .type main.myfunc,%function
dumpregs:
myfunc:
+main.myfunc:
mov x16, sp
mov x17, sp
sub sp, sp, 352 // 336 for registers and 16 for old sp and lr
new file mode 100644
@@ -0,0 +1,9 @@
+package main
+
+func myfunc(e [2]int64)
+
+func main() {
+ myfunc([2]int64{40, 50})
+}
+
+
new file mode 100755
@@ -0,0 +1,11 @@
+#!/bin/sh
+GCC=${GCC:-gcc}
+AARCH64HOST=${AARCH64HOST:-localhost}
+
+set -x
+
+${GCC}go -g -c test_array.go -o test_array.o
+${GCC} -g -c abitest.S -o abitest.o
+${GCC} -g -c test_array_c.c -o test_array_c.o
+${GCC}go -g abitest.o test_array.o test_array_c.o -o test_array
+scp ./test_array ${AARCH64HOST}: && ssh ${AARCH64HOST} ./test_array
new file mode 100644
@@ -0,0 +1,19 @@
+int which_kind_of_test = 0;
+
+#include "abitest-common.h"
+
+void
+testfunc (char *stack)
+{
+ {
+ long __x = 40;
+ if (memcmp (&__x, stack + X0, sizeof (long)) != 0)
+ abort ();
+ }
+ {
+ long __x = 50;
+ if (memcmp (&__x, stack + X1, sizeof (long)) != 0)
+ abort ();
+ }
+ return;
+}