Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/mpy_ld.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def fit_signed(bits, value):


def asm_jump_x86(entry):
return struct.pack("<BI", 0xE9, entry)
if fit_signed(7, entry):
return struct.pack("Bb", 0xEB, entry)
elif fit_signed(31, entry):
return struct.pack("<Bi", 0xE9, entry)
else:
raise LinkError("large jumps on x86/x64 are not supported")


def asm_jump_thumb(entry):
Expand Down
Loading