Fixed up for AVR should not prefer globals
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 30 Sep 2000 16:56:46 +0000 (16:56 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 30 Sep 2000 16:56:46 +0000 (16:56 +0000)
in FAR_SPACE (even if direct space) over temps

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@425 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCcse.c

index a23e391b768cdbddc20f59471b090cc7017e871b..3d1a234d954cc72d9bfceb00902d34b0962098f7 100644 (file)
@@ -207,7 +207,7 @@ static bool isGlobalInNearSpace (operand *op)
        suggested by Jean-Louis VERN, with 8051s we have no
        advantage of putting variables in near space into
        registers */
-    if (isOperandGlobal(op)  &&
+    if (isOperandGlobal(op)  && !IN_FARSPACE(SPEC_OCLS(type)) &&
        IN_DIRSPACE(SPEC_OCLS(type)))
        return TRUE;
     else