From 5f96b99f27bdc9773b090295487fd41d03d9263b Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 27 Sep 2011 14:19:30 +0200 Subject: [PATCH] sparc: va_arg functions may not use omit-fp --- ir/be/sparc/sparc_cconv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ir/be/sparc/sparc_cconv.c b/ir/be/sparc/sparc_cconv.c index 084e84dd9..d0129aeb0 100644 --- a/ir/be/sparc/sparc_cconv.c +++ b/ir/be/sparc/sparc_cconv.c @@ -196,7 +196,13 @@ calling_convention_t *sparc_decide_calling_convention(ir_type *function_type, if (irg != NULL) { const be_options_t *options = be_get_irg_options(irg); omit_fp = options->omit_fp; - irg_walk_graph(irg, check_omit_fp, NULL, &omit_fp); + /* our current vaarg handling needs the standard space to store the + * args 0-5 in it */ + if (get_method_variadicity(function_type) == variadicity_variadic) + omit_fp = false; + if (omit_fp == true) { + irg_walk_graph(irg, check_omit_fp, NULL, &omit_fp); + } } caller_saves = rbitset_malloc(N_SPARC_REGISTERS); -- 2.20.1