Chromium Code Reviews| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 // Link this handler. | 413 // Link this handler. |
| 414 movq(Operand(kScratchRegister, 0), rsp); | 414 movq(Operand(kScratchRegister, 0), rsp); |
| 415 } | 415 } |
| 416 | 416 |
| 417 | 417 |
| 418 void MacroAssembler::Ret() { | 418 void MacroAssembler::Ret() { |
| 419 ret(0); | 419 ret(0); |
| 420 } | 420 } |
| 421 | 421 |
| 422 | 422 |
| 423 void MacroAssembler::FCmp() { | |
| 424 fcompp(); | |
| 425 push(rax); | |
| 426 fnstsw_ax(); | |
| 427 sahf(); | |
|
Lasse Reichstein
2009/06/26 09:41:04
Add comment that sahf isn't safe to use.
We shoul
William Hesse
2009/06/26 19:45:59
Done.
| |
| 428 pop(rax); | |
| 429 } | |
| 430 | |
| 431 | |
| 423 void MacroAssembler::CmpObjectType(Register heap_object, | 432 void MacroAssembler::CmpObjectType(Register heap_object, |
| 424 InstanceType type, | 433 InstanceType type, |
| 425 Register map) { | 434 Register map) { |
| 426 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 435 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 427 CmpInstanceType(map, type); | 436 CmpInstanceType(map, type); |
| 428 } | 437 } |
| 429 | 438 |
| 430 | 439 |
| 431 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { | 440 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { |
| 432 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), | 441 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 830 push(rcx); | 839 push(rcx); |
| 831 | 840 |
| 832 // Clear the top frame. | 841 // Clear the top frame. |
| 833 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); | 842 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); |
| 834 movq(kScratchRegister, c_entry_fp_address); | 843 movq(kScratchRegister, c_entry_fp_address); |
| 835 movq(Operand(kScratchRegister, 0), Immediate(0)); | 844 movq(Operand(kScratchRegister, 0), Immediate(0)); |
| 836 } | 845 } |
| 837 | 846 |
| 838 | 847 |
| 839 } } // namespace v8::internal | 848 } } // namespace v8::internal |
| OLD | NEW |