@@ -2396,7 +2396,7 @@ Unit AoptObj;
stoploop := False;
end
{$ifdef CPU_SUPPORTS_OPT_COND_JUMP}
- else if (taicpu(p).opcode {$if defined(z80) or defined(mos6502)}in{$else}={$endif} aopt_condjmp) then
+ else if (taicpu(p).opcode {$if defined(z80)}in{$else}={$endif} aopt_condjmp) then
ThisPassResult := OptimizeConditionalJump(ThisLabel, p, hp1, stoploop)
{$endif CPU_SUPPORTS_OPT_COND_JUMP}
;
@@ -99,7 +99,7 @@ Const
StoreDst = 0;
aopt_uncondjmp = A_JMP;
- aopt_condjmp = [A_BPL,A_BMI,A_BVC,A_BVS,A_BCC,A_BCS,A_BNE,A_BEQ];
+ aopt_condjmp = A_Bxx;
Implementation
@@ -59,7 +59,7 @@ unit cpubase;
{ call/reg instructions are not considered as jmp instructions for the usage cases of
this set }
- jmp_instructions = [A_JMP,A_BPL,A_BMI,A_BVC,A_BVS,A_BCC,A_BCS,A_BNE,A_BEQ];
+ jmp_instructions = [A_JMP,A_Bxx];
call_jmp_instructions = [A_JSR]+jmp_instructions;
{ instructions that can have a condition }
@@ -43,36 +43,15 @@ abs $0E
zpg,X $16
abs,X $1E
-[BCC]
-rel $90
-
-[BCS]
-rel $B0
-[BEQ]
-rel $F0
[BIT]
zpg $24
abs $2C
-[BMI]
-rel $30
-[BNE]
-rel $D0
-[BPL]
-rel $10
[BRK]
void $00
-[BVC]
-rel $50
-[BVS]
-rel $70
+[Bxx]
+rel $10
[CLC]
void $18
@@ -1,2 +1,2 @@
{ don't edit, this file is generated from mos6502ins.dat; to regenerate, run 'make insdat' in the compiler directory }
-152;
+145;
@@ -4,16 +4,9 @@ A_None,
A_ADC,
A_AND,
A_ASL,
-A_BCC,
-A_BCS,
-A_BEQ,
A_BIT,
-A_BMI,
-A_BNE,
-A_BPL,
A_BRK,
-A_BVC,
-A_BVS,
+A_Bxx,
A_CLC,
A_CLD,
A_CLI,
@@ -4,16 +4,9 @@
'adc',
'and',
'asl',
-'bcc',
-'bcs',
-'beq',
'bit',
-'bmi',
-'bne',
-'bpl',
'brk',
-'bvc',
-'bvs',
+'bxx',
'clc',
'cld',
'cli',
@@ -132,24 +132,6 @@
code : $1E;
flags : 0
),
- (
- opcode : A_BCC;
- adrmode : AM_RELATIVE;
- code : $90;
- flags : 0
- ),
- opcode : A_BCS;
- code : $B0;
- opcode : A_BEQ;
- code : $F0;
(
opcode : A_BIT;
adrmode : AM_ZERO_PAGE;
@@ -162,24 +144,6 @@
code : $2C;
- opcode : A_BMI;
- code : $30;
- opcode : A_BNE;
- code : $D0;
- opcode : A_BPL;
- code : $10;
opcode : A_BRK;
adrmode : AM_IMPLICIT;
@@ -187,15 +151,9 @@
- opcode : A_BVC;
+ opcode : A_Bxx;
adrmode : AM_RELATIVE;
- code : $50;
- opcode : A_BVS;
- code : $70;
+ code : $10;