Browse Source
This is a workaround to fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60035 in the meantime, until https://github.com/bytecodealliance/regalloc2/issues/145 is fixed. Co-authored-by: Jamey Sharp <jsharp@fastly.com> Co-authored-by: Trevor Elliott <telliott@fastly.com>pull/6634/head
Nick Fitzgerald
1 year ago
committed by
GitHub
11 changed files with 353 additions and 23 deletions
@ -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 |
|||
|
@ -0,0 +1,141 @@ |
|||
test compile precise-output |
|||
target riscv64 |
|||
|
|||
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: |
|||
; add sp,-16 |
|||
; sd ra,8(sp) |
|||
; sd fp,0(sp) |
|||
; mv fp,sp |
|||
; sd s1,-8(sp) |
|||
; sd s2,-16(sp) |
|||
; sd s3,-24(sp) |
|||
; sd s4,-32(sp) |
|||
; sd s5,-40(sp) |
|||
; sd s6,-48(sp) |
|||
; sd s7,-56(sp) |
|||
; sd s8,-64(sp) |
|||
; sd s9,-72(sp) |
|||
; sd s10,-80(sp) |
|||
; sd s11,-88(sp) |
|||
; fsd fs2,-96(sp) |
|||
; fsd fs3,-104(sp) |
|||
; fsd fs4,-112(sp) |
|||
; fsd fs5,-120(sp) |
|||
; fsd fs6,-128(sp) |
|||
; fsd fs7,-136(sp) |
|||
; fsd fs8,-144(sp) |
|||
; fsd fs9,-152(sp) |
|||
; fsd fs10,-160(sp) |
|||
; fsd fs11,-168(sp) |
|||
; add sp,-192 |
|||
; block0: |
|||
; load_sym t0,userextname0+0 |
|||
; sd t0,0(nominal_sp) |
|||
; ld t0,0(nominal_sp) |
|||
; callind t0 |
|||
; ld t0,0(nominal_sp) |
|||
; callind t0 |
|||
; add sp,+192 |
|||
; ld s1,-8(sp) |
|||
; ld s2,-16(sp) |
|||
; ld s3,-24(sp) |
|||
; ld s4,-32(sp) |
|||
; ld s5,-40(sp) |
|||
; ld s6,-48(sp) |
|||
; ld s7,-56(sp) |
|||
; ld s8,-64(sp) |
|||
; ld s9,-72(sp) |
|||
; ld s10,-80(sp) |
|||
; ld s11,-88(sp) |
|||
; fld fs2,-96(sp) |
|||
; fld fs3,-104(sp) |
|||
; fld fs4,-112(sp) |
|||
; fld fs5,-120(sp) |
|||
; fld fs6,-128(sp) |
|||
; fld fs7,-136(sp) |
|||
; fld fs8,-144(sp) |
|||
; fld fs9,-152(sp) |
|||
; fld fs10,-160(sp) |
|||
; fld fs11,-168(sp) |
|||
; ld ra,8(sp) |
|||
; ld fp,0(sp) |
|||
; add sp,+16 |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; addi sp, sp, -0x10 |
|||
; sd ra, 8(sp) |
|||
; sd s0, 0(sp) |
|||
; ori s0, sp, 0 |
|||
; sd s1, -8(sp) |
|||
; sd s2, -0x10(sp) |
|||
; sd s3, -0x18(sp) |
|||
; sd s4, -0x20(sp) |
|||
; sd s5, -0x28(sp) |
|||
; sd s6, -0x30(sp) |
|||
; sd s7, -0x38(sp) |
|||
; sd s8, -0x40(sp) |
|||
; sd s9, -0x48(sp) |
|||
; sd s10, -0x50(sp) |
|||
; sd s11, -0x58(sp) |
|||
; fsd fs2, -0x60(sp) |
|||
; fsd fs3, -0x68(sp) |
|||
; fsd fs4, -0x70(sp) |
|||
; fsd fs5, -0x78(sp) |
|||
; fsd fs6, -0x80(sp) |
|||
; fsd fs7, -0x88(sp) |
|||
; fsd fs8, -0x90(sp) |
|||
; fsd fs9, -0x98(sp) |
|||
; fsd fs10, -0xa0(sp) |
|||
; fsd fs11, -0xa8(sp) |
|||
; addi sp, sp, -0xc0 |
|||
; block1: ; offset 0x68 |
|||
; auipc t0, 0 |
|||
; ld t0, 0xc(t0) |
|||
; j 0xc |
|||
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 u1:7 0 |
|||
; .byte 0x00, 0x00, 0x00, 0x00 |
|||
; sd t0, 0(sp) |
|||
; ld t0, 0(sp) |
|||
; jalr t0 |
|||
; ld t0, 0(sp) |
|||
; jalr t0 |
|||
; addi sp, sp, 0xc0 |
|||
; ld s1, -8(sp) |
|||
; ld s2, -0x10(sp) |
|||
; ld s3, -0x18(sp) |
|||
; ld s4, -0x20(sp) |
|||
; ld s5, -0x28(sp) |
|||
; ld s6, -0x30(sp) |
|||
; ld s7, -0x38(sp) |
|||
; ld s8, -0x40(sp) |
|||
; ld s9, -0x48(sp) |
|||
; ld s10, -0x50(sp) |
|||
; ld s11, -0x58(sp) |
|||
; fld fs2, -0x60(sp) |
|||
; fld fs3, -0x68(sp) |
|||
; fld fs4, -0x70(sp) |
|||
; fld fs5, -0x78(sp) |
|||
; fld fs6, -0x80(sp) |
|||
; fld fs7, -0x88(sp) |
|||
; fld fs8, -0x90(sp) |
|||
; fld fs9, -0x98(sp) |
|||
; fld fs10, -0xa0(sp) |
|||
; fld fs11, -0xa8(sp) |
|||
; ld ra, 8(sp) |
|||
; ld s0, 0(sp) |
|||
; addi sp, sp, 0x10 |
|||
; ret |
|||
|
@ -0,0 +1,67 @@ |
|||
test compile precise-output |
|||
target x86_64 |
|||
|
|||
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: |
|||
; pushq %rbp |
|||
; movq %rsp, %rbp |
|||
; subq %rsp, $64, %rsp |
|||
; movq %rbx, 16(%rsp) |
|||
; movq %r12, 24(%rsp) |
|||
; movq %r13, 32(%rsp) |
|||
; movq %r14, 40(%rsp) |
|||
; movq %r15, 48(%rsp) |
|||
; block0: |
|||
; load_ext_name userextname0+0, %r15 |
|||
; movq %r15, rsp(0 + virtual offset) |
|||
; movq rsp(0 + virtual offset), %r15 |
|||
; call *%r15 |
|||
; movq rsp(0 + virtual offset), %r15 |
|||
; call *%r15 |
|||
; movq 16(%rsp), %rbx |
|||
; movq 24(%rsp), %r12 |
|||
; movq 32(%rsp), %r13 |
|||
; movq 40(%rsp), %r14 |
|||
; movq 48(%rsp), %r15 |
|||
; addq %rsp, $64, %rsp |
|||
; movq %rbp, %rsp |
|||
; popq %rbp |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; pushq %rbp |
|||
; movq %rsp, %rbp |
|||
; subq $0x40, %rsp |
|||
; movq %rbx, 0x10(%rsp) |
|||
; movq %r12, 0x18(%rsp) |
|||
; movq %r13, 0x20(%rsp) |
|||
; movq %r14, 0x28(%rsp) |
|||
; movq %r15, 0x30(%rsp) |
|||
; block1: ; offset 0x21 |
|||
; movabsq $0, %r15 ; reloc_external Abs8 u1:7 0 |
|||
; movq %r15, (%rsp) |
|||
; movq (%rsp), %r15 |
|||
; callq *%r15 |
|||
; movq (%rsp), %r15 |
|||
; callq *%r15 |
|||
; movq 0x10(%rsp), %rbx |
|||
; movq 0x18(%rsp), %r12 |
|||
; movq 0x20(%rsp), %r13 |
|||
; movq 0x28(%rsp), %r14 |
|||
; movq 0x30(%rsp), %r15 |
|||
; addq $0x40, %rsp |
|||
; movq %rbp, %rsp |
|||
; popq %rbp |
|||
; retq |
|||
|
Loading…
Reference in new issue