]> Shamusworld >> Repos - rmac/commitdiff
Fix for incorrect PACK/UNPACK generation. Thanks to A. Seed for reporting.
authorShamus Hammons <jlhamm@acm.org>
Wed, 4 Mar 2015 03:12:13 +0000 (21:12 -0600)
committerShamus Hammons <jlhamm@acm.org>
Wed, 4 Mar 2015 03:12:13 +0000 (21:12 -0600)
riscasm.c
version.h

index d2d594b31c5a0d0ae59c94dff306321e98db271b..37e29224a99d78a172044102beb277e0eaf661f1 100644 (file)
--- a/riscasm.c
+++ b/riscasm.c
@@ -101,8 +101,8 @@ const struct opcoderecord roptbl[] = {
        { MR_NORMI,   RI_TWO,    56 },
        { MR_NOP,     RI_NONE,   57 },
        { MR_SAT24,   RI_ONE,    62 },
        { MR_NORMI,   RI_TWO,    56 },
        { MR_NOP,     RI_NONE,   57 },
        { MR_SAT24,   RI_ONE,    62 },
-       { MR_UNPACK,  RI_ONE,    63 + GPUONLY },
-       { MR_PACK,    RI_ONE,    63 + GPUONLY },
+       { MR_UNPACK,  RI_ONE,    63 + GPUONLY | (0 << 6) },
+       { MR_PACK,    RI_ONE,    63 + GPUONLY | (1 << 6) },
        { MR_ADDQMOD, RI_NUM_32, 63 + DSPONLY },
        { MR_MOVE,    RI_MOVE,   0 },
        { MR_LOAD,    RI_LOAD,   0 },
        { MR_ADDQMOD, RI_NUM_32, 63 + DSPONLY },
        { MR_MOVE,    RI_MOVE,   0 },
        { MR_LOAD,    RI_LOAD,   0 },
@@ -140,13 +140,13 @@ void BuildRISCIntructionWord(unsigned short opcode, int reg1, int reg2)
        // Check for absolute address setting
        if (!orgwarning && !orgactive)
        {
        // Check for absolute address setting
        if (!orgwarning && !orgactive)
        {
-//             warn("GPU/DSP code outside of absolute section");
                warn("RISC code generated with no origin defined");
                orgwarning = 1;
        }
 
        int value = ((opcode & 0x3F) << 10) + ((reg1 & 0x1F) << 5) + (reg2 & 0x1F);
        D_word(value);
                warn("RISC code generated with no origin defined");
                orgwarning = 1;
        }
 
        int value = ((opcode & 0x3F) << 10) + ((reg1 & 0x1F) << 5) + (reg2 & 0x1F);
        D_word(value);
+//printf("BuildRISC: opcode=$%X, reg1=$%X, reg2=$%X, final=$%04X\n", opcode, reg1, reg2, value);
 }
 
 
 }
 
 
index 8ebcaff774854ca9933ebb5ca78859e65ea5b24e..f59c0dd0c935e0137626e650a278b4f12a81dfdc 100644 (file)
--- a/version.h
+++ b/version.h
@@ -13,6 +13,6 @@
 
 #define MAJOR   1              // Major version number
 #define MINOR   3              // Minor version number
 
 #define MAJOR   1              // Major version number
 #define MINOR   3              // Minor version number
-#define PATCH   5              // Patch release number
+#define PATCH   6              // Patch release number
 
 #endif // __VERSION_H__
 
 #endif // __VERSION_H__