Skip to content

Commit

Permalink
Also test passing FP arguments on stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
yugr committed Mar 29, 2024
1 parent fc3b149 commit 5a3742d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/stack-args/interposed.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,23 @@ void foo(int x0, int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8,
printf("%d ", x14);
printf("%d\n", x15);
}

__attribute__((visibility("default")))
void bar(float x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, float x9, float x10, float x11, float x12, float x13, float x14, float x15) {
printf("%g ", x0);
printf("%g ", x1);
printf("%g ", x2);
printf("%g ", x3);
printf("%g ", x4);
printf("%g ", x5);
printf("%g ", x6);
printf("%g ", x7);
printf("%g ", x8);
printf("%g ", x9);
printf("%g ", x10);
printf("%g ", x11);
printf("%g ", x12);
printf("%g ", x13);
printf("%g ", x14);
printf("%g\n", x15);
}
1 change: 1 addition & 0 deletions tests/stack-args/interposed.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
#define INTERPOSED_H

extern void foo(int x0, int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, int x10, int x11, int x12, int x13, int x14, int x15);
extern void bar(float x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, float x9, float x10, float x11, float x12, float x13, float x14, float x15);

#endif
1 change: 1 addition & 0 deletions tests/stack-args/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@

int main() {
foo(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
bar(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
return 0;
}
1 change: 1 addition & 0 deletions tests/stack-args/test.ref
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 comments on commit 5a3742d

Please sign in to comment.