diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-02-25 10:47:41 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-02-25 10:49:55 +0100 |
commit | 42cbdc04d034bde82573d6503f4755823915de5a (patch) | |
tree | be539e50a9d7aa81b01cbc445b5f8bf157028198 /arm64 | |
parent | 979385718b9f047ea69bb49459faaf27e3470c75 (diff) | |
download | roux-42cbdc04d034bde82573d6503f4755823915de5a.tar.gz |
improve consistency in arm64 and rv64 abis
Diffstat (limited to 'arm64')
-rw-r--r-- | arm64/abi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arm64/abi.c b/arm64/abi.c index db794f6..18e8ef3 100644 --- a/arm64/abi.c +++ b/arm64/abi.c @@ -1,6 +1,6 @@ #include "all.h" -typedef struct Class_ Class; +typedef struct Class Class; typedef struct Insl Insl; typedef struct Params Params; @@ -9,7 +9,7 @@ enum { Cptr = 2, /* replaced by a pointer */ }; -struct Class_ { +struct Class { char class; char ishfa; struct { @@ -213,16 +213,16 @@ argsclass(Ins *i0, Ins *i1, Class *carg, Ref *env) switch (i->op) { case Opar: case Oarg: - c->cls[0] = i->cls; + *c->cls = i->cls; c->size = 8; if (KBASE(i->cls) == 0 && ngp > 0) { ngp--; - c->reg[0] = *gp++; + *c->reg = *gp++; break; } if (KBASE(i->cls) == 1 && nfp > 0) { nfp--; - c->reg[0] = *fp++; + *c->reg = *fp++; break; } c->class |= Cstk; @@ -233,8 +233,8 @@ argsclass(Ins *i0, Ins *i1, Class *carg, Ref *env) if (c->class & Cptr) { if (ngp > 0) { ngp--; - c->reg[0] = *gp++; - c->cls[0] = Kl; + *c->reg = *gp++; + *c->cls = Kl; break; } } else if (c->ngp <= ngp) { @@ -382,7 +382,7 @@ selcall(Fn *fn, Ins *i0, Ins *i1, Insl **ilp) envc = !req(R, env); if (envc) - die("todo (arm abi): env calls"); + die("todo: env calls"); if (cty & (1 << 13)) /* struct return argument */ @@ -479,7 +479,7 @@ selpar(Fn *fn, Ins *i0, Ins *i1) } if (!req(R, env)) - die("todo (arm abi): env calls"); + die("todo: env calls"); return (Params){ .nstk = s - 2, |