From f2ad78a75638a2ccafd976e9df6868908a6a66f1 Mon Sep 17 00:00:00 2001 From: maartenbrock Date: Fri, 18 Nov 2005 13:05:49 +0000 Subject: [PATCH] * src/SDCCicode.c (printOperand): added missing else git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3957 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 10 +++++++--- src/SDCCicode.c | 21 +++++++-------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d689021..84f9a05a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-11-18 Maarten Brock + + * src/SDCCicode.c (printOperand): added missing else + 2005-11-18 Bernhard Held * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else, @@ -8,7 +12,7 @@ 2005-11-17 Borut Razem * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir: - itroduced SILENT option to make building of pic16 libraries less + introduced SILENT option to make building of pic16 libraries less verbose - used for nightly snapshot build * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not available on Win32 platforms. @@ -17,8 +21,8 @@ 2005-11-16 Jesus Calvino-Fraga - * device/lib/printf_large.c: Temporary patch for bug 1358192: - printf("%f"...) sets fraction to zero. + * device/lib/printf_large.c: Temporary patch for bug 1358192: + printf("%f"...) sets fraction to zero. 2005-11-16 Raphael Neider diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 6f8be273..5827d4e5 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -233,7 +233,7 @@ printOperand (operand * op, FILE * file) opetype = getSpec (operandType (op)); if (IS_FLOAT (opetype)) fprintf (file, "%g {", SPEC_CVAL (opetype).v_float); - if (IS_FIXED16X16 (opetype)) + else if (IS_FIXED16X16 (opetype)) fprintf (file, "%g {", doubleFromFixed16x16(SPEC_CVAL (opetype).v_fixed16x16)); else fprintf (file, "0x%x {", (unsigned) floatFromVal (op->operand.valOperand)); @@ -1327,15 +1327,12 @@ operandOperation (operand * left, operand * right, (TYPE_UDWORD) operandLitValue (right)); break; case EQ_OP: - if (IS_FLOAT (let) || - IS_FLOAT (ret)) + if (IS_FLOAT (let) || IS_FLOAT (ret)) { retval = operandFromLit (operandLitValue (left) == operandLitValue (right)); } - else - if (IS_FIXED16X16 (let) || - IS_FIXED16X16 (ret)) + else if (IS_FIXED16X16 (let) || IS_FIXED16X16 (ret)) { retval = operandFromLit (operandLitValue (left) == operandLitValue (right)); @@ -2646,8 +2643,7 @@ geniCodePostInc (operand * op) werror(W_SIZEOF_VOID); if (IS_FLOAT (rvtype)) ic = newiCode ('+', rv, operandFromValue (constFloatVal ("1.0"))); - else - if (IS_FIXED16X16 (rvtype)) + else if (IS_FIXED16X16 (rvtype)) ic = newiCode ('+', rv, operandFromValue (constFixed16x16Val ("1.0"))); else ic = newiCode ('+', rv, operandFromLit (size)); @@ -2687,8 +2683,7 @@ geniCodePreInc (operand * op, bool lvalue) werror(W_SIZEOF_VOID); if (IS_FLOAT (roptype)) ic = newiCode ('+', rop, operandFromValue (constFloatVal ("1.0"))); - else - if (IS_FIXED16X16 (roptype)) + else if (IS_FIXED16X16 (roptype)) ic = newiCode ('+', rop, operandFromValue (constFixed16x16Val ("1.0"))); else ic = newiCode ('+', rop, operandFromLit (size)); @@ -2738,8 +2733,7 @@ geniCodePostDec (operand * op) werror(W_SIZEOF_VOID); if (IS_FLOAT (rvtype)) ic = newiCode ('-', rv, operandFromValue (constFloatVal ("1.0"))); - else - if (IS_FIXED16X16 (rvtype)) + else if (IS_FIXED16X16 (rvtype)) ic = newiCode ('-', rv, operandFromValue (constFixed16x16Val ("1.0"))); else ic = newiCode ('-', rv, operandFromLit (size)); @@ -2779,8 +2773,7 @@ geniCodePreDec (operand * op, bool lvalue) werror(W_SIZEOF_VOID); if (IS_FLOAT (roptype)) ic = newiCode ('-', rop, operandFromValue (constFloatVal ("1.0"))); - else - if (IS_FIXED16X16 (roptype)) + else if (IS_FIXED16X16 (roptype)) ic = newiCode ('-', rop, operandFromValue (constFixed16x16Val ("1.0"))); else ic = newiCode ('-', rop, operandFromLit (size)); -- 2.30.2