OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } else { | 344 } else { |
345 fucompp(); | 345 fucompp(); |
346 push(eax); | 346 push(eax); |
347 fnstsw_ax(); | 347 fnstsw_ax(); |
348 sahf(); | 348 sahf(); |
349 pop(eax); | 349 pop(eax); |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 void MacroAssembler::AbortIfNotNumber(Register object, const char* msg) { | 354 void MacroAssembler::AbortIfNotNumber(Register object) { |
355 Label ok; | 355 Label ok; |
356 test(object, Immediate(kSmiTagMask)); | 356 test(object, Immediate(kSmiTagMask)); |
357 j(zero, &ok); | 357 j(zero, &ok); |
358 cmp(FieldOperand(object, HeapObject::kMapOffset), | 358 cmp(FieldOperand(object, HeapObject::kMapOffset), |
359 Factory::heap_number_map()); | 359 Factory::heap_number_map()); |
360 Assert(equal, msg); | 360 Assert(equal, "Operand not a number"); |
361 bind(&ok); | 361 bind(&ok); |
362 } | 362 } |
363 | 363 |
364 | 364 |
365 void MacroAssembler::AbortIfNotSmi(Register object, const char* msg) { | 365 void MacroAssembler::AbortIfNotSmi(Register object) { |
366 test(object, Immediate(kSmiTagMask)); | 366 test(object, Immediate(kSmiTagMask)); |
367 Assert(equal, msg); | 367 Assert(equal, "Operand not a smi"); |
368 } | 368 } |
369 | 369 |
370 | 370 |
371 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 371 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
372 push(ebp); | 372 push(ebp); |
373 mov(ebp, Operand(esp)); | 373 mov(ebp, Operand(esp)); |
374 push(esi); | 374 push(esi); |
375 push(Immediate(Smi::FromInt(type))); | 375 push(Immediate(Smi::FromInt(type))); |
376 push(Immediate(CodeObject())); | 376 push(Immediate(CodeObject())); |
377 if (FLAG_debug_code) { | 377 if (FLAG_debug_code) { |
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1644 // Indicate that code has changed. | 1644 // Indicate that code has changed. |
1645 CPU::FlushICache(address_, size_); | 1645 CPU::FlushICache(address_, size_); |
1646 | 1646 |
1647 // Check that the code was patched as expected. | 1647 // Check that the code was patched as expected. |
1648 ASSERT(masm_.pc_ == address_ + size_); | 1648 ASSERT(masm_.pc_ == address_ + size_); |
1649 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1649 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1650 } | 1650 } |
1651 | 1651 |
1652 | 1652 |
1653 } } // namespace v8::internal | 1653 } } // namespace v8::internal |
OLD | NEW |