OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 // is too small, a fatal error occurs. No deallocation of the buffer is done | 493 // is too small, a fatal error occurs. No deallocation of the buffer is done |
494 // upon destruction of the assembler. | 494 // upon destruction of the assembler. |
495 Assembler(Isolate* isolate, void* buffer, int buffer_size) | 495 Assembler(Isolate* isolate, void* buffer, int buffer_size) |
496 : Assembler(IsolateData(isolate), buffer, buffer_size) {} | 496 : Assembler(IsolateData(isolate), buffer, buffer_size) {} |
497 Assembler(IsolateData isolate_data, void* buffer, int buffer_size); | 497 Assembler(IsolateData isolate_data, void* buffer, int buffer_size); |
498 virtual ~Assembler() { } | 498 virtual ~Assembler() { } |
499 | 499 |
500 // GetCode emits any pending (non-emitted) code and fills the descriptor | 500 // GetCode emits any pending (non-emitted) code and fills the descriptor |
501 // desc. GetCode() is idempotent; it returns the same result if no other | 501 // desc. GetCode() is idempotent; it returns the same result if no other |
502 // Assembler functions are invoked in between GetCode() calls. | 502 // Assembler functions are invoked in between GetCode() calls. |
503 void GetCode(CodeDesc* desc); | 503 void GetCode(Isolate* isolate, CodeDesc* desc); |
504 | 504 |
505 // Label operations & relative jumps (PPUM Appendix D). | 505 // Label operations & relative jumps (PPUM Appendix D). |
506 // | 506 // |
507 // Takes a branch opcode (cc) and a label (L) and generates | 507 // Takes a branch opcode (cc) and a label (L) and generates |
508 // either a backward branch or a forward branch and links it | 508 // either a backward branch or a forward branch and links it |
509 // to the label fixup chain. Usage: | 509 // to the label fixup chain. Usage: |
510 // | 510 // |
511 // Label L; // unbound label | 511 // Label L; // unbound label |
512 // j(cc, &L); // forward branch to unbound label | 512 // j(cc, &L); // forward branch to unbound label |
513 // bind(&L); // bind label to the current pc | 513 // bind(&L); // bind label to the current pc |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 } | 581 } |
582 INLINE(static Address target_address_at(Address pc, Code* code)); | 582 INLINE(static Address target_address_at(Address pc, Code* code)); |
583 INLINE(static void set_target_address_at( | 583 INLINE(static void set_target_address_at( |
584 Isolate* isolate, Address pc, Code* code, Address target, | 584 Isolate* isolate, Address pc, Code* code, Address target, |
585 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); | 585 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); |
586 | 586 |
587 // Return the code target address at a call site from the return address | 587 // Return the code target address at a call site from the return address |
588 // of that call in the instruction stream. | 588 // of that call in the instruction stream. |
589 inline static Address target_address_from_return_address(Address pc); | 589 inline static Address target_address_from_return_address(Address pc); |
590 | 590 |
| 591 static void set_heap_number(Handle<HeapObject> number, Address pc) { |
| 592 UNIMPLEMENTED(); |
| 593 } |
| 594 |
591 static void QuietNaN(HeapObject* nan); | 595 static void QuietNaN(HeapObject* nan); |
592 | 596 |
593 // This sets the branch destination (which gets loaded at the call address). | 597 // This sets the branch destination (which gets loaded at the call address). |
594 // This is for calls and branches within generated code. The serializer | 598 // This is for calls and branches within generated code. The serializer |
595 // has already deserialized the lui/ori instructions etc. | 599 // has already deserialized the lui/ori instructions etc. |
596 inline static void deserialization_set_special_target_at( | 600 inline static void deserialization_set_special_target_at( |
597 Isolate* isolate, Address instruction_payload, Code* code, | 601 Isolate* isolate, Address instruction_payload, Code* code, |
598 Address target) { | 602 Address target) { |
599 if (IsMipsArchVariant(kMips32r6)) { | 603 if (IsMipsArchVariant(kMips32r6)) { |
600 // On R6 the address location is shifted by one instruction | 604 // On R6 the address location is shifted by one instruction |
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2216 public: | 2220 public: |
2217 explicit EnsureSpace(Assembler* assembler) { | 2221 explicit EnsureSpace(Assembler* assembler) { |
2218 assembler->CheckBuffer(); | 2222 assembler->CheckBuffer(); |
2219 } | 2223 } |
2220 }; | 2224 }; |
2221 | 2225 |
2222 } // namespace internal | 2226 } // namespace internal |
2223 } // namespace v8 | 2227 } // namespace v8 |
2224 | 2228 |
2225 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 2229 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |