Arithmetic accelerator: genModTwoBytes loaded MB backwards with literals too.
authorkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 6 Nov 2001 06:24:40 +0000 (06:24 +0000)
committerkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 6 Nov 2001 06:24:40 +0000 (06:24 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1513 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/ds390/gen.c

index 3697e8d7a4551dbfb754df7ae703d4677ec7e185..eb81363810f895004f86ea4c4254ee264dbf5ed1 100644 (file)
@@ -4674,8 +4674,8 @@ static void genModTwoByte (operand *left, operand *right,
                        if (val < 0) {
                                val = -val;
                        } 
-                       emitcode ("mov","mb,#0x%02x",(val >> 8) & 0xff);
                        emitcode ("mov","mb,#0x%02x",val & 0xff);
+                       emitcode ("mov","mb,#0x%02x",(val >> 8) & 0xff);                    
                } else {
                        lbl = newiTempLabel(NULL);
                        emitcode ("mov","b,%s",aopGet(AOP(right),0,FALSE,FALSE,TRUE));