aboutsummaryrefslogtreecommitdiff
path: root/qbe.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-22 12:25:50 -0800
committerMichael Forney <mforney@mforney.org>2019-02-22 12:25:50 -0800
commit2cbd75bbab472b6861dc0ae806e41cf139518fe6 (patch)
tree15435cabe49771c07664df83824297cfa3d9f008 /qbe.c
parentf2a079fa1a94b6a99e7ce432b6df17fdb4c9b554 (diff)
Implement __builtin_alloca
Diffstat (limited to 'qbe.c')
-rw-r--r--qbe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qbe.c b/qbe.c
index 7cc0719..4332b9c 100644
--- a/qbe.c
+++ b/qbe.c
@@ -830,6 +830,9 @@ funcexpr(struct function *f, struct expression *e)
case BUILTINVAEND:
/* no-op */
break;
+ case BUILTINALLOCA:
+ l = funcexpr(f, e->builtin.arg);
+ return funcinst(f, IALLOC16, &iptr, (struct value *[]){l});
default:
fatal("internal error: unimplemented builtin");
}