1
0
mirror of https://github.com/lefticus/6502-cpp.git synced 2025-09-28 06:16:36 +00:00

Optimize around single instruction jump statements

This commit is contained in:
Jason Turner
2021-05-25 19:12:16 -06:00
parent 13dbaafbfd
commit bb51249b4c
2 changed files with 12 additions and 8 deletions

View File

@@ -30,6 +30,10 @@ constexpr bool is_opcode(const mos6502 &op, const auto... opcodes) { return ((op
constexpr bool is_end_of_block(const auto &begin)
{
if (begin->text.ends_with("__optimizable") || begin->op.value.ends_with("__optimizable")) {
return false;
}
if (begin->type == ASMLine::Type::Label) { return true; }
return is_opcode(*begin,