diff options
-rw-r--r-- | src/wasm-common.h | 48 | ||||
-rw-r--r-- | test/dump/binary.txt | 56 | ||||
-rw-r--r-- | test/dump/unary.txt | 40 |
3 files changed, 72 insertions, 72 deletions
diff --git a/src/wasm-common.h b/src/wasm-common.h index aa4cad74..f1be4686 100644 --- a/src/wasm-common.h +++ b/src/wasm-common.h @@ -291,32 +291,32 @@ enum { WASM_USE_NATURAL_ALIGNMENT = 0xFFFFFFFF }; V(I64, I64, I64, 0, 0x8a, I64_ROTR, "i64.rotr") \ V(F32, F32, F32, 0, 0x8b, F32_ABS, "f32.abs") \ V(F32, F32, F32, 0, 0x8c, F32_NEG, "f32.neg") \ - V(F32, F32, F32, 0, 0x8d, F32_COPYSIGN, "f32.copysign") \ - V(F32, F32, F32, 0, 0x8e, F32_CEIL, "f32.ceil") \ - V(F32, F32, F32, 0, 0x8f, F32_FLOOR, "f32.floor") \ - V(F32, F32, F32, 0, 0x90, F32_TRUNC, "f32.trunc") \ - V(F32, F32, F32, 0, 0x91, F32_NEAREST, "f32.nearest") \ - V(F32, F32, F32, 0, 0x92, F32_SQRT, "f32.sqrt") \ - V(F32, F32, F32, 0, 0x93, F32_ADD, "f32.add") \ - V(F32, F32, F32, 0, 0x94, F32_SUB, "f32.sub") \ - V(F32, F32, F32, 0, 0x95, F32_MUL, "f32.mul") \ - V(F32, F32, F32, 0, 0x96, F32_DIV, "f32.div") \ - V(F32, F32, F32, 0, 0x97, F32_MIN, "f32.min") \ - V(F32, F32, F32, 0, 0x98, F32_MAX, "f32.max") \ + V(F32, F32, F32, 0, 0x8d, F32_CEIL, "f32.ceil") \ + V(F32, F32, F32, 0, 0x8e, F32_FLOOR, "f32.floor") \ + V(F32, F32, F32, 0, 0x8f, F32_TRUNC, "f32.trunc") \ + V(F32, F32, F32, 0, 0x90, F32_NEAREST, "f32.nearest") \ + V(F32, F32, F32, 0, 0x91, F32_SQRT, "f32.sqrt") \ + V(F32, F32, F32, 0, 0x92, F32_ADD, "f32.add") \ + V(F32, F32, F32, 0, 0x93, F32_SUB, "f32.sub") \ + V(F32, F32, F32, 0, 0x94, F32_MUL, "f32.mul") \ + V(F32, F32, F32, 0, 0x95, F32_DIV, "f32.div") \ + V(F32, F32, F32, 0, 0x96, F32_MIN, "f32.min") \ + V(F32, F32, F32, 0, 0x97, F32_MAX, "f32.max") \ + V(F32, F32, F32, 0, 0x98, F32_COPYSIGN, "f32.copysign") \ V(F64, F64, F64, 0, 0x99, F64_ABS, "f64.abs") \ V(F64, F64, F64, 0, 0x9a, F64_NEG, "f64.neg") \ - V(F64, F64, F64, 0, 0x9b, F64_COPYSIGN, "f64.copysign") \ - V(F64, F64, F64, 0, 0x9c, F64_CEIL, "f64.ceil") \ - V(F64, F64, F64, 0, 0x9d, F64_FLOOR, "f64.floor") \ - V(F64, F64, F64, 0, 0x9e, F64_TRUNC, "f64.trunc") \ - V(F64, F64, F64, 0, 0x9f, F64_NEAREST, "f64.nearest") \ - V(F64, F64, F64, 0, 0xa0, F64_SQRT, "f64.sqrt") \ - V(F64, F64, F64, 0, 0xa1, F64_ADD, "f64.add") \ - V(F64, F64, F64, 0, 0xa2, F64_SUB, "f64.sub") \ - V(F64, F64, F64, 0, 0xa3, F64_MUL, "f64.mul") \ - V(F64, F64, F64, 0, 0xa4, F64_DIV, "f64.div") \ - V(F64, F64, F64, 0, 0xa5, F64_MIN, "f64.min") \ - V(F64, F64, F64, 0, 0xa6, F64_MAX, "f64.max") \ + V(F64, F64, F64, 0, 0x9b, F64_CEIL, "f64.ceil") \ + V(F64, F64, F64, 0, 0x9c, F64_FLOOR, "f64.floor") \ + V(F64, F64, F64, 0, 0x9d, F64_TRUNC, "f64.trunc") \ + V(F64, F64, F64, 0, 0x9e, F64_NEAREST, "f64.nearest") \ + V(F64, F64, F64, 0, 0x9f, F64_SQRT, "f64.sqrt") \ + V(F64, F64, F64, 0, 0xa0, F64_ADD, "f64.add") \ + V(F64, F64, F64, 0, 0xa1, F64_SUB, "f64.sub") \ + V(F64, F64, F64, 0, 0xa2, F64_MUL, "f64.mul") \ + V(F64, F64, F64, 0, 0xa3, F64_DIV, "f64.div") \ + V(F64, F64, F64, 0, 0xa4, F64_MIN, "f64.min") \ + V(F64, F64, F64, 0, 0xa5, F64_MAX, "f64.max") \ + V(F64, F64, F64, 0, 0xa6, F64_COPYSIGN, "f64.copysign") \ V(I32, I64, ___, 0, 0xa7, I32_WRAP_I64, "i32.wrap/i64") \ V(I32, F32, ___, 0, 0xa8, I32_TRUNC_S_F32, "i32.trunc_s/f32") \ V(I32, F32, ___, 0, 0xa9, I32_TRUNC_U_F32, "i32.trunc_u/f32") \ diff --git a/test/dump/binary.txt b/test/dump/binary.txt index 68f22645..154268cd 100644 --- a/test/dump/binary.txt +++ b/test/dump/binary.txt @@ -226,49 +226,49 @@ 0000078: 0000 0000 ; f32 literal 000007c: 43 ; f32.const 000007d: 0000 0000 ; f32 literal -0000081: 8d ; f32.copysign +0000081: 98 ; f32.copysign 0000082: 43 ; f32.const 0000083: 0000 0000 ; f32 literal -0000087: 98 ; f32.max +0000087: 97 ; f32.max 0000088: 43 ; f32.const 0000089: 0000 0000 ; f32 literal -000008d: 97 ; f32.min +000008d: 96 ; f32.min 000008e: 43 ; f32.const 000008f: 0000 0000 ; f32 literal -0000093: 96 ; f32.div +0000093: 95 ; f32.div 0000094: 43 ; f32.const 0000095: 0000 0000 ; f32 literal -0000099: 95 ; f32.mul +0000099: 94 ; f32.mul 000009a: 43 ; f32.const 000009b: 0000 0000 ; f32 literal -000009f: 94 ; f32.sub +000009f: 93 ; f32.sub 00000a0: 43 ; f32.const 00000a1: 0000 0000 ; f32 literal -00000a5: 93 ; f32.add +00000a5: 92 ; f32.add 00000a6: 1a ; drop 00000a7: 44 ; f64.const 00000a8: 0000 0000 0000 0000 ; f64 literal 00000b0: 44 ; f64.const 00000b1: 0000 0000 0000 0000 ; f64 literal -00000b9: 9b ; f64.copysign +00000b9: a6 ; f64.copysign 00000ba: 44 ; f64.const 00000bb: 0000 0000 0000 0000 ; f64 literal -00000c3: a6 ; f64.max +00000c3: a5 ; f64.max 00000c4: 44 ; f64.const 00000c5: 0000 0000 0000 0000 ; f64 literal -00000cd: a5 ; f64.min +00000cd: a4 ; f64.min 00000ce: 44 ; f64.const 00000cf: 0000 0000 0000 0000 ; f64 literal -00000d7: a4 ; f64.div +00000d7: a3 ; f64.div 00000d8: 44 ; f64.const 00000d9: 0000 0000 0000 0000 ; f64 literal -00000e1: a3 ; f64.mul +00000e1: a2 ; f64.mul 00000e2: 44 ; f64.const 00000e3: 0000 0000 0000 0000 ; f64 literal -00000eb: a2 ; f64.sub +00000eb: a1 ; f64.sub 00000ec: 44 ; f64.const 00000ed: 0000 0000 0000 0000 ; f64 literal -00000f5: a1 ; f64.add +00000f5: a0 ; f64.add 00000f6: 1a ; drop 00000f7: 0b ; end ; move data: [16, f8) -> [17, f9) @@ -342,34 +342,34 @@ func 0 000078: 1a | drop 000079: 43 00 00 00 00 | f32.const 0 00007e: 43 00 00 00 00 | f32.const 0 - 000083: 8d | f32.copysign + 000083: 98 | f32.copysign 000084: 43 00 00 00 00 | f32.const 0 - 000089: 98 | f32.max + 000089: 97 | f32.max 00008a: 43 00 00 00 00 | f32.const 0 - 00008f: 97 | f32.min + 00008f: 96 | f32.min 000090: 43 00 00 00 00 | f32.const 0 - 000095: 96 | f32.div + 000095: 95 | f32.div 000096: 43 00 00 00 00 | f32.const 0 - 00009b: 95 | f32.mul + 00009b: 94 | f32.mul 00009c: 43 00 00 00 00 | f32.const 0 - 0000a1: 94 | f32.sub + 0000a1: 93 | f32.sub 0000a2: 43 00 00 00 00 | f32.const 0 - 0000a7: 93 | f32.add + 0000a7: 92 | f32.add 0000a8: 1a | drop 0000a9: 44 00 00 00 00 00 00 00 00 | f64.const 0 0000b2: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000bb: 9b | f64.copysign + 0000bb: a6 | f64.copysign 0000bc: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000c5: a6 | f64.max + 0000c5: a5 | f64.max 0000c6: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000cf: a5 | f64.min + 0000cf: a4 | f64.min 0000d0: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000d9: a4 | f64.div + 0000d9: a3 | f64.div 0000da: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000e3: a3 | f64.mul + 0000e3: a2 | f64.mul 0000e4: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000ed: a2 | f64.sub + 0000ed: a1 | f64.sub 0000ee: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 0000f7: a1 | f64.add + 0000f7: a0 | f64.add 0000f8: 1a | drop ;;; STDOUT ;;) diff --git a/test/dump/unary.txt b/test/dump/unary.txt index 86103990..ade4b38e 100644 --- a/test/dump/unary.txt +++ b/test/dump/unary.txt @@ -74,21 +74,21 @@ 0000023: 1a ; drop 0000024: 43 ; f32.const 0000025: 0000 0000 ; f32 literal -0000029: 91 ; f32.nearest -000002a: 90 ; f32.trunc -000002b: 8f ; f32.floor -000002c: 8e ; f32.ceil -000002d: 92 ; f32.sqrt +0000029: 90 ; f32.nearest +000002a: 8f ; f32.trunc +000002b: 8e ; f32.floor +000002c: 8d ; f32.ceil +000002d: 91 ; f32.sqrt 000002e: 8b ; f32.abs 000002f: 8c ; f32.neg 0000030: 1a ; drop 0000031: 44 ; f64.const 0000032: 0000 0000 0000 0000 ; f64 literal -000003a: 9f ; f64.nearest -000003b: 9e ; f64.trunc -000003c: 9d ; f64.floor -000003d: 9c ; f64.ceil -000003e: a0 ; f64.sqrt +000003a: 9e ; f64.nearest +000003b: 9d ; f64.trunc +000003c: 9c ; f64.floor +000003d: 9b ; f64.ceil +000003e: 9f ; f64.sqrt 000003f: 99 ; f64.abs 0000040: 9a ; f64.neg 0000041: 1a ; drop @@ -108,20 +108,20 @@ func 0 000022: 79 | i64.clz 000023: 1a | drop 000024: 43 00 00 00 00 | f32.const 0 - 000029: 91 | f32.nearest - 00002a: 90 | f32.trunc - 00002b: 8f | f32.floor - 00002c: 8e | f32.ceil - 00002d: 92 | f32.sqrt + 000029: 90 | f32.nearest + 00002a: 8f | f32.trunc + 00002b: 8e | f32.floor + 00002c: 8d | f32.ceil + 00002d: 91 | f32.sqrt 00002e: 8b | f32.abs 00002f: 8c | f32.neg 000030: 1a | drop 000031: 44 00 00 00 00 00 00 00 00 | f64.const 0 - 00003a: 9f | f64.nearest - 00003b: 9e | f64.trunc - 00003c: 9d | f64.floor - 00003d: 9c | f64.ceil - 00003e: a0 | f64.sqrt + 00003a: 9e | f64.nearest + 00003b: 9d | f64.trunc + 00003c: 9c | f64.floor + 00003d: 9b | f64.ceil + 00003e: 9f | f64.sqrt 00003f: 99 | f64.abs 000040: 9a | f64.neg 000041: 1a | drop |