mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 04:22:57 +02:00
c7f8ab2cc1
Summary: Made it convert from register to stack based instructions, and removed the registers. Fixes to related code that was expecting register based instructions. Added the correct testing flag to all tests, depending on what the format they were expecting so far. Translated one test to stack format as example: reg-stackify-stack.ll tested: llvm-lit -v `find test -name WebAssembly` unittests/MC/* Reviewers: dschuff, sunfish Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits, jfb Differential Revision: https://reviews.llvm.org/D51241 llvm-svn: 340750
52 lines
1.6 KiB
LLVM
52 lines
1.6 KiB
LLVM
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s
|
|
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -fast-isel -fast-isel-abort=1 | FileCheck %s
|
|
|
|
; Test that basic stores are assembled properly.
|
|
|
|
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
; CHECK-LABEL: sti32:
|
|
; CHECK-NEXT: .param i32, i32{{$}}
|
|
; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: get_local $push[[L1:[0-9]+]]=, 1{{$}}
|
|
; CHECK-NEXT: i32.store 0($pop[[L0]]), $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: return{{$}}
|
|
define void @sti32(i32 *%p, i32 %v) {
|
|
store i32 %v, i32* %p
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: sti64:
|
|
; CHECK-NEXT: .param i32, i64{{$}}
|
|
; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: get_local $push[[L1:[0-9]+]]=, 1{{$}}
|
|
; CHECK-NEXT: i64.store 0($pop[[L0]]), $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: return{{$}}
|
|
define void @sti64(i64 *%p, i64 %v) {
|
|
store i64 %v, i64* %p
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: stf32:
|
|
; CHECK-NEXT: .param i32, f32{{$}}
|
|
; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: get_local $push[[L1:[0-9]+]]=, 1{{$}}
|
|
; CHECK-NEXT: f32.store 0($pop[[L0]]), $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: return{{$}}
|
|
define void @stf32(float *%p, float %v) {
|
|
store float %v, float* %p
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: stf64:
|
|
; CHECK-NEXT: .param i32, f64{{$}}
|
|
; CHECK-NEXT: get_local $push[[L0:[0-9]+]]=, 0{{$}}
|
|
; CHECK-NEXT: get_local $push[[L1:[0-9]+]]=, 1{{$}}
|
|
; CHECK-NEXT: f64.store 0($pop[[L0]]), $pop[[L1]]{{$}}
|
|
; CHECK-NEXT: return{{$}}
|
|
define void @stf64(double *%p, double %v) {
|
|
store double %v, double* %p
|
|
ret void
|
|
}
|