aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-03-18 21:54:45 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:21 -0400
commitf2e576b8141ec1cf2669ff7bbc92f0a9c147f34f (patch)
treec5c061b030a3fb903844705ff45b4ca29b8efa51 /arch/x86
parentcc7594e420283cf6070538655f1a4fbebb3fb853 (diff)
i386: arch/x86/math-emu/reg_ld_str.c: fix warning
arch/x86/math-emu/reg_ld_str.c:380: warning: 'l[0]' may be used uninitialized in this function arch/x86/math-emu/reg_ld_str.c:380: warning: 'l[1]' may be used uninitialized in this function I can't actually spot the bug here. There's one obvious place, but fixing that didn't shut the warning up. Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/math-emu/reg_ld_str.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/math-emu/reg_ld_str.c b/arch/x86/math-emu/reg_ld_str.c
index 799d4af5be66..02af772a24db 100644
--- a/arch/x86/math-emu/reg_ld_str.c
+++ b/arch/x86/math-emu/reg_ld_str.c
@@ -383,15 +383,15 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
383 int exp; 383 int exp;
384 FPU_REG tmp; 384 FPU_REG tmp;
385 385
386 l[0] = 0;
387 l[1] = 0;
386 if (st0_tag == TAG_Valid) { 388 if (st0_tag == TAG_Valid) {
387 reg_copy(st0_ptr, &tmp); 389 reg_copy(st0_ptr, &tmp);
388 exp = exponent(&tmp); 390 exp = exponent(&tmp);
389 391
390 if (exp < DOUBLE_Emin) { /* It may be a denormal */ 392 if (exp < DOUBLE_Emin) { /* It may be a denormal */
391 addexponent(&tmp, -DOUBLE_Emin + 52); /* largest exp to be 51 */ 393 addexponent(&tmp, -DOUBLE_Emin + 52); /* largest exp to be 51 */
392 394denormal_arg:
393 denormal_arg:
394
395 if ((precision_loss = FPU_round_to_int(&tmp, st0_tag))) { 395 if ((precision_loss = FPU_round_to_int(&tmp, st0_tag))) {
396#ifdef PECULIAR_486 396#ifdef PECULIAR_486
397 /* Did it round to a non-denormal ? */ 397 /* Did it round to a non-denormal ? */
@@ -477,8 +477,7 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
477 477
478 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ 478 /* This is a special case: see sec 16.2.5.1 of the 80486 book */
479 /* Overflow to infinity */ 479 /* Overflow to infinity */
480 l[0] = 0x00000000; /* Set to */ 480 l[1] = 0x7ff00000; /* Set to + INF */
481 l[1] = 0x7ff00000; /* + INF */
482 } else { 481 } else {
483 if (precision_loss) { 482 if (precision_loss) {
484 if (increment) 483 if (increment)
@@ -492,8 +491,6 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
492 } 491 }
493 } else if (st0_tag == TAG_Zero) { 492 } else if (st0_tag == TAG_Zero) {
494 /* Number is zero */ 493 /* Number is zero */
495 l[0] = 0;
496 l[1] = 0;
497 } else if (st0_tag == TAG_Special) { 494 } else if (st0_tag == TAG_Special) {
498 st0_tag = FPU_Special(st0_ptr); 495 st0_tag = FPU_Special(st0_ptr);
499 if (st0_tag == TW_Denormal) { 496 if (st0_tag == TW_Denormal) {
@@ -508,7 +505,6 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
508 reg_copy(st0_ptr, &tmp); 505 reg_copy(st0_ptr, &tmp);
509 goto denormal_arg; 506 goto denormal_arg;
510 } else if (st0_tag == TW_Infinity) { 507 } else if (st0_tag == TW_Infinity) {
511 l[0] = 0;
512 l[1] = 0x7ff00000; 508 l[1] = 0x7ff00000;
513 } else if (st0_tag == TW_NaN) { 509 } else if (st0_tag == TW_NaN) {
514 /* Is it really a NaN ? */ 510 /* Is it really a NaN ? */
@@ -532,7 +528,6 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
532 EXCEPTION(EX_Invalid); 528 EXCEPTION(EX_Invalid);
533 if (!(control_word & CW_Invalid)) 529 if (!(control_word & CW_Invalid))
534 return 0; 530 return 0;
535 l[0] = 0;
536 l[1] = 0xfff80000; 531 l[1] = 0xfff80000;
537 } 532 }
538 } 533 }