Skip to content

Commit

Permalink
perf: Remove double jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasvr committed Oct 21, 2020
1 parent a5d3f69 commit 8d19ac1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1692,10 +1692,8 @@ IF MCU_48MHZ == 1
anl A, #7Fh
ENDIF
mov Temp2, A
jnb Flags1.HIGH_RPM, ($+5) ; Branch if high rpm
ajmp calc_next_comm_timing_fast

sjmp calc_next_comm_normal
jnb Flags1.HIGH_RPM, calc_next_comm_normal ; Branch normal rpm
ajmp calc_next_comm_timing_fast ; Branch high rpm

calc_next_comm_startup:
mov Temp6, Prev_Comm_X
Expand Down Expand Up @@ -2332,10 +2330,8 @@ comp_read_wrong_not_startup:
clr C
mov A, Temp1
subb A, Temp2
jc ($+4)
sjmp wait_for_comp_out_start ; If above initial requirement - go back and restart

sjmp comp_check_timeout ; Otherwise - take another reading
jc comp_check_timeout ; If below initial requirement - take another reading
sjmp wait_for_comp_out_start ; Otherwise - go back and restart

comp_read_wrong_extend_timeout:
clr Flags0.DEMAG_DETECTED ; Clear demag detected flag
Expand Down

0 comments on commit 8d19ac1

Please # to comment.