Changeset 207781 in webkit
- Timestamp:
- Oct 24, 2016 2:44:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r207697 r207781 1 2016-10-24 Keith Miller <keith_miller@apple.com> 2 3 Wasm should support floating point operations. 4 https://bugs.webkit.org/show_bug.cgi?id=163770 5 6 Reviewed by Michael Saboff. 7 8 Add appropriate b3op names for floating point wasm bytecodes, where they exist. 9 Also, fix some WASM => Wasm in WasmOps.h generator script that I missed 10 the first time I made the change. 11 12 * wasm/generate-wasmops-header.js: 13 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.template.typename.Int.inline.bool.isValidOpType): Deleted. 14 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.BinaryOpType): Deleted. 15 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.UnaryOpType): Deleted. 16 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType): Deleted. 17 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType): Deleted. 18 (const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.undef.CREATE_ENUM_VALUE.inline.bool.isControlOp): Deleted. 19 * wasm/wasm.json: 20 1 21 2016-10-21 Saam Barati <sbarati@apple.com> 2 22 -
trunk/JSTests/wasm/generate-wasmops-header.js
r207671 r207781 1 // Use the JSON description of WebAssembly to generate the JavaScriptCore's W ASMOps.h.1 // Use the JSON description of WebAssembly to generate the JavaScriptCore's WasmOps.h. 2 2 3 3 const jsonFile = 'wasm.json'; … … 91 91 #include <cstdint> 92 92 93 namespace JSC { namespace W ASM{93 namespace JSC { namespace Wasm { 94 94 95 95 ${defines} … … 148 148 } 149 149 150 } } // namespace JSC::W ASM150 } } // namespace JSC::Wasm 151 151 152 152 #endif // ENABLE(WEBASSEMBLY) -
trunk/JSTests/wasm/wasm.json
r207572 r207781 151 151 "i64.popcnt": { "category": "arithmetic", "value": 116, "return": ["i64"], "parameter": ["i64"], "immediate": [] }, 152 152 "i64.eqz": { "category": "comparison", "value": 186, "return": ["bool"], "parameter": ["i64"], "immediate": [] }, 153 "f32.add": { "category": "arithmetic", "value": 117, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] 154 "f32.sub": { "category": "arithmetic", "value": 118, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] 155 "f32.mul": { "category": "arithmetic", "value": 119, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] 156 "f32.div": { "category": "arithmetic", "value": 120, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] 153 "f32.add": { "category": "arithmetic", "value": 117, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "Add" }, 154 "f32.sub": { "category": "arithmetic", "value": 118, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "Sub" }, 155 "f32.mul": { "category": "arithmetic", "value": 119, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "Mul" }, 156 "f32.div": { "category": "arithmetic", "value": 120, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "Div" }, 157 157 "f32.min": { "category": "arithmetic", "value": 121, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] }, 158 158 "f32.max": { "category": "arithmetic", "value": 122, "return": ["f32"], "parameter": ["f32", "f32"], "immediate": [] }, 159 "f32.abs": { "category": "arithmetic", "value": 123, "return": ["f32"], "parameter": ["f32"], "immediate": [] 159 "f32.abs": { "category": "arithmetic", "value": 123, "return": ["f32"], "parameter": ["f32"], "immediate": [], "b3op": "Abs" }, 160 160 "f32.neg": { "category": "arithmetic", "value": 124, "return": ["f32"], "parameter": ["f32"], "immediate": [] }, 161 161 "f32.copysign": { "category": "arithmetic", "value": 125, "return": ["f32"], "parameter": ["f32"], "immediate": [] }, 162 "f32.ceil": { "category": "arithmetic", "value": 126, "return": ["f32"], "parameter": ["f32"], "immediate": [] 163 "f32.floor": { "category": "arithmetic", "value": 127, "return": ["f32"], "parameter": ["f32"], "immediate": [] 162 "f32.ceil": { "category": "arithmetic", "value": 126, "return": ["f32"], "parameter": ["f32"], "immediate": [], "b3op": "Ceil" }, 163 "f32.floor": { "category": "arithmetic", "value": 127, "return": ["f32"], "parameter": ["f32"], "immediate": [], "b3op": "Floor" }, 164 164 "f32.trunc": { "category": "arithmetic", "value": 128, "return": ["f32"], "parameter": ["f32"], "immediate": [] }, 165 165 "f32.nearest": { "category": "arithmetic", "value": 129, "return": ["f32"], "parameter": ["f32"], "immediate": [] }, 166 166 "f32.sqrt": { "category": "arithmetic", "value": 130, "return": ["f32"], "parameter": ["f32"], "immediate": [] }, 167 "f32.eq": { "category": "comparison", "value": 131, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 168 "f32.ne": { "category": "comparison", "value": 132, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 169 "f32.lt": { "category": "comparison", "value": 133, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 170 "f32.le": { "category": "comparison", "value": 134, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 171 "f32.gt": { "category": "comparison", "value": 135, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 172 "f32.ge": { "category": "comparison", "value": 136, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [] 173 "f64.add": { "category": "arithmetic", "value": 137, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] 174 "f64.sub": { "category": "arithmetic", "value": 138, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] 175 "f64.mul": { "category": "arithmetic", "value": 139, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] 176 "f64.div": { "category": "arithmetic", "value": 140, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] 167 "f32.eq": { "category": "comparison", "value": 131, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "Equal" }, 168 "f32.ne": { "category": "comparison", "value": 132, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "NotEqual" }, 169 "f32.lt": { "category": "comparison", "value": 133, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "LessThan" }, 170 "f32.le": { "category": "comparison", "value": 134, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "LessEqual" }, 171 "f32.gt": { "category": "comparison", "value": 135, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "GreaterThan" }, 172 "f32.ge": { "category": "comparison", "value": 136, "return": ["bool"], "parameter": ["f32", "f32"], "immediate": [], "b3op": "GreaterEqual" }, 173 "f64.add": { "category": "arithmetic", "value": 137, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "Add" }, 174 "f64.sub": { "category": "arithmetic", "value": 138, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "Sub" }, 175 "f64.mul": { "category": "arithmetic", "value": 139, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "Mul" }, 176 "f64.div": { "category": "arithmetic", "value": 140, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "Div" }, 177 177 "f64.min": { "category": "arithmetic", "value": 141, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] }, 178 178 "f64.max": { "category": "arithmetic", "value": 142, "return": ["f64"], "parameter": ["f64", "f64"], "immediate": [] }, 179 "f64.abs": { "category": "arithmetic", "value": 143, "return": ["f64"], "parameter": ["f64"], "immediate": [] 179 "f64.abs": { "category": "arithmetic", "value": 143, "return": ["f64"], "parameter": ["f64"], "immediate": [], "b3op": "Abs" }, 180 180 "f64.neg": { "category": "arithmetic", "value": 144, "return": ["f64"], "parameter": ["f64"], "immediate": [] }, 181 181 "f64.copysign": { "category": "arithmetic", "value": 145, "return": ["f64"], "parameter": ["f64"], "immediate": [] }, 182 "f64.ceil": { "category": "arithmetic", "value": 146, "return": ["f64"], "parameter": ["f64"], "immediate": [] 183 "f64.floor": { "category": "arithmetic", "value": 147, "return": ["f64"], "parameter": ["f64"], "immediate": [] 182 "f64.ceil": { "category": "arithmetic", "value": 146, "return": ["f64"], "parameter": ["f64"], "immediate": [], "b3op": "Ceil" }, 183 "f64.floor": { "category": "arithmetic", "value": 147, "return": ["f64"], "parameter": ["f64"], "immediate": [], "b3op": "Floor" }, 184 184 "f64.trunc": { "category": "arithmetic", "value": 148, "return": ["f64"], "parameter": ["f64"], "immediate": [] }, 185 185 "f64.nearest": { "category": "arithmetic", "value": 149, "return": ["f64"], "parameter": ["f64"], "immediate": [] }, 186 186 "f64.sqrt": { "category": "arithmetic", "value": 150, "return": ["f64"], "parameter": ["f64"], "immediate": [] }, 187 "f64.eq": { "category": "comparison", "value": 151, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 188 "f64.ne": { "category": "comparison", "value": 152, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 189 "f64.lt": { "category": "comparison", "value": 153, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 190 "f64.le": { "category": "comparison", "value": 154, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 191 "f64.gt": { "category": "comparison", "value": 155, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 192 "f64.ge": { "category": "comparison", "value": 156, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [] 187 "f64.eq": { "category": "comparison", "value": 151, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "Equal" }, 188 "f64.ne": { "category": "comparison", "value": 152, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "NotEqual" }, 189 "f64.lt": { "category": "comparison", "value": 153, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "LessThan" }, 190 "f64.le": { "category": "comparison", "value": 154, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "LessEqual" }, 191 "f64.gt": { "category": "comparison", "value": 155, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "GreaterThan" }, 192 "f64.ge": { "category": "comparison", "value": 156, "return": ["bool"], "parameter": ["f64", "f64"], "immediate": [], "b3op": "GreaterEqual" }, 193 193 "i32.trunc_s/f32": { "category": "conversion", "value": 157, "return": ["i32"], "parameter": ["f32"], "immediate": [] }, 194 194 "i32.trunc_s/f64": { "category": "conversion", "value": 158, "return": ["i32"], "parameter": ["f64"], "immediate": [] }, -
trunk/Source/JavaScriptCore/ChangeLog
r207765 r207781 1 2016-10-24 Keith Miller <keith_miller@apple.com> 2 3 Wasm should support floating point operations. 4 https://bugs.webkit.org/show_bug.cgi?id=163770 5 6 Reviewed by Michael Saboff. 7 8 Since we now have a Double => Float Trunc in B3, we can now support calls in Wasm 9 that take floating point arguments. This patch also enables most of the Wasm 10 floating point operations, as the associated B3 opcode has been linked via wasm.json. 11 If there is no direct mapping to a B3 opcode the Wasm is not yet implemented. This 12 patch also fixes a bug in calls where the arguments would be reversed. 13 14 * testWasm.cpp: 15 (cast): 16 (invoke): 17 (boxf): 18 (boxd): 19 (runWasmTests): 20 * wasm/WasmB3IRGenerator.cpp: 21 (JSC::Wasm::createJSWrapper): 22 * wasm/WasmCallingConvention.h: 23 (JSC::Wasm::CallingConvention::loadArguments): 24 (JSC::Wasm::CallingConvention::setupCall): 25 * wasm/WasmFunctionParser.h: 26 (JSC::Wasm::FunctionParser<Context>::parseExpression): 27 (JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression): 28 * wasm/WasmOps.h: 29 1 30 2016-10-24 Mark Lam <mark.lam@apple.com> 2 31 -
trunk/Source/JavaScriptCore/testWasm.cpp
r207693 r207781 26 26 #include "config.h" 27 27 28 #include "B3Common.h" 28 29 #include "B3Compilation.h" 29 30 #include "InitializeThreading.h" … … 96 97 CRASH(); \ 97 98 } while (false) 99 100 #define CHECK(x) CHECK_EQ(x, true) 98 101 99 102 #define FOR_EACH_UNSIGNED_LEB_TEST(macro) \ … … 209 212 210 213 template<typename T> 214 T cast(EncodedJSValue value) 215 { 216 return static_cast<T>(value); 217 } 218 219 template<> 220 double cast(EncodedJSValue value) 221 { 222 return bitwise_cast<double>(value); 223 } 224 225 template<> 226 float cast(EncodedJSValue value) 227 { 228 return bitwise_cast<float>(static_cast<int>(value)); 229 } 230 231 template<typename T> 211 232 T invoke(MacroAssemblerCodePtr ptr, std::initializer_list<JSValue> args) 212 233 { … … 225 246 protoCallFrame.init(nullptr, nullptr, firstArgument, argCount, remainingArguments); 226 247 227 // This won't work for floating point values but we don't have those yet. 228 return static_cast<T>(vmEntryToWasm(ptr.executableAddress(), vm, &protoCallFrame)); 248 return cast<T>(vmEntryToWasm(ptr.executableAddress(), vm, &protoCallFrame)); 229 249 } 230 250 … … 240 260 } 241 261 262 inline JSValue boxf(float value) 263 { 264 return box(bitwise_cast<uint32_t>(value)); 265 } 266 267 inline JSValue boxd(double value) 268 { 269 return box(bitwise_cast<uint64_t>(value)); 270 } 271 242 272 // For now we inline the test files. 243 273 static void runWasmTests() 244 274 { 275 276 { 277 // Generated from: 278 // (module 279 // (func $f32-sub (export "f32-sub") (param f32) (param f32) (result f32) (return (f32.sub (get_local 0) (get_local 1)))) 280 // (func (export "indirect-f32-sub") (param f32) (param f32) (result f32) (return (call $f32-sub (get_local 0) (get_local 1)))) 281 // ) 282 Vector<uint8_t> vector = { 283 0x00, 0x61, 0x73, 0x6d, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x87, 0x80, 0x80, 0x80, 0x00, 0x01, 0x40, 284 0x02, 0x03, 0x03, 0x01, 0x03, 0x03, 0x83, 0x80, 0x80, 0x80, 0x00, 0x02, 0x00, 0x00, 0x07, 0x9e, 285 0x80, 0x80, 0x80, 0x00, 0x02, 0x07, 0x66, 0x33, 0x32, 0x2d, 0x73, 0x75, 0x62, 0x00, 0x00, 0x10, 286 0x69, 0x6e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2d, 0x66, 0x33, 0x32, 0x2d, 0x73, 0x75, 0x62, 287 0x00, 0x01, 0x0a, 0x9c, 0x80, 0x80, 0x80, 0x00, 0x02, 0x88, 0x80, 0x80, 0x80, 0x00, 0x00, 0x14, 288 0x00, 0x14, 0x01, 0x76, 0x09, 0x0f, 0x89, 0x80, 0x80, 0x80, 0x00, 0x00, 0x14, 0x00, 0x14, 0x01, 289 0x16, 0x00, 0x09, 0x0f 290 }; 291 292 Plan plan(*vm, vector); 293 if (plan.result.size() != 2 || !plan.result[0] || !plan.result[1]) { 294 dataLogLn("Module failed to compile correctly."); 295 CRASH(); 296 } 297 298 // Test this doesn't crash. 299 CHECK(isIdentical(invoke<float>(*plan.result[1]->jsEntryPoint, { boxf(0.0), boxf(1.5) }), -1.5f)); 300 CHECK(isIdentical(invoke<float>(*plan.result[1]->jsEntryPoint, { boxf(100.1234), boxf(12.5) }), 87.6234f)); 301 CHECK(isIdentical(invoke<float>(*plan.result[0]->jsEntryPoint, { boxf(0.0), boxf(1.5) }), -1.5f)); 302 CHECK(isIdentical(invoke<float>(*plan.result[0]->jsEntryPoint, { boxf(100.1234), boxf(12.5) }), 87.6234f)); 303 } 304 305 { 306 // Generated from: 307 // (module 308 // (func $f32-add (export "f32-add") (param f32) (param f32) (result f32) (return (f32.add (get_local 0) (get_local 1)))) 309 // (func (export "indirect-f32-add") (param f32) (param f32) (result f32) (return (call $f32-add (get_local 0) (get_local 1)))) 310 // ) 311 Vector<uint8_t> vector = { 312 0x00, 0x61, 0x73, 0x6d, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x87, 0x80, 0x80, 0x80, 0x00, 0x01, 0x40, 313 0x02, 0x03, 0x03, 0x01, 0x03, 0x03, 0x83, 0x80, 0x80, 0x80, 0x00, 0x02, 0x00, 0x00, 0x07, 0x9e, 314 0x80, 0x80, 0x80, 0x00, 0x02, 0x07, 0x66, 0x33, 0x32, 0x2d, 0x61, 0x64, 0x64, 0x00, 0x00, 0x10, 315 0x69, 0x6e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2d, 0x66, 0x33, 0x32, 0x2d, 0x61, 0x64, 0x64, 316 0x00, 0x01, 0x0a, 0x9c, 0x80, 0x80, 0x80, 0x00, 0x02, 0x88, 0x80, 0x80, 0x80, 0x00, 0x00, 0x14, 317 0x00, 0x14, 0x01, 0x75, 0x09, 0x0f, 0x89, 0x80, 0x80, 0x80, 0x00, 0x00, 0x14, 0x00, 0x14, 0x01, 318 0x16, 0x00, 0x09, 0x0f 319 }; 320 321 Plan plan(*vm, vector); 322 if (plan.result.size() != 2 || !plan.result[0] || !plan.result[1]) { 323 dataLogLn("Module failed to compile correctly."); 324 CRASH(); 325 } 326 327 // Test this doesn't crash. 328 CHECK(isIdentical(invoke<float>(*plan.result[1]->jsEntryPoint, { boxf(0.0), boxf(1.5) }), 1.5f)); 329 CHECK(isIdentical(invoke<float>(*plan.result[1]->jsEntryPoint, { boxf(100.1234), boxf(12.5) }), 112.6234f)); 330 CHECK(isIdentical(invoke<float>(*plan.result[0]->jsEntryPoint, { boxf(0.0), boxf(1.5) }), 1.5f)); 331 CHECK(isIdentical(invoke<float>(*plan.result[0]->jsEntryPoint, { boxf(100.1234), boxf(12.5) }), 112.6234f)); 332 } 333 245 334 { 246 335 // Generated from: -
trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
r207693 r207781 698 698 699 699 // Return the result, if needed. 700 if (signature->returnType != Void) 700 switch (signature->returnType) { 701 case Void: 702 block->appendNewControlValue(proc, B3::Return, Origin()); 703 break; 704 case F32: 705 case F64: 706 result = block->appendNew<Value>(proc, BitwiseCast, Origin(), result); 707 FALLTHROUGH; 708 case I32: 709 case I64: 701 710 block->appendNewControlValue(proc, B3::Return, Origin(), result); 702 else703 block->appendNewControlValue(proc, B3::Return, Origin());711 break; 712 } 704 713 705 714 return std::make_unique<Compilation>(vm, proc); -
trunk/Source/JavaScriptCore/wasm/WasmCallingConvention.h
r207693 r207781 99 99 if (rep.isReg()) { 100 100 argument = block->appendNew<B3::ArgumentRegValue>(proc, origin, rep.reg()); 101 if (type == B3::Int32 )101 if (type == B3::Int32 || type == B3::Float) 102 102 argument = block->appendNew<B3::Value>(proc, B3::Trunc, origin, argument); 103 // FIXME: How do I get a float from a FPR? We don't support floating points yet so it's not a big deal... yet.104 // see: https://bugs.webkit.org/show_bug.cgi?id=163770105 103 } else { 106 104 ASSERT(rep.isStackArgument()); … … 135 133 patchpointFunctor(patchpoint); 136 134 137 if (returnType == B3::Void) 135 switch (returnType) { 136 case B3::Void: 138 137 return nullptr; 139 140 patchpoint->resultConstraint = B3::ValueRep::reg(GPRInfo::returnValueGPR); 138 case B3::Float: 139 case B3::Double: 140 patchpoint->resultConstraint = B3::ValueRep::reg(FPRInfo::returnValueFPR); 141 break; 142 case B3::Int32: 143 case B3::Int64: 144 patchpoint->resultConstraint = B3::ValueRep::reg(GPRInfo::returnValueGPR); 145 break; 146 } 141 147 return patchpoint; 142 148 } -
trunk/Source/JavaScriptCore/wasm/WasmFunctionParser.h
r207693 r207781 191 191 } 192 192 193 case OpType::F32Const: 193 194 case OpType::I32Const: { 194 195 uint32_t constant; … … 199 200 } 200 201 202 case OpType::F64Const: 201 203 case OpType::I64Const: { 202 204 uint64_t constant; … … 237 239 const FunctionInformation& info = m_functions[functionIndex]; 238 240 241 if (info.signature->arguments.size() > m_expressionStack.size()) 242 return false; 243 244 size_t firstArgumentIndex = m_expressionStack.size() - info.signature->arguments.size(); 239 245 Vector<ExpressionType> args; 240 for (unsigned i = 0; i < info.signature->arguments.size(); ++i) 241 args.append(m_expressionStack.takeLast()); 246 args.reserveInitialCapacity(info.signature->arguments.size()); 247 for (unsigned i = firstArgumentIndex; i < m_expressionStack.size(); ++i) 248 args.append(m_expressionStack[i]); 249 m_expressionStack.shrink(firstArgumentIndex); 242 250 243 251 ExpressionType result = Context::emptyExpression; … … 319 327 case OpType::Nop: 320 328 case OpType::Drop: 321 case OpType::F32Const:322 case OpType::F64Const:323 329 case OpType::TeeLocal: 324 330 case OpType::GetGlobal: … … 375 381 // one immediate cases 376 382 case OpType::Return: 383 case OpType::F32Const: 377 384 case OpType::I32Const: 385 case OpType::F64Const: 386 case OpType::I64Const: 378 387 case OpType::SetLocal: 379 388 case OpType::GetLocal: { -
trunk/Source/JavaScriptCore/wasm/WasmOps.h
r207693 r207781 69 69 macro(I64Ctz, 0x73, Oops) \ 70 70 macro(I64Popcnt, 0x74, Oops) \ 71 macro(F32Abs, 0x7b, Oops) \71 macro(F32Abs, 0x7b, Abs) \ 72 72 macro(F32Neg, 0x7c, Oops) \ 73 73 macro(F32Copysign, 0x7d, Oops) \ 74 macro(F32Ceil, 0x7e, Oops) \75 macro(F32Floor, 0x7f, Oops) \74 macro(F32Ceil, 0x7e, Ceil) \ 75 macro(F32Floor, 0x7f, Floor) \ 76 76 macro(F32Trunc, 0x80, Oops) \ 77 77 macro(F32Nearest, 0x81, Oops) \ 78 78 macro(F32Sqrt, 0x82, Oops) \ 79 macro(F64Abs, 0x8f, Oops) \79 macro(F64Abs, 0x8f, Abs) \ 80 80 macro(F64Neg, 0x90, Oops) \ 81 81 macro(F64Copysign, 0x91, Oops) \ 82 macro(F64Ceil, 0x92, Oops) \83 macro(F64Floor, 0x93, Oops) \82 macro(F64Ceil, 0x92, Ceil) \ 83 macro(F64Floor, 0x93, Floor) \ 84 84 macro(F64Trunc, 0x94, Oops) \ 85 85 macro(F64Nearest, 0x95, Oops) \ … … 137 137 macro(I64GtU, 0x70, Above) \ 138 138 macro(I64GeU, 0x71, AboveEqual) \ 139 macro(F32Add, 0x75, Oops) \140 macro(F32Sub, 0x76, Oops) \141 macro(F32Mul, 0x77, Oops) \142 macro(F32Div, 0x78, Oops) \139 macro(F32Add, 0x75, Add) \ 140 macro(F32Sub, 0x76, Sub) \ 141 macro(F32Mul, 0x77, Mul) \ 142 macro(F32Div, 0x78, Div) \ 143 143 macro(F32Min, 0x79, Oops) \ 144 144 macro(F32Max, 0x7a, Oops) \ 145 macro(F32Eq, 0x83, Oops) \146 macro(F32Ne, 0x84, Oops) \147 macro(F32Lt, 0x85, Oops) \148 macro(F32Le, 0x86, Oops) \149 macro(F32Gt, 0x87, Oops) \150 macro(F32Ge, 0x88, Oops) \151 macro(F64Add, 0x89, Oops) \152 macro(F64Sub, 0x8a, Oops) \153 macro(F64Mul, 0x8b, Oops) \154 macro(F64Div, 0x8c, Oops) \145 macro(F32Eq, 0x83, Equal) \ 146 macro(F32Ne, 0x84, NotEqual) \ 147 macro(F32Lt, 0x85, LessThan) \ 148 macro(F32Le, 0x86, LessEqual) \ 149 macro(F32Gt, 0x87, GreaterThan) \ 150 macro(F32Ge, 0x88, GreaterEqual) \ 151 macro(F64Add, 0x89, Add) \ 152 macro(F64Sub, 0x8a, Sub) \ 153 macro(F64Mul, 0x8b, Mul) \ 154 macro(F64Div, 0x8c, Div) \ 155 155 macro(F64Min, 0x8d, Oops) \ 156 156 macro(F64Max, 0x8e, Oops) \ 157 macro(F64Eq, 0x97, Oops) \158 macro(F64Ne, 0x98, Oops) \159 macro(F64Lt, 0x99, Oops) \160 macro(F64Le, 0x9a, Oops) \161 macro(F64Gt, 0x9b, Oops) \162 macro(F64Ge, 0x9c, Oops)157 macro(F64Eq, 0x97, Equal) \ 158 macro(F64Ne, 0x98, NotEqual) \ 159 macro(F64Lt, 0x99, LessThan) \ 160 macro(F64Le, 0x9a, LessEqual) \ 161 macro(F64Gt, 0x9b, GreaterThan) \ 162 macro(F64Ge, 0x9c, GreaterEqual) 163 163 164 164 #define FOR_EACH_WASM_MEMORY_LOAD_OP(macro) \
Note: See TracChangeset
for help on using the changeset viewer.