commit 28fe97aa3582f0ed46efb519c971ba597d779a58
parent a9a4b07f3984f53d7e179ee2d5a75e44ca37fa1f
Author: Drew DeVault <sir@cmpwn.com>
Date: Thu, 12 Aug 2021 08:00:57 +0200
gen: lower qbe subtypes on call args
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gen.c b/src/gen.c
@@ -914,6 +914,10 @@ gen_expr_call(struct gen_context *ctx, const struct expression *expr)
args = *next = xcalloc(1, sizeof(struct qbe_arguments));
struct gen_value arg = gen_expr(ctx, carg->value);
args->value = mkqval(ctx, &arg);
+ if (args->value.type->stype == Q_BYTE
+ || args->value.type->stype == Q_WORD) {
+ args->value.type = &qbe_word;
+ }
next = &args->next;
}
push(&ctx->current->body, &call);