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'.
This commit is contained in:
parent
349794f3e4
commit
9060981c10
5 changed files with 11 additions and 8 deletions
|
@ -94,7 +94,7 @@ typclass(Class *c, Typ *t, int *gp, int *fp)
|
|||
if (t->align > 4)
|
||||
err("alignments larger than 16 are not supported");
|
||||
|
||||
if (t->dark || sz > 16 || sz == 0) {
|
||||
if (t->isdark || sz > 16 || sz == 0) {
|
||||
/* large structs are replaced by a
|
||||
* pointer to some caller-allocated
|
||||
* memory */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue