From ba1c50d6c1b38dc75885a24e6e9ed84c5953b590 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Mon, 25 Sep 2017 11:06:18 -0700 Subject: [PATCH] Test WebAssembly floating point constants. f64.const does not yet work on 32-bit Intel. --- cranelift/filetests/wasm/f32-arith.cton | 6 +++++- cranelift/filetests/wasm/f64-arith.cton | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cranelift/filetests/wasm/f32-arith.cton b/cranelift/filetests/wasm/f32-arith.cton index ad48b401b8..a72b2ae3ff 100644 --- a/cranelift/filetests/wasm/f32-arith.cton +++ b/cranelift/filetests/wasm/f32-arith.cton @@ -9,7 +9,11 @@ isa intel haswell ; Constants. -; function %f32_const() -> f32 +function %f32_const() -> f32 { +ebb0: + v1 = f32const 0x3.0 + return v1 +} ; Unary operations diff --git a/cranelift/filetests/wasm/f64-arith.cton b/cranelift/filetests/wasm/f64-arith.cton index bc81d69c3e..decfa6cba0 100644 --- a/cranelift/filetests/wasm/f64-arith.cton +++ b/cranelift/filetests/wasm/f64-arith.cton @@ -1,15 +1,16 @@ ; Test basic code generation for f64 arithmetic WebAssembly instructions. test compile -set is_64bit=0 -isa intel haswell - set is_64bit=1 isa intel haswell ; Constants. -; function %f64_const() -> f64 +function %f64_const() -> f64 { +ebb0: + v1 = f64const 0x3.0 + return v1 +} ; Unary operations