When is overflow flag set for SUB instruction?

Fredrik
Posts: 2
Joined: Fri Feb 14, 2020 9:02 pm

When is overflow flag set for SUB instruction?

Postby Fredrik » Wed Jun 25, 2025 9:00 pm

It seems that in the provided code example the ov flag is set when the result of a SUB instruction is negative or am I wrong?

/* compare with low_thr; wake up if value < low_thr */
move r3, low_thr
ld r3, r3, 0
sub r3, r0, r3
jump wake_up, ov


https://github.com/espressif/esp-idf/bl ... /ulp/adc.S

Who is online

Users browsing this forum: ChatGPT-User, Google [Bot], Semrush [Bot] and 3 guests