| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 movq(Operand(kScratchRegister, 0), rsp); | 590 movq(Operand(kScratchRegister, 0), rsp); |
| 591 } | 591 } |
| 592 | 592 |
| 593 | 593 |
| 594 void MacroAssembler::Ret() { | 594 void MacroAssembler::Ret() { |
| 595 ret(0); | 595 ret(0); |
| 596 } | 596 } |
| 597 | 597 |
| 598 | 598 |
| 599 void MacroAssembler::FCmp() { | 599 void MacroAssembler::FCmp() { |
| 600 fcompp(); | 600 fucomip(); |
| 601 push(rax); | 601 ffree(0); |
| 602 fnstsw_ax(); | 602 fincstp(); |
| 603 if (CpuFeatures::IsSupported(CpuFeatures::SAHF)) { | |
| 604 sahf(); | |
| 605 } else { | |
| 606 shrl(rax, Immediate(8)); | |
| 607 and_(rax, Immediate(0xFF)); | |
| 608 push(rax); | |
| 609 popfq(); | |
| 610 } | |
| 611 pop(rax); | |
| 612 } | 603 } |
| 613 | 604 |
| 614 | 605 |
| 615 void MacroAssembler::CmpObjectType(Register heap_object, | 606 void MacroAssembler::CmpObjectType(Register heap_object, |
| 616 InstanceType type, | 607 InstanceType type, |
| 617 Register map) { | 608 Register map) { |
| 618 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 609 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 619 CmpInstanceType(map, type); | 610 CmpInstanceType(map, type); |
| 620 } | 611 } |
| 621 | 612 |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 movq(kScratchRegister, new_space_allocation_top); | 1368 movq(kScratchRegister, new_space_allocation_top); |
| 1378 #ifdef DEBUG | 1369 #ifdef DEBUG |
| 1379 cmpq(object, Operand(kScratchRegister, 0)); | 1370 cmpq(object, Operand(kScratchRegister, 0)); |
| 1380 Check(below, "Undo allocation of non allocated memory"); | 1371 Check(below, "Undo allocation of non allocated memory"); |
| 1381 #endif | 1372 #endif |
| 1382 movq(Operand(kScratchRegister, 0), object); | 1373 movq(Operand(kScratchRegister, 0), object); |
| 1383 } | 1374 } |
| 1384 | 1375 |
| 1385 | 1376 |
| 1386 } } // namespace v8::internal | 1377 } } // namespace v8::internal |
| OLD | NEW |