aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-27 14:29:02 -0700
committerMichael Forney <mforney@mforney.org>2024-04-27 14:29:02 -0700
commit487079af3d6f39b379f52f7e0ea6edec63587e5b (patch)
tree7c265c8a5097032794479435290e7b1e0975d243 /test
parent52c17530f2e2dbc61a3bf1d4950c8b9eaeab86de (diff)
qbe: Add extra size for strict alignment with QBE instruction
With upcoming VLA support, the size might not be constant.
Diffstat (limited to 'test')
-rw-r--r--test/alignas-local-32.qbe11
-rw-r--r--test/alignas-local-strict.c (renamed from test/alignas-local-32.c)0
-rw-r--r--test/alignas-local-strict.qbe12
3 files changed, 12 insertions, 11 deletions
diff --git a/test/alignas-local-32.qbe b/test/alignas-local-32.qbe
deleted file mode 100644
index 53bfab3..0000000
--- a/test/alignas-local-32.qbe
+++ /dev/null
@@ -1,11 +0,0 @@
-export
-function w $main() {
-@start.1
- %.1 =l alloc16 17
- %.2 =l add %.1, 16
- %.3 =l and %.2, 18446744073709551584
-@body.2
- %.4 =l extsw 32
- %.5 =l urem %.3, %.4
- ret %.5
-}
diff --git a/test/alignas-local-32.c b/test/alignas-local-strict.c
index e390713..e390713 100644
--- a/test/alignas-local-32.c
+++ b/test/alignas-local-strict.c
diff --git a/test/alignas-local-strict.qbe b/test/alignas-local-strict.qbe
new file mode 100644
index 0000000..8c725ff
--- /dev/null
+++ b/test/alignas-local-strict.qbe
@@ -0,0 +1,12 @@
+export
+function w $main() {
+@start.1
+ %.1 =l add 1, 16
+ %.2 =l alloc16 %.1
+ %.3 =l add %.2, 16
+ %.4 =l and %.3, 18446744073709551584
+@body.2
+ %.5 =l extsw 32
+ %.6 =l urem %.4, %.5
+ ret %.6
+}