aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2012-11-21 12:21:51 +0100
committerThomas Preud'homme <robotux@celest.fr>2012-11-21 12:21:51 +0100
commit6eec9310387f96dfb89aef0359fc837bc9cf00c4 (patch)
tree9e20133f7208310f4f01931923a9e01624afa69c
parent15a315f4a5af2cb644178f8d43438df47fa44fd3 (diff)
downloadtinycc-6eec9310387f96dfb89aef0359fc837bc9cf00c4.tar.gz
tinycc-6eec9310387f96dfb89aef0359fc837bc9cf00c4.tar.bz2
Only reference vfpr when available
A line in gfunc_call in arm-gen.c is referencing vfpr unconditionally. Yet, this function is only available when TCC_ARM_VFP is set. While this code is only triggered when TCC_ARM_VFP, it fails at compile time. This commit fix the problem.
-rw-r--r--arm-gen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arm-gen.c b/arm-gen.c
index d8e68ae..ea12fd6 100644
--- a/arm-gen.c
+++ b/arm-gen.c
@@ -1053,10 +1053,12 @@ void gfunc_call(int nb_args)
for(i = 0; i < keep; i++) {
vrotb(keep);
gv(regmask(plan2[i]));
+#ifdef TCC_ARM_HARDFLOAT
/* arg is in s(2d+1): plan2[i]<plan2[i+1] => alignment occured (ex f,d,f) */
if (i < keep - 1 && is_float(vtop->type.t) && (plan2[i] <= plan2[i + 1])) {
o(0xEEF00A40|(vfpr(plan2[i])<<12)|vfpr(plan2[i]));
}
+#endif
}
save_regs(keep); /* save used temporary registers */
keep++;