mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[WebAssembly] Run varargs codegen test with non-emscripten triple
This is a followup from D105749 to cover both triples in the case where they differ.
This commit is contained in:
parent
8ba7df9183
commit
ca2e9aa30c
@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s
|
||||
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=EMSCRIPTEN
|
||||
; RUN: llc < %s -mtriple wasm32-unknown-unknown -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=UNKNOWN
|
||||
|
||||
; Test varargs constructs.
|
||||
|
||||
@ -165,21 +166,40 @@ define void @nonlegal_fixed(fp128 %x, ...) nounwind {
|
||||
; Test that an fp128 argument is properly aligned and allocated
|
||||
; within a vararg buffer.
|
||||
|
||||
; CHECK-LABEL: call_fp128_alignment:
|
||||
; CHECK: global.get $push5=, __stack_pointer
|
||||
; CHECK-NEXT: i32.const $push6=, 32
|
||||
; CHECK-NEXT: i32.sub $push10=, $pop5, $pop6
|
||||
; CHECK-NEXT: local.tee $push9=, $1=, $pop10
|
||||
; CHECK-NEXT: global.set __stack_pointer, $pop9
|
||||
; CHECK-NEXT: i32.const $push0=, 16
|
||||
; CHECK-NEXT: i32.add $push1=, $1, $pop0
|
||||
; CHECK-NEXT: i64.const $push2=, -9223372036854775808
|
||||
; CHECK-NEXT: i64.store 0($pop1), $pop2
|
||||
; CHECK-NEXT: i64.const $push3=, 1
|
||||
; CHECK-NEXT: i64.store 8($1), $pop3
|
||||
; CHECK-NEXT: i32.const $push4=, 7
|
||||
; CHECK-NEXT: i32.store 0($1), $pop4
|
||||
; CHECK-NEXT: call callee, $1
|
||||
; EMSCRIPTEN-LABEL: call_fp128_alignment:
|
||||
; EMSCRIPTEN: global.get $push5=, __stack_pointer
|
||||
; EMSCRIPTEN-NEXT: i32.const $push6=, 32
|
||||
; EMSCRIPTEN-NEXT: i32.sub $push10=, $pop5, $pop6
|
||||
; EMSCRIPTEN-NEXT: local.tee $push9=, $1=, $pop10
|
||||
; EMSCRIPTEN-NEXT: global.set __stack_pointer, $pop9
|
||||
; EMSCRIPTEN-NEXT: i32.const $push0=, 16
|
||||
; EMSCRIPTEN-NEXT: i32.add $push1=, $1, $pop0
|
||||
; EMSCRIPTEN-NEXT: i64.const $push2=, -9223372036854775808
|
||||
; EMSCRIPTEN-NEXT: i64.store 0($pop1), $pop2
|
||||
; EMSCRIPTEN-NEXT: i64.const $push3=, 1
|
||||
; EMSCRIPTEN-NEXT: i64.store 8($1), $pop3
|
||||
; EMSCRIPTEN-NEXT: i32.const $push4=, 7
|
||||
; EMSCRIPTEN-NEXT: i32.store 0($1), $pop4
|
||||
; EMSCRIPTEN-NEXT: call callee, $1
|
||||
|
||||
; Alignment of fp128 is a current disagreement between emscripten and others.
|
||||
; UNKNOWN-LABEL: call_fp128_alignment:
|
||||
; UNKNOWN: global.get $push7=, __stack_pointer
|
||||
; UNKNOWN-NEXT: i32.const $push8=, 32
|
||||
; UNKNOWN-NEXT: i32.sub $push12=, $pop7, $pop8
|
||||
; UNKNOWN-NEXT: local.tee $push11=, $1=, $pop12
|
||||
; UNKNOWN-NEXT: global.set __stack_pointer, $pop11
|
||||
; UNKNOWN-NEXT: i32.const $push0=, 24
|
||||
; UNKNOWN-NEXT: i32.add $push1=, $1, $pop0
|
||||
; UNKNOWN-NEXT: i64.const $push2=, -9223372036854775808
|
||||
; UNKNOWN-NEXT: i64.store 0($pop1), $pop2
|
||||
; UNKNOWN-NEXT: i32.const $push3=, 16
|
||||
; UNKNOWN-NEXT: i32.add $push4=, $1, $pop3
|
||||
; UNKNOWN-NEXT: i64.const $push5=, 1
|
||||
; UNKNOWN-NEXT: i64.store 0($pop4), $pop5
|
||||
; UNKNOWN-NEXT: i32.const $push6=, 7
|
||||
; UNKNOWN-NEXT: i32.store 0($1), $pop6
|
||||
; UNKNOWN-NEXT: call callee, $1
|
||||
define void @call_fp128_alignment(i8* %p) {
|
||||
entry:
|
||||
call void (...) @callee(i8 7, fp128 0xL00000000000000018000000000000000)
|
||||
|
Loading…
Reference in New Issue
Block a user