From 3a021326947fbae33c2a4bfd6124627cb3c94655 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Mon, 9 Aug 2021 14:26:25 -0700 Subject: [PATCH] Update 64tass code gen 64tass v1.55.2176 added a missing undocumented op, so we can remove the workaround unless we're configured for an older version. --- SourceGen/AsmGen/AsmTass64.cs | 10 ++++++++-- SourceGen/RuntimeData/Help/codegen.html | 6 +++--- .../Expected/10000-allops-value-6502_64tass.S | 2 +- .../Expected/10010-allops-zero-6502_64tass.S | 2 +- SourceGen/SGTestData/Expected/20100-label-dp_64tass.S | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/SourceGen/AsmGen/AsmTass64.cs b/SourceGen/AsmGen/AsmTass64.cs index 38f51ef..bf4921b 100644 --- a/SourceGen/AsmGen/AsmTass64.cs +++ b/SourceGen/AsmGen/AsmTass64.cs @@ -127,6 +127,8 @@ namespace SourceGen.AsmGen { // Version we're coded against. private static CommonUtil.Version V1_53 = new CommonUtil.Version(1, 53, 1515); + private static CommonUtil.Version V1_54 = new CommonUtil.Version(1, 54, 1900); + private static CommonUtil.Version V1_55 = new CommonUtil.Version(1, 55, 2176); private static CommonUtil.Version V1_56 = new CommonUtil.Version(1, 56, 2625); // Pseudo-op string constants. @@ -410,11 +412,15 @@ namespace SourceGen.AsmGen { return null; } else if (op == OpDef.OpSHA_DPIndIndexY) { // not recognized ($93) - return null; + if (mAsmVersion < V1_55) { + return null; + } } } if (op == OpDef.OpWDM_WDM) { - // 64tass v1.54 doesn't like this to have an operand. Output as hex. + // 64tass v1.53 doesn't know what this is. + // 64tass v1.55 doesn't like this to have an operand. + // Output as hex. return null; } return string.Empty; // indicate original is fine diff --git a/SourceGen/RuntimeData/Help/codegen.html b/SourceGen/RuntimeData/Help/codegen.html index 74cb95d..4996f54 100644 --- a/SourceGen/RuntimeData/Help/codegen.html +++ b/SourceGen/RuntimeData/Help/codegen.html @@ -166,15 +166,15 @@ code, but also needs to know how to handle the corner cases.

64tass

-

Tested versions: v1.53.1515, v1.54.1900, v1.56.2625 +

Tested versions: v1.53.1515, v1.54.1900, v1.55.2176, v1.56.2625 [web site]

Bugs:

Quirks:

diff --git a/SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S b/SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S index f9e5e98..37444e1 100644 --- a/SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S +++ b/SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S @@ -182,7 +182,7 @@ L1124 rra ($ff),y _L1166 sta ($ff),y .byte $92 -L1169 .byte $93,$ff +L1169 sha ($ff),y sty $ff,x sta $ff,x stx $ff,y diff --git a/SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S index 8019011..e973d43 100644 --- a/SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S +++ b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S @@ -182,7 +182,7 @@ L1124 rra ($00),y _L1166 sta ($00),y .byte $92 -L1169 .byte $93,$00 +L1169 sha ($00),y sty $00,x sta $00,x stx $00,y diff --git a/SourceGen/SGTestData/Expected/20100-label-dp_64tass.S b/SourceGen/SGTestData/Expected/20100-label-dp_64tass.S index ae18b78..dd02b79 100644 --- a/SourceGen/SGTestData/Expected/20100-label-dp_64tass.S +++ b/SourceGen/SGTestData/Expected/20100-label-dp_64tass.S @@ -182,7 +182,7 @@ L1124 rra (L0080),y _L1166 sta (L0080),y .byte $92 -L1169 .byte $93,$80 +L1169 sha (L0080),y sty L0080,x sta L0080,x stx L0080,y