summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bevarargs.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2017-01-24 08:35:02 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2017-01-24 08:38:26 +0100
commit89a0191cb027543df14b68dad5bdf486c325fdcc (patch)
tree47a9dd1e9db1dd8c7343e525de68f42a34ff45ef /ir/be/bevarargs.c
parent7125ea59cf7b5458c000389fdfcd163f59b922ba (diff)
be: Factor out common code to make a va_start entity.
Diffstat (limited to 'ir/be/bevarargs.c')
-rw-r--r--ir/be/bevarargs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ir/be/bevarargs.c b/ir/be/bevarargs.c
index c212ec5..901328e 100644
--- a/ir/be/bevarargs.c
+++ b/ir/be/bevarargs.c
@@ -71,3 +71,12 @@ void be_set_va_list_type_pointer(backend_params *const p)
{
p->vararg.va_list_type = new_type_pointer(get_type_for_mode(mode_ANY));
}
+
+ir_entity *be_make_va_start_entity(ir_type *const frame_type, int const offset)
+{
+ ident *const id = new_id_from_str("$va_start");
+ ir_type *const unknown = get_unknown_type();
+ ir_entity *const va_start = new_entity(frame_type, id, unknown);
+ set_entity_offset(va_start, offset);
+ return va_start;
+}