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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(CodeDesc* desc); |
409 | 409 |
410 // Read/Modify the code target in the branch/call instruction at pc. | 410 // Read/Modify the code target in the branch/call instruction at pc. |
411 // On the x64 architecture, the address is absolute, not relative. | 411 // On the x64 architecture, the address is absolute, not relative. |
412 static inline Address target_address_at(Address pc); | 412 static inline Address target_address_at(Address pc); |
413 static inline void set_target_address_at(Address pc, Address target); | 413 static inline void set_target_address_at(Address pc, Address target); |
414 | 414 |
415 // Distance between the address of the code target in the call instruction | 415 // Distance between the address of the code target in the call instruction |
416 // and the return address | 416 // and the return address. Checked in the debug build. |
417 static const int kTargetAddrToReturnAddrDist = kPointerSize; | 417 static const int kTargetAddrToReturnAddrDist = 3 + kPointerSize; |
418 | 418 |
419 | 419 |
420 // --------------------------------------------------------------------------- | 420 // --------------------------------------------------------------------------- |
421 // Code generation | 421 // Code generation |
422 // | 422 // |
423 // Function names correspond one-to-one to x64 instruction mnemonics. | 423 // Function names correspond one-to-one to x64 instruction mnemonics. |
424 // Unless specified otherwise, instructions operate on 64-bit operands. | 424 // Unless specified otherwise, instructions operate on 64-bit operands. |
425 // | 425 // |
426 // If we need versions of an assembly instruction that operate on different | 426 // If we need versions of an assembly instruction that operate on different |
427 // width arguments, we add a single-letter suffix specifying the width. | 427 // width arguments, we add a single-letter suffix specifying the width. |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 private: | 1103 private: |
1104 Assembler* assembler_; | 1104 Assembler* assembler_; |
1105 #ifdef DEBUG | 1105 #ifdef DEBUG |
1106 int space_before_; | 1106 int space_before_; |
1107 #endif | 1107 #endif |
1108 }; | 1108 }; |
1109 | 1109 |
1110 } } // namespace v8::internal | 1110 } } // namespace v8::internal |
1111 | 1111 |
1112 #endif // V8_X64_ASSEMBLER_X64_H_ | 1112 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |