Remove inline ASM for */ word, a*b/c
authorDan White <dan@whiteaudio.com>
Sun, 1 Feb 2015 19:26:06 +0000 (13:26 -0600)
committerDan White <dan@whiteaudio.com>
Sun, 1 Feb 2015 19:26:06 +0000 (13:26 -0600)
The Ubuntu 14.04 LTS mspgcc properly uses the hardware multiplier according
to the compiler flags.

msp4th/msp4th.c

index 5684e88ff9774cb56493e7d7b639eb074c7548be..467e325498625869ffbe8a1617b1e16e721077dc 100644 (file)
@@ -1305,17 +1305,6 @@ void execVM(int16_t opcode)
             break;
 
         case 54: // */  ( a b c -- (a*b)/c ) \ 32b intermediate
-#if defined(MSP430)
-            // TODO FIXME broken order of operations
-            asm("dint");
-            MPYS = popMathStack();
-            OP2 = NOS;
-            x = (((int32_t)RESHI << 16) | RESLO);
-            asm("eint");
-            x = (x / TOS);
-            popMathStack();
-            TOS = (int16_t)(x & 0xffff);
-#else
             i = popMathStack();
             j = TOS;
             k = NOS;
@@ -1323,7 +1312,6 @@ void execVM(int16_t opcode)
             x = x / i;
             popMathStack();
             TOS = (int16_t)(x & 0xffff);
-#endif
             break;
 
         case 55: // key  ( -- c ) \ get a key from input .... (wait for it)