commit 3f5277da3d8e02829ef6f5f00003a8e8781ad9cc
parent 268fda8e7a857d53e90961ec244f4c10fac2708f
Author: Drew DeVault <sir@cmpwn.com>
Date: Mon, 2 Aug 2021 15:51:42 +0200
gen: use mklval for gen_expr_struct_at
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gen.c b/src/gen.c
@@ -357,8 +357,7 @@ gen_expr_struct_at(struct gen_context *ctx,
struct qbe_value offs = constl(field->field->offset);
ftemp.type = field->value->result;
- struct qbe_value ptr = mkqval(ctx, &ftemp);
- ptr.type = ctx->arch.ptr;
+ struct qbe_value ptr = mklval(ctx, &ftemp);
pushi(ctx->current, &ptr, Q_ADD, &base, &offs, NULL);
gen_expr_at(ctx, field->value, ftemp);
}