X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=amode.c;h=70b30e1311c6c58035efde25c6916517779e07dc;hp=7b471dc14308304f0ec2f70a52ac4a5834976c11;hb=689803cff9fd6a81a516486e6e1439ce717607b3;hpb=05d0350b35a6a6b255cb2a3fab7796f5d4ee4d02 diff --git a/amode.c b/amode.c index 7b471dc..70b30e1 100644 --- a/amode.c +++ b/amode.c @@ -27,16 +27,16 @@ int nmodes; // Number of addr'ing modes found int am0; // Addressing mode int a0reg; // Register TOKEN a0expr[EXPRSIZE]; // Expression -VALUE a0exval; // Expression's value +uint64_t a0exval; // Expression's value WORD a0exattr; // Expression's attribute int a0ixreg; // Index register int a0ixsiz; // Index register size (and scale) TOKEN a0oexpr[EXPRSIZE]; // Outer displacement expression -VALUE a0oexval; // Outer displacement value +uint32_t a0oexval; // Outer displacement value WORD a0oexattr; // Outer displacement attribute SYM * a0esym; // External symbol involved in expr TOKEN a0bexpr[EXPRSIZE]; // Base displacement expression -VALUE a0bexval; // Base displacement value +uint64_t a0bexval; // Base displacement value WORD a0bexattr; // Base displacement attribute WORD a0bsize; // Base displacement size WORD a0extension; // 020+ extension address word @@ -45,16 +45,16 @@ WORD am0_030; // ea bits for 020+ addressing modes int am1; // Addressing mode int a1reg; // Register TOKEN a1expr[EXPRSIZE]; // Expression -VALUE a1exval; // Expression's value +uint64_t a1exval; // Expression's value WORD a1exattr; // Expression's attribute int a1ixreg; // Index register int a1ixsiz; // Index register size (and scale) TOKEN a1oexpr[EXPRSIZE]; // Outer displacement expression -VALUE a1oexval; // Outer displacement value +uint32_t a1oexval; // Outer displacement value WORD a1oexattr; // Outer displacement attribute SYM * a1esym; // External symbol involved in expr TOKEN a1bexpr[EXPRSIZE]; // Base displacement expression -VALUE a1bexval; // Base displacement value +uint64_t a1bexval; // Base displacement value WORD a1bexattr; // Base displacement attribute WORD a1bsize; // Base displacement size WORD a1extension; // 020+ extension address word @@ -68,7 +68,7 @@ int bfparam2; // bfxxx / fmove instruction parameter 2 int bfval1; //bfxxx / fmove value 1 int bfval2; //bfxxx / fmove value 2 TOKEN bf0expr[EXPRSIZE]; // Expression -VALUE bf0exval; // Expression's value +uint64_t bf0exval; // Expression's value WORD bf0exattr; // Expression's attribute SYM * bf0esym; // External symbol involved in expr @@ -132,8 +132,8 @@ int amode(int acount) // 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; @@ -169,7 +169,7 @@ int amode(int acount) // It's a bitfield instruction--check the parameters inside the {} block // for validity - if (*tok == '{') + if (*tok == '{') if (check030bf() == ERROR) return ERROR; @@ -309,7 +309,8 @@ int fpu_reglist_left(WORD * a_rmask) else cnt = 0; - r = 0; + r = 0; + while (cnt-- >= 0) rmask |= msktab_minus[r++]; @@ -383,11 +384,11 @@ int fpu_reglist_right(WORD * a_rmask) int check030bf(void) { CHECK00; - tok++; if (*tok == CONST) { + tok++; // Skip the HI LONG tok++; bfval1 = *(int *)tok; @@ -430,6 +431,7 @@ int check030bf(void) if (*tok == CONST) { + tok++; // Skip the HI LONG tok++; bfval2 = *(int *)tok;