Skip to content

Conversation

aman4150
Copy link
Collaborator

@aman4150 aman4150 commented Aug 14, 2025

Instead we emit a single handler that does both loading the immediate and jumping to the target.

Note, it does makes this expensive, because now we have to resolve the jump every time. But this is inline to what we have for load_imm_and_jump_indirect.

Fixes: #318

@koute
Copy link
Collaborator

koute commented Aug 15, 2025

Note, it does makes this expensive, because now we have to resolve the jump every time. But this is inline to what we have for load_imm_and_jump_indirect.

We don't have to. :P This should work the same as it did before, i.e. only resolve the jump once when it first executes, instead of doing it each time.

@aman4150 aman4150 force-pushed the load_imm_and_jump_opt branch from 51b9a4e to 8084f10 Compare August 15, 2025 13:15
@aman4150 aman4150 requested a review from koute August 19, 2025 11:10
@aman4150 aman4150 force-pushed the load_imm_and_jump_opt branch from 8084f10 to 0b73a47 Compare August 22, 2025 10:12
@koute
Copy link
Collaborator

koute commented Aug 26, 2025

LGTM

Instead we emit a single handler that does both loading the immediate
and jumping to the target.

Signed-off-by: Aman <[email protected]>
@aman4150 aman4150 force-pushed the load_imm_and_jump_opt branch from 0b73a47 to 8d463f4 Compare September 2, 2025 09:02
@aman4150 aman4150 enabled auto-merge (rebase) September 2, 2025 09:02
@aman4150 aman4150 merged commit 49a4875 into paritytech:master Sep 2, 2025
12 checks passed
@aman4150 aman4150 deleted the load_imm_and_jump_opt branch September 2, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make load_imm_and_jump in the interpreter emit only one compiled instruction
2 participants