add m740 to macpack cpu, add .ifpm740, add regression test for those
This commit is contained in:
@@ -8,7 +8,7 @@ CPU_ISET_65C02 = $0020
|
|||||||
CPU_ISET_65816 = $0040
|
CPU_ISET_65816 = $0040
|
||||||
CPU_ISET_SWEET16 = $0080
|
CPU_ISET_SWEET16 = $0080
|
||||||
CPU_ISET_HUC6280 = $0100
|
CPU_ISET_HUC6280 = $0100
|
||||||
;CPU_ISET_M740 = $0200 not actually implemented
|
CPU_ISET_M740 = $0200
|
||||||
CPU_ISET_4510 = $0400
|
CPU_ISET_4510 = $0400
|
||||||
|
|
||||||
; CPU capabilities
|
; CPU capabilities
|
||||||
@@ -22,3 +22,4 @@ CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816
|
|||||||
CPU_SWEET16 = CPU_ISET_SWEET16
|
CPU_SWEET16 = CPU_ISET_SWEET16
|
||||||
CPU_HUC6280 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_HUC6280
|
CPU_HUC6280 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_HUC6280
|
||||||
CPU_4510 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_4510
|
CPU_4510 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_4510
|
||||||
|
CPU_M740 = CPU_ISET_6502|CPU_ISET_M740
|
||||||
|
|||||||
@@ -434,6 +434,16 @@ void DoConditionals (void)
|
|||||||
CalcOverallIfCond ();
|
CalcOverallIfCond ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TOK_IFPM740:
|
||||||
|
D = AllocIf (".IFPM740", 1);
|
||||||
|
NextTok ();
|
||||||
|
if (IfCond) {
|
||||||
|
SetIfCond (D, GetCPU() == CPU_M740);
|
||||||
|
}
|
||||||
|
ExpectSep ();
|
||||||
|
CalcOverallIfCond ();
|
||||||
|
break;
|
||||||
|
|
||||||
case TOK_IFPSC02:
|
case TOK_IFPSC02:
|
||||||
D = AllocIf (".IFPSC02", 1);
|
D = AllocIf (".IFPSC02", 1);
|
||||||
NextTok ();
|
NextTok ();
|
||||||
@@ -489,6 +499,7 @@ int CheckConditionals (void)
|
|||||||
case TOK_IFP816:
|
case TOK_IFP816:
|
||||||
case TOK_IFPC02:
|
case TOK_IFPC02:
|
||||||
case TOK_IFPDTV:
|
case TOK_IFPDTV:
|
||||||
|
case TOK_IFPM740:
|
||||||
case TOK_IFPSC02:
|
case TOK_IFPSC02:
|
||||||
case TOK_IFREF:
|
case TOK_IFREF:
|
||||||
DoConditionals ();
|
DoConditionals ();
|
||||||
|
|||||||
@@ -2135,6 +2135,7 @@ static CtrlDesc CtrlCmdTab [] = {
|
|||||||
{ ccKeepToken, DoConditionals }, /* .IFP816 */
|
{ ccKeepToken, DoConditionals }, /* .IFP816 */
|
||||||
{ ccKeepToken, DoConditionals }, /* .IFPC02 */
|
{ ccKeepToken, DoConditionals }, /* .IFPC02 */
|
||||||
{ ccKeepToken, DoConditionals }, /* .IFPDTV */
|
{ ccKeepToken, DoConditionals }, /* .IFPDTV */
|
||||||
|
{ ccKeepToken, DoConditionals }, /* .IFPM740 */
|
||||||
{ ccKeepToken, DoConditionals }, /* .IFPSC02 */
|
{ ccKeepToken, DoConditionals }, /* .IFPSC02 */
|
||||||
{ ccKeepToken, DoConditionals }, /* .IFREF */
|
{ ccKeepToken, DoConditionals }, /* .IFREF */
|
||||||
{ ccNone, DoImport },
|
{ ccNone, DoImport },
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ struct DotKeyword {
|
|||||||
{ ".IFP816", TOK_IFP816 },
|
{ ".IFP816", TOK_IFP816 },
|
||||||
{ ".IFPC02", TOK_IFPC02 },
|
{ ".IFPC02", TOK_IFPC02 },
|
||||||
{ ".IFPDTV", TOK_IFPDTV },
|
{ ".IFPDTV", TOK_IFPDTV },
|
||||||
|
{ ".IFPM740", TOK_IFPM740 },
|
||||||
{ ".IFPSC02", TOK_IFPSC02 },
|
{ ".IFPSC02", TOK_IFPSC02 },
|
||||||
{ ".IFREF", TOK_IFREF },
|
{ ".IFREF", TOK_IFREF },
|
||||||
{ ".IMPORT", TOK_IMPORT },
|
{ ".IMPORT", TOK_IMPORT },
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ typedef enum token_t {
|
|||||||
TOK_IFP816,
|
TOK_IFP816,
|
||||||
TOK_IFPC02,
|
TOK_IFPC02,
|
||||||
TOK_IFPDTV,
|
TOK_IFPDTV,
|
||||||
|
TOK_IFPM740,
|
||||||
TOK_IFPSC02,
|
TOK_IFPSC02,
|
||||||
TOK_IFREF,
|
TOK_IFREF,
|
||||||
TOK_IMPORT,
|
TOK_IMPORT,
|
||||||
|
|||||||
@@ -28,6 +28,10 @@
|
|||||||
sac #$00
|
sac #$00
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.ifpm740
|
||||||
|
jsr $ff12
|
||||||
|
.endif
|
||||||
|
|
||||||
|
|
||||||
; step 2: check for bitwise compatibility of instructions sets
|
; step 2: check for bitwise compatibility of instructions sets
|
||||||
; (made verbose for better reading with hexdump/hd(1))
|
; (made verbose for better reading with hexdump/hd(1))
|
||||||
@@ -72,3 +76,7 @@
|
|||||||
.byte 0,"CPU_ISET_6502DTV"
|
.byte 0,"CPU_ISET_6502DTV"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if (.cpu .bitand CPU_ISET_M740)
|
||||||
|
.byte 0,"CPU_ISET_M740"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
|||||||
BIN
test/asm/cpudetect/m740-cpudetect.ref
Normal file
BIN
test/asm/cpudetect/m740-cpudetect.ref
Normal file
Binary file not shown.
Reference in New Issue
Block a user