forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cranelift: Add fixed register constraints to indirect calls with `tai…
…l` calling convention This is a workaround to fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60035 in the meantime, until bytecodealliance/regalloc2#145 is fixed. Co-Authored-By: Jamey Sharp <[email protected]> Co-Authored-By: Trevor Elliott <[email protected]>
- Loading branch information
1 parent
0c98078
commit a742cd4
Showing
11 changed files
with
353 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
cranelift/filetests/filetests/isa/aarch64/fuzzbug-60035.clif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
test compile precise-output | ||
target aarch64 | ||
|
||
function u1:6() system_v { | ||
sig0 = () tail | ||
fn0 = u1:7 sig0 | ||
|
||
block0: | ||
v5 = func_addr.i64 fn0 | ||
call_indirect sig0, v5() | ||
call_indirect sig0, v5() | ||
return | ||
} | ||
|
||
; VCode: | ||
; stp fp, lr, [sp, #-16]! | ||
; mov fp, sp | ||
; stp x27, x28, [sp, #-16]! | ||
; stp x25, x26, [sp, #-16]! | ||
; stp x23, x24, [sp, #-16]! | ||
; stp x21, x22, [sp, #-16]! | ||
; stp x19, x20, [sp, #-16]! | ||
; stp d14, d15, [sp, #-16]! | ||
; stp d12, d13, [sp, #-16]! | ||
; stp d10, d11, [sp, #-16]! | ||
; stp d8, d9, [sp, #-16]! | ||
; sub sp, sp, #16 | ||
; block0: | ||
; load_ext_name x1, User(userextname0)+0 | ||
; str x1, [sp] | ||
; ldr x1, [sp] | ||
; blr x1 | ||
; ldr x1, [sp] | ||
; blr x1 | ||
; add sp, sp, #16 | ||
; ldp d8, d9, [sp], #16 | ||
; ldp d10, d11, [sp], #16 | ||
; ldp d12, d13, [sp], #16 | ||
; ldp d14, d15, [sp], #16 | ||
; ldp x19, x20, [sp], #16 | ||
; ldp x21, x22, [sp], #16 | ||
; ldp x23, x24, [sp], #16 | ||
; ldp x25, x26, [sp], #16 | ||
; ldp x27, x28, [sp], #16 | ||
; ldp fp, lr, [sp], #16 | ||
; ret | ||
; | ||
; Disassembled: | ||
; block0: ; offset 0x0 | ||
; stp x29, x30, [sp, #-0x10]! | ||
; mov x29, sp | ||
; stp x27, x28, [sp, #-0x10]! | ||
; stp x25, x26, [sp, #-0x10]! | ||
; stp x23, x24, [sp, #-0x10]! | ||
; stp x21, x22, [sp, #-0x10]! | ||
; stp x19, x20, [sp, #-0x10]! | ||
; stp d14, d15, [sp, #-0x10]! | ||
; stp d12, d13, [sp, #-0x10]! | ||
; stp d10, d11, [sp, #-0x10]! | ||
; stp d8, d9, [sp, #-0x10]! | ||
; sub sp, sp, #0x10 | ||
; block1: ; offset 0x30 | ||
; ldr x1, #0x38 | ||
; b #0x40 | ||
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 u1:7 0 | ||
; .byte 0x00, 0x00, 0x00, 0x00 | ||
; stur x1, [sp] | ||
; ldur x1, [sp] | ||
; blr x1 | ||
; ldur x1, [sp] | ||
; blr x1 | ||
; add sp, sp, #0x10 | ||
; ldp d8, d9, [sp], #0x10 | ||
; ldp d10, d11, [sp], #0x10 | ||
; ldp d12, d13, [sp], #0x10 | ||
; ldp d14, d15, [sp], #0x10 | ||
; ldp x19, x20, [sp], #0x10 | ||
; ldp x21, x22, [sp], #0x10 | ||
; ldp x23, x24, [sp], #0x10 | ||
; ldp x25, x26, [sp], #0x10 | ||
; ldp x27, x28, [sp], #0x10 | ||
; ldp x29, x30, [sp], #0x10 | ||
; ret | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.