Kinsey Moore commented: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5227#note_120744


Upon closer inspection, this may be a codegen bug. There is a comparison 
followed by a branch high:
```
// w0 is 3
cmp w0, #1 // translates to a subtraction with zero-register as the target 
which clears condition flag Z (result is non-zero) and sets condition flag C 
(subtraction didn't cause a borrow)
b.hi 0x1cd7c // branches when Z is clear and C is set
```

The branch is taken as expected from the assembly, but that doesn't match the 
logic in the source. Correct codegen would likely avoid the preceding 
subtraction and use a `b.gt`, instead.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5227#note_120744
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to