1
0
mirror of https://github.com/lefticus/6502-cpp.git synced 2025-07-15 15:24:06 +00:00

Remove redundant flag fix-ups

This commit is contained in:
Jason Turner
2021-06-10 21:43:36 -06:00
parent d5c8460e83
commit 17962801a0
2 changed files with 2 additions and 1 deletions

View File

@@ -262,7 +262,7 @@ bool optimize(std::vector<mos6502> &instructions, [[maybe_unused]] const Persona
if (instructions[op].opcode == mos6502::OpCode::lda || instructions[op].opcode == mos6502::OpCode::bcc
|| instructions[op].opcode == mos6502::OpCode::bcs || instructions[op].opcode == mos6502::OpCode::ldy
|| instructions[op].opcode == mos6502::OpCode::inc || instructions[op].opcode == mos6502::OpCode::clc
|| instructions[op].opcode == mos6502::OpCode::sec) {
|| instructions[op].opcode == mos6502::OpCode::sec || instructions[op].text.starts_with("; Handle N / S")) {
if (instructions[op - 1].text == "; END remove if next is lda, bcc, bcs, ldy, inc, clc, sec"
|| (instructions[op - 2].text == "; END remove if next is lda, bcc, bcs, ldy, inc, clc, sec"
&& instructions[op - 1].type == ASMLine::Type::Directive)) {