| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 ASSERT(!dst.is(src2)); | 1104 ASSERT(!dst.is(src2)); |
| 1105 if (!dst.is(src1)) { | 1105 if (!dst.is(src1)) { |
| 1106 movq(dst, src1); | 1106 movq(dst, src1); |
| 1107 } | 1107 } |
| 1108 and_(dst, src2); | 1108 and_(dst, src2); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 | 1111 |
| 1112 void MacroAssembler::SmiAndConstant(Register dst, Register src, Smi* constant) { | 1112 void MacroAssembler::SmiAndConstant(Register dst, Register src, Smi* constant) { |
| 1113 if (constant->value() == 0) { | 1113 if (constant->value() == 0) { |
| 1114 xor_(dst, dst); | 1114 Set(dst, 0); |
| 1115 } else if (dst.is(src)) { | 1115 } else if (dst.is(src)) { |
| 1116 ASSERT(!dst.is(kScratchRegister)); | 1116 ASSERT(!dst.is(kScratchRegister)); |
| 1117 Register constant_reg = GetSmiConstant(constant); | 1117 Register constant_reg = GetSmiConstant(constant); |
| 1118 and_(dst, constant_reg); | 1118 and_(dst, constant_reg); |
| 1119 } else { | 1119 } else { |
| 1120 LoadSmiConstant(dst, constant); | 1120 LoadSmiConstant(dst, constant); |
| 1121 and_(dst, src); | 1121 and_(dst, src); |
| 1122 } | 1122 } |
| 1123 } | 1123 } |
| 1124 | 1124 |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 } else { | 1599 } else { |
| 1600 subl(operand, Immediate(value)); | 1600 subl(operand, Immediate(value)); |
| 1601 } | 1601 } |
| 1602 } | 1602 } |
| 1603 } | 1603 } |
| 1604 | 1604 |
| 1605 | 1605 |
| 1606 #ifdef ENABLE_DEBUGGER_SUPPORT | 1606 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1607 void MacroAssembler::DebugBreak() { | 1607 void MacroAssembler::DebugBreak() { |
| 1608 ASSERT(allow_stub_calls()); | 1608 ASSERT(allow_stub_calls()); |
| 1609 xor_(rax, rax); // no arguments | 1609 Set(rax, 0); // No arguments. |
| 1610 movq(rbx, ExternalReference(Runtime::kDebugBreak)); | 1610 movq(rbx, ExternalReference(Runtime::kDebugBreak)); |
| 1611 CEntryStub ces(1); | 1611 CEntryStub ces(1); |
| 1612 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); | 1612 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); |
| 1613 } | 1613 } |
| 1614 #endif // ENABLE_DEBUGGER_SUPPORT | 1614 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1615 | 1615 |
| 1616 | 1616 |
| 1617 void MacroAssembler::InvokeCode(Register code, | 1617 void MacroAssembler::InvokeCode(Register code, |
| 1618 const ParameterCount& expected, | 1618 const ParameterCount& expected, |
| 1619 const ParameterCount& actual, | 1619 const ParameterCount& actual, |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 CPU::FlushICache(address_, size_); | 2347 CPU::FlushICache(address_, size_); |
| 2348 | 2348 |
| 2349 // Check that the code was patched as expected. | 2349 // Check that the code was patched as expected. |
| 2350 ASSERT(masm_.pc_ == address_ + size_); | 2350 ASSERT(masm_.pc_ == address_ + size_); |
| 2351 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2351 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2352 } | 2352 } |
| 2353 | 2353 |
| 2354 } } // namespace v8::internal | 2354 } } // namespace v8::internal |
| 2355 | 2355 |
| 2356 #endif // V8_TARGET_ARCH_X64 | 2356 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |