| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // Return 1/0 for true/false in eax. | 252 // Return 1/0 for true/false in eax. |
| 253 __ bind(&true_result); | 253 __ bind(&true_result); |
| 254 __ mov(eax, 1); | 254 __ mov(eax, 1); |
| 255 __ ret(1 * kPointerSize); | 255 __ ret(1 * kPointerSize); |
| 256 __ bind(&false_result); | 256 __ bind(&false_result); |
| 257 __ mov(eax, 0); | 257 __ mov(eax, 0); |
| 258 __ ret(1 * kPointerSize); | 258 __ ret(1 * kPointerSize); |
| 259 } | 259 } |
| 260 | 260 |
| 261 | 261 |
| 262 void WriteBufferOverflowStub::Generate(MacroAssembler* masm) { | 262 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
| 263 // We don't allow a GC during a write buffer overflow so there is no need to | 263 // We don't allow a GC during a store buffer overflow so there is no need to |
| 264 // store the registers in any particular way, but we do have to store and | 264 // store the registers in any particular way, but we do have to store and |
| 265 // restore them. | 265 // restore them. |
| 266 __ pushad(); | 266 __ pushad(); |
| 267 if (save_doubles_ == kSaveFPRegs) { | 267 if (save_doubles_ == kSaveFPRegs) { |
| 268 CpuFeatures::Scope scope(SSE2); | 268 CpuFeatures::Scope scope(SSE2); |
| 269 __ sub(Operand(esp), Immediate(kDoubleSize * XMMRegister::kNumRegisters)); | 269 __ sub(Operand(esp), Immediate(kDoubleSize * XMMRegister::kNumRegisters)); |
| 270 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { | 270 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
| 271 XMMRegister reg = XMMRegister::from_code(i); | 271 XMMRegister reg = XMMRegister::from_code(i); |
| 272 __ movdbl(Operand(esp, i * kDoubleSize), reg); | 272 __ movdbl(Operand(esp, i * kDoubleSize), reg); |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 const int argument_count = 0; | 275 const int argument_count = 0; |
| 276 __ PrepareCallCFunction(argument_count, ecx); | 276 __ PrepareCallCFunction(argument_count, ecx); |
| 277 ExternalReference write_buffer_overflow = | 277 ExternalReference store_buffer_overflow = |
| 278 ExternalReference(Runtime::FunctionForId(Runtime::kWriteBufferOverflow)); | 278 ExternalReference(Runtime::FunctionForId(Runtime::kStoreBufferOverflow)); |
| 279 __ CallCFunction(write_buffer_overflow, argument_count); | 279 __ CallCFunction(store_buffer_overflow, argument_count); |
| 280 if (save_doubles_ == kSaveFPRegs) { | 280 if (save_doubles_ == kSaveFPRegs) { |
| 281 CpuFeatures::Scope scope(SSE2); | 281 CpuFeatures::Scope scope(SSE2); |
| 282 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { | 282 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { |
| 283 XMMRegister reg = XMMRegister::from_code(i); | 283 XMMRegister reg = XMMRegister::from_code(i); |
| 284 __ movdbl(reg, Operand(esp, i * kDoubleSize)); | 284 __ movdbl(reg, Operand(esp, i * kDoubleSize)); |
| 285 } | 285 } |
| 286 __ add(Operand(esp), Immediate(kDoubleSize * XMMRegister::kNumRegisters)); | 286 __ add(Operand(esp), Immediate(kDoubleSize * XMMRegister::kNumRegisters)); |
| 287 } | 287 } |
| 288 __ popad(); | 288 __ popad(); |
| 289 __ ret(0); | 289 __ ret(0); |
| (...skipping 6150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6440 // Do a tail call to the rewritten stub. | 6440 // Do a tail call to the rewritten stub. |
| 6441 __ jmp(Operand(edi)); | 6441 __ jmp(Operand(edi)); |
| 6442 } | 6442 } |
| 6443 | 6443 |
| 6444 | 6444 |
| 6445 #undef __ | 6445 #undef __ |
| 6446 | 6446 |
| 6447 } } // namespace v8::internal | 6447 } } // namespace v8::internal |
| 6448 | 6448 |
| 6449 #endif // V8_TARGET_ARCH_IA32 | 6449 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |