aboutsummaryrefslogtreecommitdiff
path: root/amd64
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2022-03-08 15:49:01 +0100
committerQuentin Carbonneaux <[email protected]>2022-03-08 15:57:06 +0100
commit9060981c10c21834596d5677a2c9ccc56809eb64 (patch)
tree2fe18c42b4c435a15612abdc4ce836d5860cdfa2 /amd64
parent349794f3e4f11e4cc34a501ba935a2a305229738 (diff)
flag types defined as unions
The risc-v abi needs to know if a type is defined as a union or not. We cannot use nunion to obtain this information because the risc-v abi made the unfortunate decision of treating union { int i; } differently from int i; So, instead, I introduce a single bit flag 'isunion'.
Diffstat (limited to 'amd64')
-rw-r--r--amd64/sysv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amd64/sysv.c b/amd64/sysv.c
index 7287f41..e9f3d6b 100644
--- a/amd64/sysv.c
+++ b/amd64/sysv.c
@@ -77,7 +77,7 @@ typclass(AClass *a, Typ *t)
a->size = sz;
a->align = t->align;
- if (t->dark || sz > 16 || sz == 0) {
+ if (t->isdark || sz > 16 || sz == 0) {
/* large or unaligned structures are
* required to be passed in memory
*/