[PATCH 2/9] Add isaggregate for later use with abi conformity.
[Thread Prev] | [Thread Next]
- Subject: [PATCH 2/9] Add isaggregate for later use with abi conformity.
- From: "S. Gilles" <sgilles@xxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sat, 20 Jun 2020 22:40:02 -0400
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
--- 6/asm.h | 1 + 6/typeinfo.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/6/asm.h b/6/asm.h index f4c0badb..04c088ed 100644 --- a/6/asm.h +++ b/6/asm.h @@ -316,6 +316,7 @@ size_t tyalign(Type *t); size_t size(Node *n); ssize_t tyoffset(Type *ty, Node *memb); ssize_t offset(Node *aggr, Node *memb); +int isaggregate(Type *t); int stacknode(Node *n); int floatnode(Node *n); void breakhere(); diff --git a/6/typeinfo.c b/6/typeinfo.c index f7ec797d..cc12f4a7 100644 --- a/6/typeinfo.c +++ b/6/typeinfo.c @@ -408,3 +408,10 @@ offset(Node *aggr, Node *memb) return tyoffset(exprtype(aggr), memb); } +int +isaggregate(Type *t) +{ + t = tybase(t); + return (t->type == Tystruct || t->type == Tyarray || t->type == Tytuple || + (t->type == Tyunion && !isenum(t))); +} -- 2.27.0
[PATCH 0/9] v2: Handle small-aggregates via AMD64 abi | "S. Gilles" <sgilles@xxxxxxx> |
- Prev by Date: [PATCH 1/9] Unify alignment for heterogeneous tuples.
- Next by Date: [PATCH 3/9] Factor out the code for placing/retrieving arguments.
- Previous by thread: [PATCH 1/9] Unify alignment for heterogeneous tuples.
- Next by thread: [PATCH 3/9] Factor out the code for placing/retrieving arguments.
- Index(es):