OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 901 |
902 Condition MacroAssembler::CheckSmi(const Operand& src) { | 902 Condition MacroAssembler::CheckSmi(const Operand& src) { |
903 ASSERT_EQ(0, kSmiTag); | 903 ASSERT_EQ(0, kSmiTag); |
904 testb(src, Immediate(kSmiTagMask)); | 904 testb(src, Immediate(kSmiTagMask)); |
905 return zero; | 905 return zero; |
906 } | 906 } |
907 | 907 |
908 | 908 |
909 Condition MacroAssembler::CheckNonNegativeSmi(Register src) { | 909 Condition MacroAssembler::CheckNonNegativeSmi(Register src) { |
910 ASSERT_EQ(0, kSmiTag); | 910 ASSERT_EQ(0, kSmiTag); |
911 // Make mask 0x8000000000000001 and test that both bits are zero. | 911 // Test that both bits of the mask 0x8000000000000001 are zero. |
912 movq(kScratchRegister, src); | 912 movq(kScratchRegister, src); |
913 rol(kScratchRegister, Immediate(1)); | 913 rol(kScratchRegister, Immediate(1)); |
914 testb(kScratchRegister, Immediate(3)); | 914 testb(kScratchRegister, Immediate(3)); |
915 return zero; | 915 return zero; |
916 } | 916 } |
917 | 917 |
918 | 918 |
919 Condition MacroAssembler::CheckBothSmi(Register first, Register second) { | 919 Condition MacroAssembler::CheckBothSmi(Register first, Register second) { |
920 if (first.is(second)) { | 920 if (first.is(second)) { |
921 return CheckSmi(first); | 921 return CheckSmi(first); |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2651 CPU::FlushICache(address_, size_); | 2651 CPU::FlushICache(address_, size_); |
2652 | 2652 |
2653 // Check that the code was patched as expected. | 2653 // Check that the code was patched as expected. |
2654 ASSERT(masm_.pc_ == address_ + size_); | 2654 ASSERT(masm_.pc_ == address_ + size_); |
2655 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2655 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2656 } | 2656 } |
2657 | 2657 |
2658 } } // namespace v8::internal | 2658 } } // namespace v8::internal |
2659 | 2659 |
2660 #endif // V8_TARGET_ARCH_X64 | 2660 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |