| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
| 10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
| (...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3192 return graph()->NewNode(jsgraph()->machine()->F32x4Sqrt(), inputs[0]); | 3192 return graph()->NewNode(jsgraph()->machine()->F32x4Sqrt(), inputs[0]); |
| 3193 case wasm::kExprF32x4RecipApprox: | 3193 case wasm::kExprF32x4RecipApprox: |
| 3194 return graph()->NewNode(jsgraph()->machine()->F32x4RecipApprox(), | 3194 return graph()->NewNode(jsgraph()->machine()->F32x4RecipApprox(), |
| 3195 inputs[0]); | 3195 inputs[0]); |
| 3196 case wasm::kExprF32x4RecipSqrtApprox: | 3196 case wasm::kExprF32x4RecipSqrtApprox: |
| 3197 return graph()->NewNode(jsgraph()->machine()->F32x4RecipSqrtApprox(), | 3197 return graph()->NewNode(jsgraph()->machine()->F32x4RecipSqrtApprox(), |
| 3198 inputs[0]); | 3198 inputs[0]); |
| 3199 case wasm::kExprF32x4Add: | 3199 case wasm::kExprF32x4Add: |
| 3200 return graph()->NewNode(jsgraph()->machine()->F32x4Add(), inputs[0], | 3200 return graph()->NewNode(jsgraph()->machine()->F32x4Add(), inputs[0], |
| 3201 inputs[1]); | 3201 inputs[1]); |
| 3202 case wasm::kExprF32x4AddHoriz: |
| 3203 return graph()->NewNode(jsgraph()->machine()->F32x4AddHoriz(), inputs[0], |
| 3204 inputs[1]); |
| 3202 case wasm::kExprF32x4Sub: | 3205 case wasm::kExprF32x4Sub: |
| 3203 return graph()->NewNode(jsgraph()->machine()->F32x4Sub(), inputs[0], | 3206 return graph()->NewNode(jsgraph()->machine()->F32x4Sub(), inputs[0], |
| 3204 inputs[1]); | 3207 inputs[1]); |
| 3205 case wasm::kExprF32x4Mul: | 3208 case wasm::kExprF32x4Mul: |
| 3206 return graph()->NewNode(jsgraph()->machine()->F32x4Mul(), inputs[0], | 3209 return graph()->NewNode(jsgraph()->machine()->F32x4Mul(), inputs[0], |
| 3207 inputs[1]); | 3210 inputs[1]); |
| 3208 case wasm::kExprF32x4Div: | 3211 case wasm::kExprF32x4Div: |
| 3209 return graph()->NewNode(jsgraph()->machine()->F32x4Div(), inputs[0], | 3212 return graph()->NewNode(jsgraph()->machine()->F32x4Div(), inputs[0], |
| 3210 inputs[1]); | 3213 inputs[1]); |
| 3211 case wasm::kExprF32x4Min: | 3214 case wasm::kExprF32x4Min: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8Low(), | 3253 return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8Low(), |
| 3251 inputs[0]); | 3254 inputs[0]); |
| 3252 case wasm::kExprI32x4SConvertI16x8High: | 3255 case wasm::kExprI32x4SConvertI16x8High: |
| 3253 return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8High(), | 3256 return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8High(), |
| 3254 inputs[0]); | 3257 inputs[0]); |
| 3255 case wasm::kExprI32x4Neg: | 3258 case wasm::kExprI32x4Neg: |
| 3256 return graph()->NewNode(jsgraph()->machine()->I32x4Neg(), inputs[0]); | 3259 return graph()->NewNode(jsgraph()->machine()->I32x4Neg(), inputs[0]); |
| 3257 case wasm::kExprI32x4Add: | 3260 case wasm::kExprI32x4Add: |
| 3258 return graph()->NewNode(jsgraph()->machine()->I32x4Add(), inputs[0], | 3261 return graph()->NewNode(jsgraph()->machine()->I32x4Add(), inputs[0], |
| 3259 inputs[1]); | 3262 inputs[1]); |
| 3263 case wasm::kExprI32x4AddHoriz: |
| 3264 return graph()->NewNode(jsgraph()->machine()->I32x4AddHoriz(), inputs[0], |
| 3265 inputs[1]); |
| 3260 case wasm::kExprI32x4Sub: | 3266 case wasm::kExprI32x4Sub: |
| 3261 return graph()->NewNode(jsgraph()->machine()->I32x4Sub(), inputs[0], | 3267 return graph()->NewNode(jsgraph()->machine()->I32x4Sub(), inputs[0], |
| 3262 inputs[1]); | 3268 inputs[1]); |
| 3263 case wasm::kExprI32x4Mul: | 3269 case wasm::kExprI32x4Mul: |
| 3264 return graph()->NewNode(jsgraph()->machine()->I32x4Mul(), inputs[0], | 3270 return graph()->NewNode(jsgraph()->machine()->I32x4Mul(), inputs[0], |
| 3265 inputs[1]); | 3271 inputs[1]); |
| 3266 case wasm::kExprI32x4MinS: | 3272 case wasm::kExprI32x4MinS: |
| 3267 return graph()->NewNode(jsgraph()->machine()->I32x4MinS(), inputs[0], | 3273 return graph()->NewNode(jsgraph()->machine()->I32x4MinS(), inputs[0], |
| 3268 inputs[1]); | 3274 inputs[1]); |
| 3269 case wasm::kExprI32x4MaxS: | 3275 case wasm::kExprI32x4MaxS: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3323 return graph()->NewNode(jsgraph()->machine()->I16x8Neg(), inputs[0]); | 3329 return graph()->NewNode(jsgraph()->machine()->I16x8Neg(), inputs[0]); |
| 3324 case wasm::kExprI16x8SConvertI32x4: | 3330 case wasm::kExprI16x8SConvertI32x4: |
| 3325 return graph()->NewNode(jsgraph()->machine()->I16x8SConvertI32x4(), | 3331 return graph()->NewNode(jsgraph()->machine()->I16x8SConvertI32x4(), |
| 3326 inputs[0], inputs[1]); | 3332 inputs[0], inputs[1]); |
| 3327 case wasm::kExprI16x8Add: | 3333 case wasm::kExprI16x8Add: |
| 3328 return graph()->NewNode(jsgraph()->machine()->I16x8Add(), inputs[0], | 3334 return graph()->NewNode(jsgraph()->machine()->I16x8Add(), inputs[0], |
| 3329 inputs[1]); | 3335 inputs[1]); |
| 3330 case wasm::kExprI16x8AddSaturateS: | 3336 case wasm::kExprI16x8AddSaturateS: |
| 3331 return graph()->NewNode(jsgraph()->machine()->I16x8AddSaturateS(), | 3337 return graph()->NewNode(jsgraph()->machine()->I16x8AddSaturateS(), |
| 3332 inputs[0], inputs[1]); | 3338 inputs[0], inputs[1]); |
| 3339 case wasm::kExprI16x8AddHoriz: |
| 3340 return graph()->NewNode(jsgraph()->machine()->I16x8AddHoriz(), inputs[0], |
| 3341 inputs[1]); |
| 3333 case wasm::kExprI16x8Sub: | 3342 case wasm::kExprI16x8Sub: |
| 3334 return graph()->NewNode(jsgraph()->machine()->I16x8Sub(), inputs[0], | 3343 return graph()->NewNode(jsgraph()->machine()->I16x8Sub(), inputs[0], |
| 3335 inputs[1]); | 3344 inputs[1]); |
| 3336 case wasm::kExprI16x8SubSaturateS: | 3345 case wasm::kExprI16x8SubSaturateS: |
| 3337 return graph()->NewNode(jsgraph()->machine()->I16x8SubSaturateS(), | 3346 return graph()->NewNode(jsgraph()->machine()->I16x8SubSaturateS(), |
| 3338 inputs[0], inputs[1]); | 3347 inputs[0], inputs[1]); |
| 3339 case wasm::kExprI16x8Mul: | 3348 case wasm::kExprI16x8Mul: |
| 3340 return graph()->NewNode(jsgraph()->machine()->I16x8Mul(), inputs[0], | 3349 return graph()->NewNode(jsgraph()->machine()->I16x8Mul(), inputs[0], |
| 3341 inputs[1]); | 3350 inputs[1]); |
| 3342 case wasm::kExprI16x8MinS: | 3351 case wasm::kExprI16x8MinS: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3402 return graph()->NewNode(jsgraph()->machine()->I8x16Neg(), inputs[0]); | 3411 return graph()->NewNode(jsgraph()->machine()->I8x16Neg(), inputs[0]); |
| 3403 case wasm::kExprI8x16SConvertI16x8: | 3412 case wasm::kExprI8x16SConvertI16x8: |
| 3404 return graph()->NewNode(jsgraph()->machine()->I8x16SConvertI16x8(), | 3413 return graph()->NewNode(jsgraph()->machine()->I8x16SConvertI16x8(), |
| 3405 inputs[0], inputs[1]); | 3414 inputs[0], inputs[1]); |
| 3406 case wasm::kExprI8x16Add: | 3415 case wasm::kExprI8x16Add: |
| 3407 return graph()->NewNode(jsgraph()->machine()->I8x16Add(), inputs[0], | 3416 return graph()->NewNode(jsgraph()->machine()->I8x16Add(), inputs[0], |
| 3408 inputs[1]); | 3417 inputs[1]); |
| 3409 case wasm::kExprI8x16AddSaturateS: | 3418 case wasm::kExprI8x16AddSaturateS: |
| 3410 return graph()->NewNode(jsgraph()->machine()->I8x16AddSaturateS(), | 3419 return graph()->NewNode(jsgraph()->machine()->I8x16AddSaturateS(), |
| 3411 inputs[0], inputs[1]); | 3420 inputs[0], inputs[1]); |
| 3421 case wasm::kExprI8x16AddHoriz: |
| 3422 return graph()->NewNode(jsgraph()->machine()->I8x16AddHoriz(), inputs[0], |
| 3423 inputs[1]); |
| 3412 case wasm::kExprI8x16Sub: | 3424 case wasm::kExprI8x16Sub: |
| 3413 return graph()->NewNode(jsgraph()->machine()->I8x16Sub(), inputs[0], | 3425 return graph()->NewNode(jsgraph()->machine()->I8x16Sub(), inputs[0], |
| 3414 inputs[1]); | 3426 inputs[1]); |
| 3415 case wasm::kExprI8x16SubSaturateS: | 3427 case wasm::kExprI8x16SubSaturateS: |
| 3416 return graph()->NewNode(jsgraph()->machine()->I8x16SubSaturateS(), | 3428 return graph()->NewNode(jsgraph()->machine()->I8x16SubSaturateS(), |
| 3417 inputs[0], inputs[1]); | 3429 inputs[0], inputs[1]); |
| 3418 case wasm::kExprI8x16Mul: | 3430 case wasm::kExprI8x16Mul: |
| 3419 return graph()->NewNode(jsgraph()->machine()->I8x16Mul(), inputs[0], | 3431 return graph()->NewNode(jsgraph()->machine()->I8x16Mul(), inputs[0], |
| 3420 inputs[1]); | 3432 inputs[1]); |
| 3421 case wasm::kExprI8x16MinS: | 3433 case wasm::kExprI8x16MinS: |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4144 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { | 4156 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { |
| 4145 WasmCompilationUnit unit(isolate, module_env, function); | 4157 WasmCompilationUnit unit(isolate, module_env, function); |
| 4146 unit.InitializeHandles(); | 4158 unit.InitializeHandles(); |
| 4147 unit.ExecuteCompilation(); | 4159 unit.ExecuteCompilation(); |
| 4148 return unit.FinishCompilation(thrower); | 4160 return unit.FinishCompilation(thrower); |
| 4149 } | 4161 } |
| 4150 | 4162 |
| 4151 } // namespace compiler | 4163 } // namespace compiler |
| 4152 } // namespace internal | 4164 } // namespace internal |
| 4153 } // namespace v8 | 4165 } // namespace v8 |
| OLD | NEW |