| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // Return 1/0 for true/false in rax. | 248 // Return 1/0 for true/false in rax. |
| 249 __ bind(&true_result); | 249 __ bind(&true_result); |
| 250 __ movq(rax, Immediate(1)); | 250 __ movq(rax, Immediate(1)); |
| 251 __ ret(1 * kPointerSize); | 251 __ ret(1 * kPointerSize); |
| 252 __ bind(&false_result); | 252 __ bind(&false_result); |
| 253 __ Set(rax, 0); | 253 __ Set(rax, 0); |
| 254 __ ret(1 * kPointerSize); | 254 __ ret(1 * kPointerSize); |
| 255 } | 255 } |
| 256 | 256 |
| 257 | 257 |
| 258 void WriteBufferOverflowStub::Generate(MacroAssembler* masm) { | 258 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
| 259 // We don't allow a GC during a write buffer overflow so there is no need to | 259 // We don't allow a GC during a store buffer overflow so there is no need to |
| 260 // store the registers in any particular way, but we do have to store and | 260 // store the registers in any particular way, but we do have to store and |
| 261 // restore them. | 261 // restore them. |
| 262 Register saved_regs[] = | 262 Register saved_regs[] = |
| 263 { rax, rcx, rdx, rbx, rbp, rsi, rdi, r8, r9, r10, r11 }; | 263 { rax, rcx, rdx, rbx, rbp, rsi, rdi, r8, r9, r10, r11 }; |
| 264 const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); | 264 const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); |
| 265 for (int i = 0; i < kNumberOfSavedRegs; i++) { | 265 for (int i = 0; i < kNumberOfSavedRegs; i++) { |
| 266 __ push(saved_regs[i]); | 266 __ push(saved_regs[i]); |
| 267 } | 267 } |
| 268 // R12 to r15 are callee save on all platforms. | 268 // R12 to r15 are callee save on all platforms. |
| 269 if (save_doubles_ == kSaveFPRegs) { | 269 if (save_doubles_ == kSaveFPRegs) { |
| 270 CpuFeatures::Scope scope(SSE2); | 270 CpuFeatures::Scope scope(SSE2); |
| 271 __ subq(rsp, Immediate(kDoubleSize * XMMRegister::kNumRegisters)); | 271 __ subq(rsp, Immediate(kDoubleSize * XMMRegister::kNumRegisters)); |
| 272 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { | 272 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
| 273 XMMRegister reg = XMMRegister::from_code(i); | 273 XMMRegister reg = XMMRegister::from_code(i); |
| 274 __ movsd(Operand(rsp, i * kDoubleSize), reg); | 274 __ movsd(Operand(rsp, i * kDoubleSize), reg); |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 const int argument_count = 0; | 277 const int argument_count = 0; |
| 278 __ PrepareCallCFunction(argument_count); | 278 __ PrepareCallCFunction(argument_count); |
| 279 ExternalReference write_buffer_overflow = | 279 ExternalReference store_buffer_overflow = |
| 280 ExternalReference(Runtime::FunctionForId(Runtime::kWriteBufferOverflow)); | 280 ExternalReference(Runtime::FunctionForId(Runtime::kStoreBufferOverflow)); |
| 281 __ CallCFunction(write_buffer_overflow, argument_count); | 281 __ CallCFunction(store_buffer_overflow, argument_count); |
| 282 if (save_doubles_ == kSaveFPRegs) { | 282 if (save_doubles_ == kSaveFPRegs) { |
| 283 CpuFeatures::Scope scope(SSE2); | 283 CpuFeatures::Scope scope(SSE2); |
| 284 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { | 284 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
| 285 XMMRegister reg = XMMRegister::from_code(i); | 285 XMMRegister reg = XMMRegister::from_code(i); |
| 286 __ movsd(reg, Operand(rsp, i * kDoubleSize)); | 286 __ movsd(reg, Operand(rsp, i * kDoubleSize)); |
| 287 } | 287 } |
| 288 __ addq(rsp, Immediate(kDoubleSize * XMMRegister::kNumRegisters)); | 288 __ addq(rsp, Immediate(kDoubleSize * XMMRegister::kNumRegisters)); |
| 289 } | 289 } |
| 290 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { | 290 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { |
| 291 __ pop(saved_regs[i]); | 291 __ pop(saved_regs[i]); |
| (...skipping 3852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4144 | 4144 |
| 4145 void ICCompareStub::GenerateMiss(MacroAssembler* masm) { | 4145 void ICCompareStub::GenerateMiss(MacroAssembler* masm) { |
| 4146 UNIMPLEMENTED(); | 4146 UNIMPLEMENTED(); |
| 4147 } | 4147 } |
| 4148 | 4148 |
| 4149 #undef __ | 4149 #undef __ |
| 4150 | 4150 |
| 4151 } } // namespace v8::internal | 4151 } } // namespace v8::internal |
| 4152 | 4152 |
| 4153 #endif // V8_TARGET_ARCH_X64 | 4153 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |