Version bump (1.8.4) for last commit.
authorShamus Hammons <jlhamm@acm.org>
Fri, 11 Aug 2017 00:08:32 +0000 (19:08 -0500)
committerShamus Hammons <jlhamm@acm.org>
Fri, 11 Aug 2017 00:08:32 +0000 (19:08 -0500)
amode.c
amode.h
parmode.h
procln.c
token.c
version.h

diff --git a/amode.c b/amode.c
index 7b471dc14308304f0ec2f70a52ac4a5834976c11..56814123d8d50a3073dfb43fd9ff348e63d3407f 100644 (file)
--- a/amode.c
+++ b/amode.c
@@ -132,8 +132,8 @@ int amode(int acount)
        // it's a bitfield instruction--check the parameters inside the {} block
        // for validity
        if (*tok == '{')
        // it's a bitfield instruction--check the parameters inside the {} block
        // for validity
        if (*tok == '{')
-        if (check030bf() == ERROR)
-               return ERROR;
+               if (check030bf() == ERROR)
+                       return ERROR;
 
        if ((acount == 0) || (*tok != ','))
                return 1;
 
        if ((acount == 0) || (*tok != ','))
                return 1;
@@ -169,7 +169,7 @@ int amode(int acount)
 
        // It's a bitfield instruction--check the parameters inside the {} block
        // for validity
 
        // It's a bitfield instruction--check the parameters inside the {} block
        // for validity
-       if (*tok == '{') 
+       if (*tok == '{')
         if (check030bf() == ERROR)
                return ERROR;
 
         if (check030bf() == ERROR)
                return ERROR;
 
@@ -309,7 +309,8 @@ int fpu_reglist_left(WORD * a_rmask)
                else
                        cnt = 0;
 
                else
                        cnt = 0;
 
-                r = 0;
+               r = 0;
+
                while (cnt-- >= 0)
                        rmask |= msktab_minus[r++];
 
                while (cnt-- >= 0)
                        rmask |= msktab_minus[r++];
 
@@ -383,7 +384,6 @@ int fpu_reglist_right(WORD * a_rmask)
 int check030bf(void)
 {
        CHECK00;
 int check030bf(void)
 {
        CHECK00;
-
        tok++;
 
        if (*tok == CONST)
        tok++;
 
        if (*tok == CONST)
diff --git a/amode.h b/amode.h
index b109baedeba3cb977629207598ec164f4747719d..ae93cfa95614cc381a59b16bc0d4d155cb3fbf3b 100644 (file)
--- a/amode.h
+++ b/amode.h
@@ -37,7 +37,7 @@
 #define AM_CCR       0110
 #define AM_NONE      0111                      // Nothing
 #define CACHES       0120                      // Instruction/Data/Both Caches (IC/DC/BC)
 #define AM_CCR       0110
 #define AM_NONE      0111                      // Nothing
 #define CACHES       0120                      // Instruction/Data/Both Caches (IC/DC/BC)
-#define CREG         0121                              // Control registers (see CREGlut in mach.c)
+#define CREG         0121                      // Control registers (see CREGlut in mach.c)
 #define FREG         0122                      // FPU registers (fp0-fp7)
 #define FPSCR        0123                      // FPU system control registers (fpiar, fpsr, fpcr)
 
 #define FREG         0122                      // FPU registers (fp0-fp7)
 #define FPSCR        0123                      // FPU system control registers (fpiar, fpsr, fpcr)
 
@@ -68,7 +68,7 @@
 #define M_CREG       0x00800000L       // Control registers
 #define M_FREG       0x01000000L       // FPn
 #define M_FPSCR      0x02000000L       // fpiar, fpsr, fpcr
 #define M_CREG       0x00800000L       // Control registers
 #define M_FREG       0x01000000L       // FPn
 #define M_FPSCR      0x02000000L       // fpiar, fpsr, fpcr
-#define M_CACHE40    0x04000000L               // 68040 cache registers (IC40,DC40,BC40)
+#define M_CACHE40    0x04000000L       // 68040 cache registers (IC40,DC40,BC40)
 
 // Addr mode categories
 #define C_ALL        0x00000FFFL
 
 // Addr mode categories
 #define C_ALL        0x00000FFFL
@@ -81,7 +81,7 @@
 #define C_DATA030    0x0003FFFDL
 #define C_MOVES      (M_AIND | M_APOSTINC | M_APREDEC | M_ADISP | M_AINDEXED | M_ABSW | M_ABSL | M_ABASE | M_MEMPRE | M_MEMPOST)
 #define C_BF1        (M_DREG | M_AIND | M_AINDEXED | M_ADISP | M_ABSW | M_ABSL | M_ABASE | M_MEMPOST | M_MEMPRE)
 #define C_DATA030    0x0003FFFDL
 #define C_MOVES      (M_AIND | M_APOSTINC | M_APREDEC | M_ADISP | M_AINDEXED | M_ABSW | M_ABSL | M_ABASE | M_MEMPRE | M_MEMPOST)
 #define C_BF1        (M_DREG | M_AIND | M_AINDEXED | M_ADISP | M_ABSW | M_ABSL | M_ABASE | M_MEMPOST | M_MEMPRE)
-#define C_BF2        (C_BF1 | M_PCDISP | M_PCINDEXED | M_PCBASE | M_PCMPOST | M_PCMPRE )
+#define C_BF2        (C_BF1 | M_PCDISP | M_PCINDEXED | M_PCBASE | M_PCMPOST | M_PCMPRE)
 #define C_PMOVE      (M_AIND | M_ADISP | M_AINDEXED  | M_ABSW | M_ABSL | M_ABASE | M_MEMPRE | M_MEMPOST)
 
 #define C_ALTDATA    (C_DATA & C_ALT)
 #define C_PMOVE      (M_AIND | M_ADISP | M_AINDEXED  | M_ABSW | M_ABSL | M_ABASE | M_MEMPRE | M_MEMPOST)
 
 #define C_ALTDATA    (C_DATA & C_ALT)
index 89d53a7da60ad32e612259f185b66660171c30c3..60eca336079551b416c3c43e8fab9c5429277b14 100644 (file)
--- a/parmode.h
+++ b/parmode.h
                 else if (*tok++ != ',')
                                        return error("comma expected after ]");
 
                 else if (*tok++ != ',')
                                        return error("comma expected after ]");
 
-                if (*tok == SYMBOL || *tok == CONST)
-                {
-                               if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
-                                       goto badmode;
-
-                    if (CHECK_OPTS(OPT_BASE_DISP) && (AnEXVAL == 0) && (AnEXATTR & DEFINED))
+                               if (*tok == SYMBOL || *tok == CONST)
                                {
                                {
-                                       // od=0 so optimise it out
-                                       AMn = MEMPRE;            // let's say it's ([bd,An],Xn,od) with od=0 then
-                                       AnEXTEN |= EXT_IISPRE0; // No outer displacement
-                                       tok++;
-                                       goto AnOK;
+                                       if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
+                                               goto badmode;
+
+                                       if (CHECK_OPTS(OPT_BASE_DISP) && (AnEXVAL == 0) && (AnEXATTR & DEFINED))
+                                       {
+                                               // od=0 so optimise it out
+                                               AMn = MEMPRE;            // let's say it's ([bd,An],Xn,od) with od=0 then
+                                               AnEXTEN |= EXT_IISPRE0; // No outer displacement
+                                               tok++;
+                                               goto AnOK;
+                                       }
                                }
                                }
-                }
 
                                // ([bd,An/PC,Xn],od)
                                if (*tok == DOTL)
 
                                // ([bd,An/PC,Xn],od)
                                if (*tok == DOTL)
                                else
                                {
                                        // expr.[W]
                                else
                                {
                                        // expr.[W]
-                    int expr_size;
-
                                        AMn = MEMPRE;
                                        AMn = MEMPRE;
-                    expr_size = EXT_IISPREW; // Assume we have a .w value
+                                       int expr_size = EXT_IISPREW; // Assume we have a .w value
 
 
-                    if ((AnEXVAL + 0x8000) > 0x10000)
+                                       if ((AnEXVAL + 0x8000) > 0x10000)
                                        {
                                        {
-                        // Long value, so mark it as such for now
-                        expr_size = EXT_IISPREL;
-                                       // Defined, absolute values from $FFFF8000..$00007FFF get optimized
-                                       // to absolute short
+                                               // Long value, so mark it as such for now
+                                               expr_size = EXT_IISPREL;
+
+                                               // Defined, absolute values from $FFFF8000..$00007FFF
+                                               // get optimized to absolute short
                         if (CHECK_OPTS(OPT_BASE_DISP)
                         if (CHECK_OPTS(OPT_BASE_DISP)
-                                               && ((AnEXATTR & (TDB | DEFINED)) == DEFINED)
-                                               && ((AnEXVAL + 0x8000) < 0x10000))
-                                       {
-                            expr_size = EXT_IISPREW;
-                                               warn("outer displacement absolute value from $FFFF8000..$00007FFF optimised to absolute short");
+                                                       && ((AnEXATTR & (TDB | DEFINED)) == DEFINED)
+                                                       && ((AnEXVAL + 0x8000) < 0x10000))
+                                               {
+                                                       expr_size = EXT_IISPREW;
+                                                       warn("outer displacement absolute value from $FFFF8000..$00007FFF optimised to absolute short");
+                                               }
                                        }
                                        }
-                               }
 
 
-                    AnEXTEN |= expr_size; // Assume we have a .w value
+                                       AnEXTEN |= expr_size; // Assume we have a .w value
 
 
-                    // Is .W forced here?
+                                       // Is .W forced here?
                                        if (*tok == DOTW)
                                        {
                                                tok++;
                                        if (*tok == DOTW)
                                        {
                                                tok++;
-                        if (expr_size == EXT_IISPREL)
-                            return error("outer displacement value does not fit in .w size");
-                                       }
 
 
+                                               if (expr_size == EXT_IISPREL)
+                                                       return error("outer displacement value does not fit in .w size");
+                                       }
                                }
 
                                // Check for final closing parenthesis
                                }
 
                                // Check for final closing parenthesis
index 79c0db26f107627ab0826f7dc7b1169e945e6773..5b5e18a0e5edf159b5c063e87f2c1b5d502cb796 100644 (file)
--- a/procln.c
+++ b/procln.c
@@ -95,7 +95,7 @@ LONG amsktab[0124] = {
        0L,                             // 0115
        0L,                             // 0116
        0L,                             // 0117
        0L,                             // 0115
        0L,                             // 0116
        0L,                             // 0117
-    M_CACHE40,                                                                     // 0120
+       M_CACHE40,              // 0120
        M_CREG,                 // 0121
        M_FREG,                 // 0122
        M_FPSCR                 // 0123
        M_CREG,                 // 0121
        M_FREG,                 // 0122
        M_FPSCR                 // 0123
@@ -269,17 +269,17 @@ as68label:
        // Check for ".b" ".w" ".l" after directive, macro or mnemonic.
        siz = SIZN;
 
        // Check for ".b" ".w" ".l" after directive, macro or mnemonic.
        siz = SIZN;
 
-    switch (*tok)
-    {
-    case DOTW: siz = SIZW, tok++; break;
-    case DOTL: siz = SIZL, tok++; break;
-    case DOTB: siz = SIZB, tok++; break;
-    case DOTD: siz = SIZD, tok++; break;
-    case DOTP: siz = SIZP, tok++; break;
-    case DOTQ: siz = SIZQ, tok++; break;
-    case DOTS: siz = SIZS, tok++; break;
-    case DOTX: siz = SIZX, tok++; break;
-    }
+       switch (*tok)
+       {
+       case DOTW: siz = SIZW, tok++; break;
+       case DOTL: siz = SIZL, tok++; break;
+       case DOTB: siz = SIZB, tok++; break;
+       case DOTD: siz = SIZD, tok++; break;
+       case DOTP: siz = SIZP, tok++; break;
+       case DOTQ: siz = SIZQ, tok++; break;
+       case DOTS: siz = SIZS, tok++; break;
+       case DOTX: siz = SIZX, tok++; break;
+       }
 
 
        // Do special directives (500..999) (These must be handled in "real time")
 
 
        // Do special directives (500..999) (These must be handled in "real time")
@@ -794,4 +794,3 @@ int HandleLabel(char * label, int labelType)
        return 0;
 }
 
        return 0;
 }
 
-
diff --git a/token.c b/token.c
index b53b7decbf552b3366ed81df86cc9e057baae13c..091aea49c7aa9d3189ad7fa09b87f2507cf4096e 100644 (file)
--- a/token.c
+++ b/token.c
@@ -1292,11 +1292,11 @@ dostring:
                                                case '\\':
                                                        c = '\\';
                                                        break;
                                                case '\\':
                                                        c = '\\';
                                                        break;
-                        case '!':
-                            // If we're evaluating a macro
-                            // this is valid and expands to
-                            // "dot-size"
-                            break;
+                                               case '!':
+                                                       // If we're evaluating a macro
+                                                       // this is valid and expands to
+                                                       // "dot-size"
+                                                       break;
                                                default:
                                                        warn("bad backslash code in string");
                                                        ln--;
                                                default:
                                                        warn("bad backslash code in string");
                                                        ln--;
@@ -1562,31 +1562,31 @@ dostring:
                                {
                                        v &= 0x000000FF;
                                        ln += 2;
                                {
                                        v &= 0x000000FF;
                                        ln += 2;
-                    *tk++ = CONST;
-                    *tk++ = v;
-                    *tk++ = DOTB;
+                                       *tk++ = CONST;
+                                       *tk++ = v;
+                                       *tk++ = DOTB;
                                }
                                else if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W'))
                                {
                                        v &= 0x0000FFFF;
                                        ln += 2;
                                }
                                else if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W'))
                                {
                                        v &= 0x0000FFFF;
                                        ln += 2;
-                    *tk++ = CONST;
-                    *tk++ = v;
-                    *tk++ = DOTW;
+                                       *tk++ = CONST;
+                                       *tk++ = v;
+                                       *tk++ = DOTW;
                                }
                                else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L'))
                                {
                                        ln += 2;
                                }
                                else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L'))
                                {
                                        ln += 2;
-                    *tk++ = CONST;
-                    *tk++ = v;
-                    *tk++ = DOTL;
-                }
-            }
-            else
-            {
-                *tk++ = CONST;
-                *tk++ = v;
-            }
+                                       *tk++ = CONST;
+                                       *tk++ = v;
+                                       *tk++ = DOTL;
+                               }
+                       }
+                       else
+                       {
+                               *tk++ = CONST;
+                               *tk++ = v;
+                       }
 
 //printf("CONST: %i\n", v);
                        continue;
 
 //printf("CONST: %i\n", v);
                        continue;
index 7bb68de66f4642d5e2c7d906ca858bd7dac7a305..dc9118712e32af71f2d86ac1bf87ef44233c6e50 100644 (file)
--- a/version.h
+++ b/version.h
@@ -15,7 +15,7 @@
 
 #define MAJOR   1              // Major version number
 #define MINOR   8              // Minor version number
 
 #define MAJOR   1              // Major version number
 #define MINOR   8              // Minor version number
-#define PATCH   3              // Patch release number
+#define PATCH   4              // Patch release number
 
 #endif // __VERSION_H__
 
 
 #endif // __VERSION_H__