diff --git a/pom.xml b/pom.xml index abf0918db..0146de442 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ cml.kickass kickassembler - 5.24-65ce02.d + 5.24-65ce02.e dk.camelot64.kickass.xexplugin diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar new file mode 100644 index 000000000..0fad8a464 Binary files /dev/null and b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar differ diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.md5 b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.md5 new file mode 100644 index 000000000..6a5980e2c --- /dev/null +++ b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.md5 @@ -0,0 +1 @@ +d35f87fd307d0576de440c34320fae54 \ No newline at end of file diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.sha1 b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.sha1 new file mode 100644 index 000000000..4e4403baa --- /dev/null +++ b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.jar.sha1 @@ -0,0 +1 @@ +fea193965f72acd22809e8a308425124e36cefbd \ No newline at end of file diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom new file mode 100644 index 000000000..47e48b6f5 --- /dev/null +++ b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + cml.kickass + kickassembler + 5.24-65ce02.e + POM was created from install:install-file + diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.md5 b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.md5 new file mode 100644 index 000000000..e5c5edd7f --- /dev/null +++ b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.md5 @@ -0,0 +1 @@ +18962fc0bd9f7febf7b4a537dbb68bda \ No newline at end of file diff --git a/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.sha1 b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.sha1 new file mode 100644 index 000000000..1ee26c0e9 --- /dev/null +++ b/repo/cml/kickass/kickassembler/5.24-65ce02.e/kickassembler-5.24-65ce02.e.pom.sha1 @@ -0,0 +1 @@ +f1bda5c5c9a57c2bffbc8d6c566af673c0ccc293 \ No newline at end of file diff --git a/repo/cml/kickass/kickassembler/maven-metadata.xml b/repo/cml/kickass/kickassembler/maven-metadata.xml index 115029dda..3a0bf2cc9 100644 --- a/repo/cml/kickass/kickassembler/maven-metadata.xml +++ b/repo/cml/kickass/kickassembler/maven-metadata.xml @@ -3,7 +3,7 @@ cml.kickass kickassembler - 5.24-65ce02.d + 5.24-65ce02.e 4.19 5.7 @@ -31,7 +31,8 @@ 5.24-65ce02.b 5.24-65ce02.c 5.24-65ce02.d + 5.24-65ce02.e - 20220213103243 + 20220213212400 diff --git a/repo/cml/kickass/kickassembler/maven-metadata.xml.md5 b/repo/cml/kickass/kickassembler/maven-metadata.xml.md5 index 32ccb69ce..51eaf1d3c 100644 --- a/repo/cml/kickass/kickassembler/maven-metadata.xml.md5 +++ b/repo/cml/kickass/kickassembler/maven-metadata.xml.md5 @@ -1 +1 @@ -566035322d1120a899902e225415aea4 \ No newline at end of file +12dc7c134f8dcf276f4031702b11b5d7 \ No newline at end of file diff --git a/repo/cml/kickass/kickassembler/maven-metadata.xml.sha1 b/repo/cml/kickass/kickassembler/maven-metadata.xml.sha1 index 006c7b5b6..91e6304b4 100644 --- a/repo/cml/kickass/kickassembler/maven-metadata.xml.sha1 +++ b/repo/cml/kickass/kickassembler/maven-metadata.xml.sha1 @@ -1 +1 @@ -9d02e7968040c29f57b25cc02f1ae3c143e7b773 \ No newline at end of file +8cc20999d0045eea75ba3fff20b93c212b7cc52a \ No newline at end of file diff --git a/src/main/java/dk/camelot64/cpufamily6502/cpus/Cpu45GS02.java b/src/main/java/dk/camelot64/cpufamily6502/cpus/Cpu45GS02.java index 17fd09731..16cb10f06 100644 --- a/src/main/java/dk/camelot64/cpufamily6502/cpus/Cpu45GS02.java +++ b/src/main/java/dk/camelot64/cpufamily6502/cpus/Cpu45GS02.java @@ -65,7 +65,7 @@ public class Cpu45GS02 extends Cpu65xx { addOpcode( new int[] {0x42, 0x42, 0xA5},"ldq",CpuAddressingMode.ZP,8,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xAD},"ldq",CpuAddressingMode.ABS,9,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xB1},"ldq",CpuAddressingMode.IZY,10,"AXYZnz"); - addOpcode( new int[] {0x42, 0x42, 0xB2},"ldq",CpuAddressingMode.INZ,10,"AXYZnz"); + addOpcode( new int[] {0x42, 0x42, 0xB2},"ldq",CpuAddressingMode.IZZ,10,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xB5},"ldq",CpuAddressingMode.ZPX,9,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xB9},"ldq",CpuAddressingMode.ABY,10,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xBD},"ldq",CpuAddressingMode.ABX,10,"AXYZnz"); @@ -84,7 +84,7 @@ public class Cpu45GS02 extends Cpu65xx { addOpcode( new int[] {0x42, 0x42, 0xea, 0x52},"eorq",CpuAddressingMode.LIN,13,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xea, 0x72},"adcq",CpuAddressingMode.LIN,13,"AXYZcvnz"); addOpcode( new int[] {0x42, 0x42, 0xea, 0x92},"stq",CpuAddressingMode.LIN,13,""); - addOpcode( new int[] {0x42, 0x42, 0xea, 0xB2},"ldq",CpuAddressingMode.LIN,13,"AXYZnz"); + addOpcode( new int[] {0x42, 0x42, 0xea, 0xB2},"ldq",CpuAddressingMode.LIZ,13,"AXYZnz"); addOpcode( new int[] {0x42, 0x42, 0xea, 0xD2},"cpq",CpuAddressingMode.LIN,13,"cnz"); addOpcode( new int[] {0x42, 0x42, 0xea, 0xF2},"sbcq",CpuAddressingMode.LIN,13,"AXYZcvnz"); addOpcode( new int[] {0x42, 0x42, 0xED},"sbcq",CpuAddressingMode.ABS,9,"AXYZcvnz"); diff --git a/src/main/repo/mvn-repo-install-kickass.sh b/src/main/repo/mvn-repo-install-kickass.sh index 1d05073e2..d67c0aa20 100755 --- a/src/main/repo/mvn-repo-install-kickass.sh +++ b/src/main/repo/mvn-repo-install-kickass.sh @@ -4,7 +4,7 @@ cp ./repo/cml/kickass/kickassembler/maven-metadata.xml ./repo/cml/kickass/kickassembler/maven-metadata-local.xml # mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Applications/KickAssembler/KickAss.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.16 -mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Users/jespergravgaard/c64/kickassembler65ce02/out/KickAss65CE02.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.24-65ce02.d +mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Users/jespergravgaard/c64/kickassembler65ce02/out/KickAss65CE02.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.24-65ce02.e # Finalize by making the local metadata official pushd ./repo/cml/kickass/kickassembler diff --git a/src/test/kc/cpu-45gs02-addressing-modes.c b/src/test/kc/cpu-45gs02-addressing-modes.c index d4f3b4056..56582744f 100644 --- a/src/test/kc/cpu-45gs02-addressing-modes.c +++ b/src/test/kc/cpu-45gs02-addressing-modes.c @@ -46,10 +46,14 @@ void main() { // 65C02: ($1234,X) jmp ($1234,x) lbl3: + // 45GS02: 32bit Indirect,Z + ldq ($12),z // 45GS02: Indirect Long,Z lda (($12)),z - // 45GS02: Indirect Long - ldq (($12)) + // 45GS02: 32bit Indirect Long,Z + ldq (($12)),z + // 45GS02: 32bit Indirect Long + stq (($12)) } } diff --git a/src/test/ref/cpu-45gs02-addressing-modes.asm b/src/test/ref/cpu-45gs02-addressing-modes.asm index 29afcd238..704282b19 100644 --- a/src/test/ref/cpu-45gs02-addressing-modes.asm +++ b/src/test/ref/cpu-45gs02-addressing-modes.asm @@ -32,8 +32,10 @@ main: { lbl2: jmp ($1234,x) lbl3: + ldq ($12),z lda (($12)),z - ldq (($12)) + ldq (($12)),z + stq (($12)) // } rts } diff --git a/src/test/ref/cpu-45gs02-addressing-modes.cfg b/src/test/ref/cpu-45gs02-addressing-modes.cfg index f2cb82e4f..98b24ca13 100644 --- a/src/test/ref/cpu-45gs02-addressing-modes.cfg +++ b/src/test/ref/cpu-45gs02-addressing-modes.cfg @@ -1,7 +1,7 @@ void main() main: scope:[main] from - asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } + asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } to:main::@return main::@return: scope:[main] from main [1] return diff --git a/src/test/ref/cpu-45gs02-addressing-modes.log b/src/test/ref/cpu-45gs02-addressing-modes.log index b264e2de9..3b628db7f 100644 --- a/src/test/ref/cpu-45gs02-addressing-modes.log +++ b/src/test/ref/cpu-45gs02-addressing-modes.log @@ -4,7 +4,7 @@ CONTROL FLOW GRAPH SSA void main() main: scope:[main] from __start - asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } + asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } to:main::@return main::@return: scope:[main] from main return @@ -41,7 +41,7 @@ FINAL CONTROL FLOW GRAPH void main() main: scope:[main] from - asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } + asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } to:main::@return main::@return: scope:[main] from main [1] return @@ -54,14 +54,14 @@ void main() Initial phi equivalence classes Complete equivalence classes REGISTER UPLIFT POTENTIAL REGISTERS -Statement asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } always clobbers reg byte a reg byte x reg byte y reg byte z +Statement asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } always clobbers reg byte a reg byte x reg byte y reg byte z REGISTER UPLIFT SCOPES Uplift Scope [main] Uplift Scope [] -Uplifting [main] best 106 combination -Uplifting [] best 106 combination +Uplifting [main] best 129 combination +Uplifting [] best 129 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -80,7 +80,7 @@ ASSEMBLER BEFORE OPTIMIZATION .segment Code // main main: { - // asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } + // asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } inx lda #$12 phw #$1234 @@ -102,8 +102,10 @@ main: { lbl2: jmp ($1234,x) lbl3: + ldq ($12),z lda (($12)),z - ldq (($12)) + ldq (($12)),z + stq (($12)) jmp __breturn // main::@return __breturn: @@ -128,7 +130,7 @@ void main() FINAL ASSEMBLER -Score: 103 +Score: 126 // File Comments // Tests the different ASM addressing modes @@ -147,7 +149,7 @@ Score: 103 // main main: { // asm - // asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: lda(($12)),z ldq(($12)) } + // asm { inx lda#$12 phw#$1234 lda$12 lda$12,x ldx$12,y lda($12,x) lda($12),y ora($12),z lda($12,sp),y lda$1234 lda$1234,x lda$1234,y beqlbl1 lbeqfar bbr0$12,lbl2 lbl1: jmp($1234) lbl2: jmp($1234,x) lbl3: ldq($12),z lda(($12)),z ldq(($12)),z stq(($12)) } inx lda #$12 phw #$1234 @@ -169,8 +171,10 @@ main: { lbl2: jmp ($1234,x) lbl3: + ldq ($12),z lda (($12)),z - ldq (($12)) + ldq (($12)),z + stq (($12)) // main::@return // } // [1] return