diff options
author | David Schneider <david.schneider@bivab.de> | 2013-11-13 14:26:57 +0100 |
---|---|---|
committer | David Schneider <david.schneider@bivab.de> | 2013-11-13 14:26:57 +0100 |
commit | 77f823e31ffb557a466b24f7fba845fbf7831798 (patch) | |
tree | 526099ba0297095d43a8f47542f17aff78f5e2e6 /src/arm | |
parent | 37067ec5036f2a6ed7a4799f83f8f53160460344 (diff) | |
download | libffi-77f823e31ffb557a466b24f7fba845fbf7831798.tar.gz |
stop trying to assing vfp regs once we are done with the registers
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/ffi.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/arm/ffi.c b/src/arm/ffi.c index a8444c3..09883b1 100644 --- a/src/arm/ffi.c +++ b/src/arm/ffi.c @@ -861,7 +861,7 @@ static int vfp_type_p (ffi_type *t) return 0; } -static void place_vfp_arg (ffi_cif *cif, ffi_type *t) +static int place_vfp_arg (ffi_cif *cif, ffi_type *t) { int reg = cif->vfp_reg_free; int nregs = t->size / sizeof (float); @@ -894,12 +894,13 @@ static void place_vfp_arg (ffi_cif *cif, ffi_type *t) reg += 1; cif->vfp_reg_free = reg; } - return; + return 0; next_reg: ; } - // done mark all regs as used - cif->vfp_reg_free = 16; - cif->vfp_used = 0xFFFF; + // done, mark all regs as used + cif->vfp_reg_free = 16; + cif->vfp_used = 0xFFFF; + return 1; } static void layout_vfp_args (ffi_cif *cif) @@ -914,7 +915,9 @@ static void layout_vfp_args (ffi_cif *cif) for (i = 0; i < cif->nargs; i++) { ffi_type *t = cif->arg_types[i]; - if (vfp_type_p (t)) - place_vfp_arg (cif, t); + if (vfp_type_p (t) && place_vfp_arg (cif, t) == 1) + { + break; + } } } |