[Git][ghc/ghc][master] CCallConv test: Align argument types
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Oct 7 23:27:56 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00
CCallConv test: Align argument types
The C calling convention / standard requires that arguments and their
values are of the same type.
- - - - -
3 changed files:
- testsuite/tests/codeGen/should_run/CCallConv.stdout
- testsuite/tests/codeGen/should_run/CCallConv_c.c
- testsuite/tests/codeGen/should_run/all.T
Changes:
=====================================
testsuite/tests/codeGen/should_run/CCallConv.stdout
=====================================
@@ -7,8 +7,8 @@ a4: 0xffffffff -1
a5: 0xffffffff -1
a6: 0xffffffff -1
a7: 0xffffffff -1
-s0: 0xffffffff -1
-s1: 0xff 255
+s0: 0xff 255
+s1: 0xffffffff -1
"fun8 result:502"
fun16:
a0: 0xffffffff -1
@@ -19,8 +19,8 @@ a4: 0xffffffff -1
a5: 0xffffffff -1
a6: 0xffffffff -1
a7: 0xffffffff -1
-s0: 0xffffffff -1
-s1: 0xffff 65535
+s0: 0xffff 65535
+s1: 0xffffffff -1
"fun16 result:131062"
fun32:
a0: 0xffffffff -1
@@ -31,8 +31,8 @@ a4: 0xffffffff -1
a5: 0xffffffff -1
a6: 0xffffffff -1
a7: 0xffffffff -1
-s0: 0xffffffff -1
-s1: 0xffffffff 4294967295
+s0: 0xffffffff 4294967295
+s1: 0xffffffff -1
"fun32 result:8589934582"
funFloat:
a0: 1.000000
=====================================
testsuite/tests/codeGen/should_run/CCallConv_c.c
=====================================
@@ -2,7 +2,7 @@
#include <stdio.h>
int64_t fun8(int8_t a0, uint8_t a1, int8_t a2, int8_t a3, int8_t a4, int8_t a5,
- int8_t a6, int8_t a7, int8_t s0, uint8_t s1) {
+ int8_t a6, int8_t a7, uint8_t s0, int8_t s1) {
printf("fun8:\n");
printf("a0: %#x %hhd\n", a0, a0);
printf("a1: %#x %hhu\n", a1, a1);
@@ -12,8 +12,8 @@ int64_t fun8(int8_t a0, uint8_t a1, int8_t a2, int8_t a3, int8_t a4, int8_t a5,
printf("a5: %#x %hhd\n", a5, a5);
printf("a6: %#x %hhd\n", a6, a6);
printf("a7: %#x %hhd\n", a7, a7);
- printf("s0: %#x %hhd\n", s0, s0);
- printf("s1: %#x %hhu\n", s1, s1);
+ printf("s0: %#x %hhu\n", s0, s0);
+ printf("s1: %#x %hhd\n", s1, s1);
fflush(stdout);
@@ -21,7 +21,7 @@ int64_t fun8(int8_t a0, uint8_t a1, int8_t a2, int8_t a3, int8_t a4, int8_t a5,
}
int64_t fun16(int16_t a0, uint16_t a1, int16_t a2, int16_t a3, int16_t a4,
- int16_t a5, int16_t a6, int16_t a7, int16_t s0, uint16_t s1) {
+ int16_t a5, int16_t a6, int16_t a7, uint16_t s0, int16_t s1) {
printf("fun16:\n");
printf("a0: %#x %hd\n", a0, a0);
printf("a1: %#x %hu\n", a1, a1);
@@ -31,8 +31,8 @@ int64_t fun16(int16_t a0, uint16_t a1, int16_t a2, int16_t a3, int16_t a4,
printf("a5: %#x %hd\n", a5, a5);
printf("a6: %#x %hd\n", a6, a6);
printf("a7: %#x %hd\n", a7, a7);
- printf("s0: %#x %hd\n", s0, s0);
- printf("s1: %#x %hu\n", s1, s1);
+ printf("s0: %#x %hu\n", s0, s0);
+ printf("s1: %#x %hd\n", s1, s1);
fflush(stdout);
@@ -40,7 +40,7 @@ int64_t fun16(int16_t a0, uint16_t a1, int16_t a2, int16_t a3, int16_t a4,
}
int64_t fun32(int32_t a0, uint32_t a1, int32_t a2, int32_t a3, int32_t a4,
- int32_t a5, int32_t a6, int32_t a7, int32_t s0, uint32_t s1) {
+ int32_t a5, int32_t a6, int32_t a7, uint32_t s0, int32_t s1) {
printf("fun32:\n");
printf("a0: %#x %d\n", a0, a0);
printf("a1: %#x %u\n", a1, a1);
@@ -50,8 +50,8 @@ int64_t fun32(int32_t a0, uint32_t a1, int32_t a2, int32_t a3, int32_t a4,
printf("a5: %#x %d\n", a5, a5);
printf("a6: %#x %d\n", a6, a6);
printf("a7: %#x %d\n", a7, a7);
- printf("s0: %#x %d\n", s0, s0);
- printf("s1: %#x %u\n", s1, s1);
+ printf("s0: %#x %u\n", s0, s0);
+ printf("s1: %#x %d\n", s1, s1);
fflush(stdout);
=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -251,4 +251,4 @@ test('T23034', req_c, compile_and_run, ['-O2 T23034_c.c'])
test('T24700', normal, compile_and_run, ['-O'])
test('T24893', normal, compile_and_run, ['-O'])
-test('CCallConv', [req_c, when(arch('wasm32'), fragile(25249))], compile_and_run, ['CCallConv_c.c'])
+test('CCallConv', [req_c], compile_and_run, ['CCallConv_c.c'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5fd320da57bb52458bb1e8c14c5311129d88a3a7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5fd320da57bb52458bb1e8c14c5311129d88a3a7
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241007/66e8e082/attachment-0001.html>
More information about the ghc-commits
mailing list