| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 // desc. GetCode() is idempotent; it returns the same result if no other | 430 // desc. GetCode() is idempotent; it returns the same result if no other |
| 431 // Assembler functions are invoked in between GetCode() calls. | 431 // Assembler functions are invoked in between GetCode() calls. |
| 432 void GetCode(CodeDesc* desc); | 432 void GetCode(CodeDesc* desc); |
| 433 | 433 |
| 434 // Read/Modify the code target in the branch/call instruction at pc. | 434 // Read/Modify the code target in the branch/call instruction at pc. |
| 435 inline static Address target_address_at(Address pc); | 435 inline static Address target_address_at(Address pc); |
| 436 inline static void set_target_address_at(Address pc, Address target); | 436 inline static void set_target_address_at(Address pc, Address target); |
| 437 | 437 |
| 438 // Distance between the address of the code target in the call instruction | 438 // Distance between the address of the code target in the call instruction |
| 439 // and the return address | 439 // and the return address |
| 440 static const int kPatchReturnSequenceLength = kPointerSize; | 440 static const int kCallTargetAddressOffset = kPointerSize; |
| 441 // Distance between start of patched return sequence and the emitted address | 441 // Distance between start of patched return sequence and the emitted address |
| 442 // to jump to. | 442 // to jump to. |
| 443 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. | 443 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. |
| 444 | 444 |
| 445 | 445 |
| 446 // --------------------------------------------------------------------------- | 446 // --------------------------------------------------------------------------- |
| 447 // Code generation | 447 // Code generation |
| 448 // | 448 // |
| 449 // - function names correspond one-to-one to ia32 instruction mnemonics | 449 // - function names correspond one-to-one to ia32 instruction mnemonics |
| 450 // - unless specified otherwise, instructions operate on 32bit operands | 450 // - unless specified otherwise, instructions operate on 32bit operands |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 private: | 868 private: |
| 869 Assembler* assembler_; | 869 Assembler* assembler_; |
| 870 #ifdef DEBUG | 870 #ifdef DEBUG |
| 871 int space_before_; | 871 int space_before_; |
| 872 #endif | 872 #endif |
| 873 }; | 873 }; |
| 874 | 874 |
| 875 } } // namespace v8::internal | 875 } } // namespace v8::internal |
| 876 | 876 |
| 877 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 877 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |