You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JUMPR and JUMPS instructions in assembly are defined to take
an offset in bytes, but the real CPU instruction expects this to
be expressed in 32-bit words. Thus, the assembler needs to
translate offsets into words (32-bits). i.e. 4 bytes is 1 word.
Only immediate values, which are multiples of 4 are allowed. Other
values will result in a ValueError. (binutils-esp32ulp actually
allows other values and rounds the result, but to get the exact same
behaviour as binutils with its peculiarities would require a bigger
change for a case, which might more likely represent a mistake than
a useful offset)
Note, since py-esp32-ulp already tracks label offsets in 32-bit words
internally, this conversion is only necessary for immediate offsets.
0 commit comments