File: cvt-from-uint.wast

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (48 lines) | stat: -rw-r--r-- 2,082 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

;; Tests inspired by https://github.com/bytecodealliance/wasmtime/issues/3161
;; which found issue in lowering Opcode::FcvtFromUint where valid instruction
;; patterns were rejected
(module
    (func (export "i16x8.extend_low_i8x16_s") (param v128) (result v128)
        local.get 0
        i16x8.extend_low_i8x16_s
        f32x4.convert_i32x4_u)
    (func (export "i16x8.extend_low_i8x16_u") (param v128) (result v128)
        local.get 0
        i16x8.extend_low_i8x16_u
        f32x4.convert_i32x4_u)
    (func (export "i32x4.extend_low_i16x8_s") (param v128) (result v128)
        local.get 0
        i32x4.extend_low_i16x8_s
        f32x4.convert_i32x4_u)
    (func (export "i32x4.extend_low_i16x8_u") (param v128) (result v128)
        local.get 0
        i32x4.extend_low_i16x8_u
        f32x4.convert_i32x4_u)
    (func (export "i64x2.extend_low_i32x4_s") (param v128) (result v128)
        local.get 0
        i64x2.extend_low_i32x4_s
        f32x4.convert_i32x4_u)
    (func (export "i64x2.extend_low_i32x4_u") (param v128) (result v128)
        local.get 0
        i64x2.extend_low_i32x4_u
        f32x4.convert_i32x4_u)
)

(assert_return (invoke "i16x8.extend_low_i8x16_s" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))

(assert_return (invoke "i16x8.extend_low_i8x16_u" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))

(assert_return (invoke "i32x4.extend_low_i16x8_s" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))

(assert_return (invoke "i32x4.extend_low_i16x8_u" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))

(assert_return (invoke "i64x2.extend_low_i32x4_s" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))

(assert_return (invoke "i64x2.extend_low_i32x4_u" (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
               (v128.const f32x4 0 0 0 0))