| 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 // | 493 // |
| 494 // If the provided buffer is NULL, the assembler allocates and grows its own | 494 // If the provided buffer is NULL, the assembler allocates and grows its own |
| 495 // buffer, and buffer_size determines the initial buffer size. The buffer is | 495 // buffer, and buffer_size determines the initial buffer size. The buffer is |
| 496 // owned by the assembler and deallocated upon destruction of the assembler. | 496 // owned by the assembler and deallocated upon destruction of the assembler. |
| 497 // | 497 // |
| 498 // If the provided buffer is not NULL, the assembler uses the provided buffer | 498 // If the provided buffer is not NULL, the assembler uses the provided buffer |
| 499 // for code generation and assumes its size to be buffer_size. If the buffer | 499 // for code generation and assumes its size to be buffer_size. If the buffer |
| 500 // is too small, a fatal error occurs. No deallocation of the buffer is done | 500 // is too small, a fatal error occurs. No deallocation of the buffer is done |
| 501 // upon destruction of the assembler. | 501 // upon destruction of the assembler. |
| 502 Assembler(Isolate* isolate, void* buffer, int buffer_size); | 502 Assembler(Isolate* isolate, void* buffer, int buffer_size); |
| 503 virtual ~Assembler() { } | 503 virtual ~Assembler(); |
| 504 | 504 |
| 505 // GetCode emits any pending (non-emitted) code and fills the descriptor | 505 // GetCode emits any pending (non-emitted) code and fills the descriptor |
| 506 // desc. GetCode() is idempotent; it returns the same result if no other | 506 // desc. GetCode() is idempotent; it returns the same result if no other |
| 507 // Assembler functions are invoked in between GetCode() calls. | 507 // Assembler functions are invoked in between GetCode() calls. |
| 508 void GetCode(CodeDesc* desc); | 508 void GetCode(CodeDesc* desc); |
| 509 | 509 |
| 510 // Read/Modify the code target in the relative branch/call instruction at pc. | 510 // Read/Modify the code target in the relative branch/call instruction at pc. |
| 511 // On the x64 architecture, we use relative jumps with a 32-bit displacement | 511 // On the x64 architecture, we use relative jumps with a 32-bit displacement |
| 512 // to jump to other Code objects in the Code space in the heap. | 512 // to jump to other Code objects in the Code space in the heap. |
| 513 // Jumps to C functions are done indirectly through a 64-bit register holding | 513 // Jumps to C functions are done indirectly through a 64-bit register holding |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 private: | 1581 private: |
| 1582 Assembler* assembler_; | 1582 Assembler* assembler_; |
| 1583 #ifdef DEBUG | 1583 #ifdef DEBUG |
| 1584 int space_before_; | 1584 int space_before_; |
| 1585 #endif | 1585 #endif |
| 1586 }; | 1586 }; |
| 1587 | 1587 |
| 1588 } } // namespace v8::internal | 1588 } } // namespace v8::internal |
| 1589 | 1589 |
| 1590 #endif // V8_X64_ASSEMBLER_X64_H_ | 1590 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |