aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression/Results
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-01-27 16:57:20 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-01-27 16:57:20 +0100
commite096fa7aa6161e1f5a74001185eb3873a684c48d (patch)
treeca928bcb3f7b6b2237a626fbb1dbc1ce62b2e5d1 /test/regression/Results
parentf00b70b6a17fdfb4e8606df891f6becc8102ef12 (diff)
downloadcompcert-e096fa7aa6161e1f5a74001185eb3873a684c48d.tar.gz
compcert-e096fa7aa6161e1f5a74001185eb3873a684c48d.zip
ABI compatibility for struct/union function arguments passed by value.
The passing of struct/union arguments by value implemented in the verified part of CompCert is not compatible with the ARM, PowerPC and x86 ABI. Here we enrich the StructReturn source-to-source emulation pass so that it implements the calling conventions defined in these ABIs. Plus: for x86, implement the returning of struct/union results by value in a way compatible with the ABI.
Diffstat (limited to 'test/regression/Results')
-rw-r--r--test/regression/Results/interop162
1 files changed, 62 insertions, 0 deletions
diff --git a/test/regression/Results/interop1 b/test/regression/Results/interop1
new file mode 100644
index 00000000..34ec8e6b
--- /dev/null
+++ b/test/regression/Results/interop1
@@ -0,0 +1,62 @@
+--- CompCert calling native:
+s1 = { a = 'a' }
+s2 = { a = 'x', b = 'y' }
+s3 = { a = 'a', b = 'b', c = ' c' }
+s4 = { a = 'p', b = 'q', c = ' r', d = 's' }
+s5 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e' }
+s6 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e', f = 'f' }
+s7 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e', f = 'f', g = 'g' }
+s8 = "Hello, world!"
+t1 = { a = 12 }
+t2 = { a = 34, b = 56 }
+t3 = { a = -1, b = -2, c = -3 }
+t4 = { a = 11, b = 22, c = 33, d = 44 }
+t4 = { a = 1, b = 2, c = 3, d = 4, e = 'x' }
+u1 = { a = 12345678 }
+u2 = { a = 1, b = -1 }
+u3 = { a = -1, b = -2, c = -3 }
+u4 = { a = 4, b = 3, c = 2, d = 1 }
+u5 = { a = 123, b = 'z' }
+u6 = { a = -12345678, b = 555 }
+u7 = { a = 111111111, b = 2222, c = 'a' }
+u8 = { a = 'u', b = 8 }
+u9 = { a = 3.14159, b = -2.718 }
+rs1 = { a = 'a' }
+rs2 = { a = 'a', b = 'b' }
+rs3 = { a = 'a', b = 'b', c = 'c' }
+rs4 = { a = 'a', b = 'b', c = 'c', d = 'd' }
+rs8 = { "Lorem ipsum" }
+ru2 = { a = 12, b = -34 }
+ru6 = { a = 12345678, b = -9999 }
+ru9 = { a = 0.123400, b = -5678.900000 }
+--- native calling CompCert:
+s1 = { a = 'a' }
+s2 = { a = 'x', b = 'y' }
+s3 = { a = 'a', b = 'b', c = ' c' }
+s4 = { a = 'p', b = 'q', c = ' r', d = 's' }
+s5 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e' }
+s6 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e', f = 'f' }
+s7 = { a = 'a', b = 'b', c = ' c', d = 'd', e = 'e', f = 'f', g = 'g' }
+s8 = "Hello, world!"
+t1 = { a = 12 }
+t2 = { a = 34, b = 56 }
+t3 = { a = -1, b = -2, c = -3 }
+t4 = { a = 11, b = 22, c = 33, d = 44 }
+t4 = { a = 1, b = 2, c = 3, d = 4, e = 'x' }
+u1 = { a = 12345678 }
+u2 = { a = 1, b = -1 }
+u3 = { a = -1, b = -2, c = -3 }
+u4 = { a = 4, b = 3, c = 2, d = 1 }
+u5 = { a = 123, b = 'z' }
+u6 = { a = -12345678, b = 555 }
+u7 = { a = 111111111, b = 2222, c = 'a' }
+u8 = { a = 'u', b = 8 }
+u9 = { a = 3.14159, b = -2.718 }
+rs1 = { a = 'a' }
+rs2 = { a = 'a', b = 'b' }
+rs3 = { a = 'a', b = 'b', c = 'c' }
+rs4 = { a = 'a', b = 'b', c = 'c', d = 'd' }
+rs8 = { "Lorem ipsum" }
+ru2 = { a = 12, b = -34 }
+ru6 = { a = 12345678, b = -9999 }
+ru9 = { a = 0.123400, b = -5678.900000 }