Skip to content

Commit bc6d3f8

Browse files
authored
Fix vmctx used in component traps (#12642)
Fixes a typo from #12626
1 parent 065baac commit bc6d3f8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/cranelift/src/compiler/component.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ impl<'a> TrampolineCompiler<'a> {
15511551
(
15521552
TrapTranslator {
15531553
compiler: self.compiler,
1554-
vmctx: self.builder.func.dfg.block_params(self.block0)[0],
1554+
vmctx: self.caller_vmctx(),
15551555
builtins: &mut self.builtins,
15561556
},
15571557
&mut self.builder,

tests/disas/component-may-leave-without-signals-based-traps.wat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
;; 129: movq %rbx, %rsi
4646
;; 12c: movq 0x10(%rsi), %rax
4747
;; 130: movq 0x198(%rax), %rax
48-
;; 137: movq %rsi, %rdi
48+
;; 137: movq %rbx, %rdi
4949
;; 13a: callq *%rax
5050
;; 13c: ud2
51-
;; 13e: movq %rdi, %rbx
52-
;; 141: movl $0x17, %esi
51+
;; 13e: movl $0x17, %esi
52+
;; 143: movq %rbx, %rdi
5353
;; 146: callq 0x6a
5454
;; 14b: movq %rbx, %rdi
5555
;; 14e: callq 0x9b

0 commit comments

Comments
 (0)