| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // is too small, a fatal error occurs. No deallocation of the buffer is done | 398 // is too small, a fatal error occurs. No deallocation of the buffer is done |
| 399 // upon destruction of the assembler. | 399 // upon destruction of the assembler. |
| 400 Assembler(Isolate* isolate, void* buffer, int buffer_size) | 400 Assembler(Isolate* isolate, void* buffer, int buffer_size) |
| 401 : Assembler(IsolateData(isolate), buffer, buffer_size) {} | 401 : Assembler(IsolateData(isolate), buffer, buffer_size) {} |
| 402 Assembler(IsolateData isolate_data, void* buffer, int buffer_size); | 402 Assembler(IsolateData isolate_data, void* buffer, int buffer_size); |
| 403 virtual ~Assembler() {} | 403 virtual ~Assembler() {} |
| 404 | 404 |
| 405 // GetCode emits any pending (non-emitted) code and fills the descriptor | 405 // GetCode emits any pending (non-emitted) code and fills the descriptor |
| 406 // desc. GetCode() is idempotent; it returns the same result if no other | 406 // desc. GetCode() is idempotent; it returns the same result if no other |
| 407 // Assembler functions are invoked in between GetCode() calls. | 407 // Assembler functions are invoked in between GetCode() calls. |
| 408 void GetCode(CodeDesc* desc); | 408 void GetCode(Isolate* isolate, CodeDesc* desc); |
| 409 | 409 |
| 410 // Label operations & relative jumps (PPUM Appendix D) | 410 // Label operations & relative jumps (PPUM Appendix D) |
| 411 // | 411 // |
| 412 // Takes a branch opcode (cc) and a label (L) and generates | 412 // Takes a branch opcode (cc) and a label (L) and generates |
| 413 // either a backward branch or a forward branch and links it | 413 // either a backward branch or a forward branch and links it |
| 414 // to the label fixup chain. Usage: | 414 // to the label fixup chain. Usage: |
| 415 // | 415 // |
| 416 // Label L; // unbound label | 416 // Label L; // unbound label |
| 417 // j(cc, &L); // forward branch to unbound label | 417 // j(cc, &L); // forward branch to unbound label |
| 418 // bind(&L); // bind label to the current pc | 418 // bind(&L); // bind label to the current pc |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); | 450 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); |
| 451 INLINE(static Address target_address_at(Address pc, Code* code)); | 451 INLINE(static Address target_address_at(Address pc, Code* code)); |
| 452 INLINE(static void set_target_address_at( | 452 INLINE(static void set_target_address_at( |
| 453 Isolate* isolate, Address pc, Code* code, Address target, | 453 Isolate* isolate, Address pc, Code* code, Address target, |
| 454 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); | 454 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); |
| 455 | 455 |
| 456 // Return the code target address at a call site from the return address | 456 // Return the code target address at a call site from the return address |
| 457 // of that call in the instruction stream. | 457 // of that call in the instruction stream. |
| 458 inline static Address target_address_from_return_address(Address pc); | 458 inline static Address target_address_from_return_address(Address pc); |
| 459 | 459 |
| 460 static void set_heap_number(Handle<HeapObject> number, Address pc) { |
| 461 UNIMPLEMENTED(); |
| 462 } |
| 463 |
| 460 // Given the address of the beginning of a call, return the address | 464 // Given the address of the beginning of a call, return the address |
| 461 // in the instruction stream that the call will return to. | 465 // in the instruction stream that the call will return to. |
| 462 INLINE(static Address return_address_from_call_start(Address pc)); | 466 INLINE(static Address return_address_from_call_start(Address pc)); |
| 463 | 467 |
| 464 inline Handle<Object> code_target_object_handle_at(Address pc); | 468 inline Handle<Object> code_target_object_handle_at(Address pc); |
| 465 // This sets the branch destination. | 469 // This sets the branch destination. |
| 466 // This is for calls and branches within generated code. | 470 // This is for calls and branches within generated code. |
| 467 inline static void deserialization_set_special_target_at( | 471 inline static void deserialization_set_special_target_at( |
| 468 Isolate* isolate, Address instruction_payload, Code* code, | 472 Isolate* isolate, Address instruction_payload, Code* code, |
| 469 Address target); | 473 Address target); |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 | 1482 |
| 1479 class EnsureSpace BASE_EMBEDDED { | 1483 class EnsureSpace BASE_EMBEDDED { |
| 1480 public: | 1484 public: |
| 1481 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1485 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
| 1482 }; | 1486 }; |
| 1483 | 1487 |
| 1484 } // namespace internal | 1488 } // namespace internal |
| 1485 } // namespace v8 | 1489 } // namespace v8 |
| 1486 | 1490 |
| 1487 #endif // V8_S390_ASSEMBLER_S390_H_ | 1491 #endif // V8_S390_ASSEMBLER_S390_H_ |
| OLD | NEW |