From: johanknol Date: Sat, 17 Mar 2001 16:17:42 +0000 (+0000) Subject: Fixed a volatile optimalisation and some other small things X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a590148d0d137cc50667b37a3f630953a56c39a4;p=fw%2Fsdcc Fixed a volatile optimalisation and some other small things git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@690 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCloop.c b/src/SDCCloop.c index 453cba1f..ef79a6b9 100644 --- a/src/SDCCloop.c +++ b/src/SDCCloop.c @@ -447,6 +447,11 @@ loopInvariants (region * theLoop, eBBlock ** ebbs, int count) IS_OP_PARM (IC_RESULT (ic)))) continue; + /* if result depends on a volatile then skip */ + if ((IC_LEFT(ic) && isOperandVolatile(IC_LEFT(ic), TRUE)) || + (IC_RIGHT(ic) && isOperandVolatile(IC_RIGHT(ic), TRUE))) + continue; + lin = rin = 0; /* special case */ @@ -1161,7 +1166,6 @@ loopOptimizations (hTab * orderedLoops, eBBlock ** ebbs, int count) int change = 0; int k; - /* if no loop optimizations requested */ if (!optimize.loopInvariant && !optimize.loopInduction) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index a69710cd..99bb8e5a 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1725,6 +1725,9 @@ printTypeChain (sym_link * type, FILE * of) { if (IS_DECL (type)) { + if (DCL_PTR_VOLATILE(type)) { + fprintf (of, "volatile "); + } switch (DCL_TYPE (type)) { case FUNCTION: @@ -1771,7 +1774,6 @@ printTypeChain (sym_link * type, FILE * of) if (DCL_PTR_CONST (type)) fprintf (of, "const "); break; - case ARRAY: fprintf (of, "array of "); break;