File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
codegen/src/isa/pulley_shared
filetests/filetests/isa/pulley64 Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -560,12 +560,21 @@ where
560560 Writable :: from_reg ( regs:: x_reg ( 15 ) )
561561 }
562562
563- fn exception_payload_regs ( _call_conv : isa:: CallConv ) -> & ' static [ Reg ] {
563+ fn exception_payload_regs ( call_conv : isa:: CallConv ) -> & ' static [ Reg ] {
564564 const PAYLOAD_REGS : & ' static [ Reg ] = & [
565565 Reg :: from_real_reg ( regs:: px_reg ( 0 ) ) ,
566566 Reg :: from_real_reg ( regs:: px_reg ( 1 ) ) ,
567567 ] ;
568- PAYLOAD_REGS
568+ match call_conv {
569+ isa:: CallConv :: SystemV | isa:: CallConv :: Tail | isa:: CallConv :: PreserveAll => {
570+ PAYLOAD_REGS
571+ }
572+ isa:: CallConv :: Fast
573+ | isa:: CallConv :: WindowsFastcall
574+ | isa:: CallConv :: AppleAarch64
575+ | isa:: CallConv :: Probestack
576+ | isa:: CallConv :: Winch => & [ ] ,
577+ }
569578 }
570579}
571580
Original file line number Diff line number Diff line change 1+ test compile
2+ target pulley64
3+
4+ function %trigger_bug(i32) -> i32 {
5+ sig0 = (i32) -> i32 winch
6+ fn0 = %callee(i32) -> i32 winch
7+
8+ block0(v0: i32):
9+ ; try_call triggers the bug by invoking exception handling codegen
10+ ; Note: We omit exn0 because exception_payload_types is empty
11+ try_call fn0(v0), sig0, block1(ret0), [ default: block2 ]
12+
13+ block1(v1: i32):
14+ return v1
15+
16+ block2:
17+ v3 = iconst.i32 -1
18+ return v3
19+ }
You can’t perform that action at this time.
0 commit comments