diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-08-30 10:06:39 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-08-30 10:06:39 -0400 |
commit | 0355b3e039c621d15321fd0d5cf72d8bdb8f723d (patch) | |
tree | 005fd5c6e3e78ec39ee2a3924371cbdc69b34fac /arch/arm/vfp/vfpsingle.c | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
[ARM] 3750/3: Fix double VFP emulation for EABI kernels
Patch from Daniel Jacobowitz
vfp_put_double didn't work in a CONFIG_AEABI kernel. By swapping
the arguments, we arrange for them to be in the same place regardless
of ABI. I made the same change to vfp_put_float for consistency.
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/vfp/vfpsingle.c')
-rw-r--r-- | arch/arm/vfp/vfpsingle.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index 78d7cac5f36b..8f6c179cafbe 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c | |||
@@ -200,7 +200,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce | |||
200 | s32 d = vfp_single_pack(vs); | 200 | s32 d = vfp_single_pack(vs); |
201 | pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, | 201 | pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, |
202 | sd, d, exceptions); | 202 | sd, d, exceptions); |
203 | vfp_put_float(sd, d); | 203 | vfp_put_float(d, sd); |
204 | } | 204 | } |
205 | 205 | ||
206 | return exceptions; | 206 | return exceptions; |
@@ -257,19 +257,19 @@ vfp_propagate_nan(struct vfp_single *vsd, struct vfp_single *vsn, | |||
257 | */ | 257 | */ |
258 | static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) | 258 | static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) |
259 | { | 259 | { |
260 | vfp_put_float(sd, vfp_single_packed_abs(m)); | 260 | vfp_put_float(vfp_single_packed_abs(m), sd); |
261 | return 0; | 261 | return 0; |
262 | } | 262 | } |
263 | 263 | ||
264 | static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) | 264 | static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) |
265 | { | 265 | { |
266 | vfp_put_float(sd, m); | 266 | vfp_put_float(m, sd); |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | 269 | ||
270 | static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) | 270 | static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) |
271 | { | 271 | { |
272 | vfp_put_float(sd, vfp_single_packed_negate(m)); | 272 | vfp_put_float(vfp_single_packed_negate(m), sd); |
273 | return 0; | 273 | return 0; |
274 | } | 274 | } |
275 | 275 | ||
@@ -333,7 +333,7 @@ static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr) | |||
333 | vsp = &vfp_single_default_qnan; | 333 | vsp = &vfp_single_default_qnan; |
334 | ret = FPSCR_IOC; | 334 | ret = FPSCR_IOC; |
335 | } | 335 | } |
336 | vfp_put_float(sd, vfp_single_pack(vsp)); | 336 | vfp_put_float(vfp_single_pack(vsp), sd); |
337 | return ret; | 337 | return ret; |
338 | } | 338 | } |
339 | 339 | ||
@@ -517,7 +517,7 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr) | |||
517 | return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); | 517 | return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); |
518 | 518 | ||
519 | pack_nan: | 519 | pack_nan: |
520 | vfp_put_double(dd, vfp_double_pack(&vdd)); | 520 | vfp_put_double(vfp_double_pack(&vdd), dd); |
521 | return exceptions; | 521 | return exceptions; |
522 | } | 522 | } |
523 | 523 | ||
@@ -613,7 +613,7 @@ static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr) | |||
613 | 613 | ||
614 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 614 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
615 | 615 | ||
616 | vfp_put_float(sd, d); | 616 | vfp_put_float(d, sd); |
617 | 617 | ||
618 | return exceptions; | 618 | return exceptions; |
619 | } | 619 | } |
@@ -692,7 +692,7 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr) | |||
692 | 692 | ||
693 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 693 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
694 | 694 | ||
695 | vfp_put_float(sd, (s32)d); | 695 | vfp_put_float((s32)d, sd); |
696 | 696 | ||
697 | return exceptions; | 697 | return exceptions; |
698 | } | 698 | } |
@@ -1127,7 +1127,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) | |||
1127 | vsn_nan: | 1127 | vsn_nan: |
1128 | exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); | 1128 | exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); |
1129 | pack: | 1129 | pack: |
1130 | vfp_put_float(sd, vfp_single_pack(&vsd)); | 1130 | vfp_put_float(vfp_single_pack(&vsd), sd); |
1131 | return exceptions; | 1131 | return exceptions; |
1132 | 1132 | ||
1133 | vsm_nan: | 1133 | vsm_nan: |
@@ -1147,7 +1147,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) | |||
1147 | goto pack; | 1147 | goto pack; |
1148 | 1148 | ||
1149 | invalid: | 1149 | invalid: |
1150 | vfp_put_float(sd, vfp_single_pack(&vfp_single_default_qnan)); | 1150 | vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd); |
1151 | return FPSCR_IOC; | 1151 | return FPSCR_IOC; |
1152 | } | 1152 | } |
1153 | 1153 | ||