We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e647bcc commit 1cb0db3Copy full SHA for 1cb0db3
esp32_ulp/opcodes.py
@@ -619,7 +619,7 @@ def i_jump(target, condition='--'):
619
raise ValueError("invalid flags condition")
620
if target.type == IMM or target.type == SYM:
621
_bx.dreg = 0
622
- _bx.addr = get_abs(target)
+ _bx.addr = get_abs(target) if target.type == SYM else get_abs(target) >> 2 # bitwise version of "// 4"
623
_bx.unused = 0
624
_bx.reg = 0
625
_bx.type = jump_type
tests/compat/jumps.S
@@ -5,6 +5,12 @@
5
entry:
6
nop
7
8
+ # simple jumps
9
+ jump entry
10
+ jump later
11
+ jump 0x120, EQ
12
+ jump -288, EQ
13
+
14
# jumps with labels
15
jumps entry, 42, lt
16
0 commit comments