emit_arm64: EmitAddCycles: Do not emit code if cycles_to_add == 0
This commit is contained in:
parent
7dbd87ba2d
commit
fa6b58d3a8
1 changed files with 3 additions and 0 deletions
|
@ -139,6 +139,9 @@ static void EmitAddCycles(oaknut::CodeGenerator& code, EmitContext& ctx, size_t
|
||||||
if (!ctx.conf.enable_cycle_counting) {
|
if (!ctx.conf.enable_cycle_counting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (cycles_to_add == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oaknut::AddSubImm::is_valid(cycles_to_add)) {
|
if (oaknut::AddSubImm::is_valid(cycles_to_add)) {
|
||||||
code.SUB(Xticks, Xticks, cycles_to_add);
|
code.SUB(Xticks, Xticks, cycles_to_add);
|
||||||
|
|
Loading…
Reference in a new issue