| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 305 |
| 306 void MacroAssembler::FCmp() { | 306 void MacroAssembler::FCmp() { |
| 307 fcompp(); | 307 fcompp(); |
| 308 push(eax); | 308 push(eax); |
| 309 fnstsw_ax(); | 309 fnstsw_ax(); |
| 310 sahf(); | 310 sahf(); |
| 311 pop(eax); | 311 pop(eax); |
| 312 } | 312 } |
| 313 | 313 |
| 314 | 314 |
| 315 void MacroAssembler::EnterInternalFrame() { | 315 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
| 316 int type = StackFrame::INTERNAL; | |
| 317 | |
| 318 push(ebp); | 316 push(ebp); |
| 319 mov(ebp, Operand(esp)); | 317 mov(ebp, Operand(esp)); |
| 320 push(esi); | 318 push(esi); |
| 321 push(Immediate(Smi::FromInt(type))); | 319 push(Immediate(Smi::FromInt(type))); |
| 322 push(Immediate(0)); // Push an empty code cache slot. | 320 push(Immediate(0)); // Push an empty code cache slot. |
| 323 } | 321 } |
| 324 | 322 |
| 325 | 323 |
| 326 void MacroAssembler::LeaveInternalFrame() { | 324 void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
| 327 if (FLAG_debug_code) { | 325 if (FLAG_debug_code) { |
| 328 StackFrame::Type type = StackFrame::INTERNAL; | |
| 329 cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset), | 326 cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset), |
| 330 Immediate(Smi::FromInt(type))); | 327 Immediate(Smi::FromInt(type))); |
| 331 Check(equal, "stack frame types must match"); | 328 Check(equal, "stack frame types must match"); |
| 332 } | 329 } |
| 333 leave(); | 330 leave(); |
| 334 } | 331 } |
| 335 | 332 |
| 336 | 333 |
| 337 void MacroAssembler::EnterExitFrame(StackFrame::Type type) { | 334 void MacroAssembler::EnterExitFrame(StackFrame::Type type) { |
| 338 ASSERT(type == StackFrame::EXIT || type == StackFrame::EXIT_DEBUG); | 335 ASSERT(type == StackFrame::EXIT || type == StackFrame::EXIT_DEBUG); |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 // Indicate that code has changed. | 961 // Indicate that code has changed. |
| 965 CPU::FlushICache(address_, size_); | 962 CPU::FlushICache(address_, size_); |
| 966 | 963 |
| 967 // Check that the code was patched as expected. | 964 // Check that the code was patched as expected. |
| 968 ASSERT(masm_.pc_ == address_ + size_); | 965 ASSERT(masm_.pc_ == address_ + size_); |
| 969 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 966 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 970 } | 967 } |
| 971 | 968 |
| 972 | 969 |
| 973 } } // namespace v8::internal | 970 } } // namespace v8::internal |
| OLD | NEW |