diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/importedSignCast.asm.js | 14 | ||||
-rw-r--r-- | test/importedSignCast.fromasm | 18 | ||||
-rw-r--r-- | test/importedSignCast.fromasm.imprecise | 17 | ||||
-rw-r--r-- | test/importedSignCast.fromasm.imprecise.no-opts | 23 | ||||
-rw-r--r-- | test/importedSignCast.fromasm.no-opts | 23 |
5 files changed, 95 insertions, 0 deletions
diff --git a/test/importedSignCast.asm.js b/test/importedSignCast.asm.js new file mode 100644 index 000000000..60cc99d39 --- /dev/null +++ b/test/importedSignCast.asm.js @@ -0,0 +1,14 @@ +function asm(global, env, buffer) { + "use asm"; + + var gm = env._emscripten_glIsTexture; + + function func() { + gm(0) << 24 >> 24; + } + + var FUNCTION_TABLE_a = [ gm ]; + + return { func: func }; +} + diff --git a/test/importedSignCast.fromasm b/test/importedSignCast.fromasm new file mode 100644 index 000000000..3df5f661d --- /dev/null +++ b/test/importedSignCast.fromasm @@ -0,0 +1,18 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32))) + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 1 1 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (elem (get_global $tableBase) $gm) + (data (get_global $memoryBase) "importedSignCast.asm.js") + (export "func" (func $func)) + (func $func + (drop + (call $gm + (i32.const 0) + ) + ) + ) +) diff --git a/test/importedSignCast.fromasm.imprecise b/test/importedSignCast.fromasm.imprecise new file mode 100644 index 000000000..ebebba81d --- /dev/null +++ b/test/importedSignCast.fromasm.imprecise @@ -0,0 +1,17 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32))) + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 1 1 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (elem (get_global $tableBase) $gm) + (export "func" (func $func)) + (func $func + (drop + (call $gm + (i32.const 0) + ) + ) + ) +) diff --git a/test/importedSignCast.fromasm.imprecise.no-opts b/test/importedSignCast.fromasm.imprecise.no-opts new file mode 100644 index 000000000..97f1f82b7 --- /dev/null +++ b/test/importedSignCast.fromasm.imprecise.no-opts @@ -0,0 +1,23 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32))) + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 1 1 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (elem (get_global $tableBase) $gm) + (export "func" (func $func)) + (func $func + (drop + (i32.shr_s + (i32.shl + (call $gm + (i32.const 0) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) +) diff --git a/test/importedSignCast.fromasm.no-opts b/test/importedSignCast.fromasm.no-opts new file mode 100644 index 000000000..97f1f82b7 --- /dev/null +++ b/test/importedSignCast.fromasm.no-opts @@ -0,0 +1,23 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "_emscripten_glIsTexture" (func $gm (param i32) (result i32))) + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 1 1 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (elem (get_global $tableBase) $gm) + (export "func" (func $func)) + (func $func + (drop + (i32.shr_s + (i32.shl + (call $gm + (i32.const 0) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) +) |