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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/interpreter-assembler.h" | 9 #include "src/compiler/interpreter-assembler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 393 |
394 | 394 |
395 // Mod <src> | 395 // Mod <src> |
396 // | 396 // |
397 // Modulo register <src> by accumulator. | 397 // Modulo register <src> by accumulator. |
398 void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { | 398 void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
399 DoBinaryOp(Runtime::kModulus, assembler); | 399 DoBinaryOp(Runtime::kModulus, assembler); |
400 } | 400 } |
401 | 401 |
402 | 402 |
| 403 // BitwiseOr <src> |
| 404 // |
| 405 // BitwiseOr register <src> to accumulator. |
| 406 void Interpreter::DoBitwiseOr(compiler::InterpreterAssembler* assembler) { |
| 407 DoBinaryOp(Runtime::kBitwiseOr, assembler); |
| 408 } |
| 409 |
| 410 |
| 411 // BitwiseXor <src> |
| 412 // |
| 413 // BitwiseXor register <src> to accumulator. |
| 414 void Interpreter::DoBitwiseXor(compiler::InterpreterAssembler* assembler) { |
| 415 DoBinaryOp(Runtime::kBitwiseXor, assembler); |
| 416 } |
| 417 |
| 418 |
| 419 // BitwiseAnd <src> |
| 420 // |
| 421 // BitwiseAnd register <src> to accumulator. |
| 422 void Interpreter::DoBitwiseAnd(compiler::InterpreterAssembler* assembler) { |
| 423 DoBinaryOp(Runtime::kBitwiseAnd, assembler); |
| 424 } |
| 425 |
| 426 |
403 // ShiftLeft <src> | 427 // ShiftLeft <src> |
404 // | 428 // |
405 // Left shifts register <src> by the count specified in the accumulator. | 429 // Left shifts register <src> by the count specified in the accumulator. |
406 // Register <src> is converted to an int32 and the accumulator to uint32 | 430 // Register <src> is converted to an int32 and the accumulator to uint32 |
407 // before the operation. 5 lsb bits from the accumulator are used as count | 431 // before the operation. 5 lsb bits from the accumulator are used as count |
408 // i.e. <src> << (accumulator & 0x1F). | 432 // i.e. <src> << (accumulator & 0x1F). |
409 void Interpreter::DoShiftLeft(compiler::InterpreterAssembler* assembler) { | 433 void Interpreter::DoShiftLeft(compiler::InterpreterAssembler* assembler) { |
410 DoBinaryOp(Runtime::kShiftLeft, assembler); | 434 DoBinaryOp(Runtime::kShiftLeft, assembler); |
411 } | 435 } |
412 | 436 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 // | 691 // |
668 // Return the value in the accumulator. | 692 // Return the value in the accumulator. |
669 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 693 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
670 __ Return(); | 694 __ Return(); |
671 } | 695 } |
672 | 696 |
673 | 697 |
674 } // namespace interpreter | 698 } // namespace interpreter |
675 } // namespace internal | 699 } // namespace internal |
676 } // namespace v8 | 700 } // namespace v8 |
OLD | NEW |