Add support for 64-bit evaluations.
[rmac] / riscasm.c
index 79f9ae26425b2b12e1c2b333165bda61ebe5c688..63466716173eef8ae94f8a348d3dd8981e6d479b 100644 (file)
--- a/riscasm.c
+++ b/riscasm.c
@@ -174,7 +174,7 @@ void BuildRISCIntructionWord(unsigned short opcode, int reg1, int reg2)
 //
 int GetRegister(WORD rattr)
 {
-       uint32_t eval;                                  // Expression value
+       uint64_t eval;                          // Expression value
        WORD eattr;                                     // Expression attributes
        SYM * esym;                                     // External symbol involved in expr.
        TOKEN r_expr[EXPRSIZE];         // Expression token list
@@ -217,7 +217,7 @@ int GenerateRISCCode(int state)
        WORD attrflg;
        int indexed;                            // Indexed register flag
 
-       uint32_t eval;                                  // Expression value
+       uint64_t eval;                          // Expression value
        WORD eattr;                                     // Expression attributes
        SYM * esym;                                     // External symbol involved in expr.
        TOKEN r_expr[EXPRSIZE];         // Expression token list
@@ -722,7 +722,8 @@ int GenerateRISCCode(int state)
                        {
                                // CC using a constant number
                                tok++;
-                               val = *tok;
+                               tok++;          // Toss hi LONG, as most likely not 64-bit number
+                               val = *tok;     // Use lo LONG
                                tok++;
                                CHECK_COMMA;
                        }