OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // and to one if it isn't. | 477 // and to one if it isn't. |
478 void CheckSmiToIndicator(Register dst, Register src); | 478 void CheckSmiToIndicator(Register dst, Register src); |
479 void CheckSmiToIndicator(Register dst, const Operand& src); | 479 void CheckSmiToIndicator(Register dst, const Operand& src); |
480 | 480 |
481 // Test-and-jump functions. Typically combines a check function | 481 // Test-and-jump functions. Typically combines a check function |
482 // above with a conditional jump. | 482 // above with a conditional jump. |
483 | 483 |
484 // Jump if the value cannot be represented by a smi. | 484 // Jump if the value cannot be represented by a smi. |
485 void JumpIfNotValidSmiValue(Register src, Label* on_invalid, | 485 void JumpIfNotValidSmiValue(Register src, Label* on_invalid, |
486 Label::Distance near_jump = Label::kFar); | 486 Label::Distance near_jump = Label::kFar); |
| 487 // Jump if the value can be represented by a smi. |
| 488 void JumpIfValidSmiValue(Register src, Label* on_valid, |
| 489 Label::Distance near_jump = Label::kFar); |
487 | 490 |
488 // Jump if the unsigned integer value cannot be represented by a smi. | 491 // Jump if the unsigned integer value cannot be represented by a smi. |
489 void JumpIfUIntNotValidSmiValue(Register src, Label* on_invalid, | 492 void JumpIfUIntNotValidSmiValue(Register src, Label* on_invalid, |
490 Label::Distance near_jump = Label::kFar); | 493 Label::Distance near_jump = Label::kFar); |
| 494 // Jump if the unsigned integer value can be represented by a smi. |
| 495 void JumpIfUIntValidSmiValue(Register src, Label* on_valid, |
| 496 Label::Distance near_jump = Label::kFar); |
| 497 |
491 | 498 |
492 // Jump to label if the value is a tagged smi. | 499 // Jump to label if the value is a tagged smi. |
493 void JumpIfSmi(Register src, | 500 void JumpIfSmi(Register src, |
494 Label* on_smi, | 501 Label* on_smi, |
495 Label::Distance near_jump = Label::kFar); | 502 Label::Distance near_jump = Label::kFar); |
496 | 503 |
497 // Jump to label if the value is not a tagged smi. | 504 // Jump to label if the value is not a tagged smi. |
498 void JumpIfNotSmi(Register src, | 505 void JumpIfNotSmi(Register src, |
499 Label* on_not_smi, | 506 Label* on_not_smi, |
500 Label::Distance near_jump = Label::kFar); | 507 Label::Distance near_jump = Label::kFar); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 void SmiNot(Register dst, Register src); | 650 void SmiNot(Register dst, Register src); |
644 void SmiAnd(Register dst, Register src1, Register src2); | 651 void SmiAnd(Register dst, Register src1, Register src2); |
645 void SmiOr(Register dst, Register src1, Register src2); | 652 void SmiOr(Register dst, Register src1, Register src2); |
646 void SmiXor(Register dst, Register src1, Register src2); | 653 void SmiXor(Register dst, Register src1, Register src2); |
647 void SmiAndConstant(Register dst, Register src1, Smi* constant); | 654 void SmiAndConstant(Register dst, Register src1, Smi* constant); |
648 void SmiOrConstant(Register dst, Register src1, Smi* constant); | 655 void SmiOrConstant(Register dst, Register src1, Smi* constant); |
649 void SmiXorConstant(Register dst, Register src1, Smi* constant); | 656 void SmiXorConstant(Register dst, Register src1, Smi* constant); |
650 | 657 |
651 void SmiShiftLeftConstant(Register dst, | 658 void SmiShiftLeftConstant(Register dst, |
652 Register src, | 659 Register src, |
653 int shift_value); | 660 int shift_value, |
| 661 Label* on_not_smi_result); |
654 void SmiShiftLogicalRightConstant(Register dst, | 662 void SmiShiftLogicalRightConstant(Register dst, |
655 Register src, | 663 Register src, |
656 int shift_value, | 664 int shift_value, |
657 Label* on_not_smi_result, | 665 Label* on_not_smi_result, |
658 Label::Distance near_jump = Label::kFar); | 666 Label::Distance near_jump = Label::kFar); |
659 void SmiShiftArithmeticRightConstant(Register dst, | 667 void SmiShiftArithmeticRightConstant(Register dst, |
660 Register src, | 668 Register src, |
661 int shift_value); | 669 int shift_value); |
662 | 670 |
663 // Shifts a smi value to the left, and returns the result if that is a smi. | 671 // Shifts a smi value to the left, and returns the result if that is a smi. |
664 // Uses and clobbers rcx, so dst may not be rcx. | 672 // Uses and clobbers rcx, so dst may not be rcx. |
665 void SmiShiftLeft(Register dst, | 673 void SmiShiftLeft(Register dst, |
666 Register src1, | 674 Register src1, |
667 Register src2); | 675 Register src2, |
| 676 Label* on_not_smi_result); |
668 // Shifts a smi value to the right, shifting in zero bits at the top, and | 677 // Shifts a smi value to the right, shifting in zero bits at the top, and |
669 // returns the unsigned intepretation of the result if that is a smi. | 678 // returns the unsigned intepretation of the result if that is a smi. |
670 // Uses and clobbers rcx, so dst may not be rcx. | 679 // Uses and clobbers rcx, so dst may not be rcx. |
671 void SmiShiftLogicalRight(Register dst, | 680 void SmiShiftLogicalRight(Register dst, |
672 Register src1, | 681 Register src1, |
673 Register src2, | 682 Register src2, |
674 Label* on_not_smi_result, | 683 Label* on_not_smi_result, |
675 Label::Distance near_jump = Label::kFar); | 684 Label::Distance near_jump = Label::kFar); |
676 // Shifts a smi value to the right, sign extending the top, and | 685 // Shifts a smi value to the right, sign extending the top, and |
677 // returns the signed intepretation of the result. That will always | 686 // returns the signed intepretation of the result. That will always |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 masm->popfq(); \ | 1544 masm->popfq(); \ |
1536 } \ | 1545 } \ |
1537 masm-> | 1546 masm-> |
1538 #else | 1547 #else |
1539 #define ACCESS_MASM(masm) masm-> | 1548 #define ACCESS_MASM(masm) masm-> |
1540 #endif | 1549 #endif |
1541 | 1550 |
1542 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
1543 | 1552 |
1544 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1553 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |