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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 // an instruction or relocation information. | 966 // an instruction or relocation information. |
967 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } | 967 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } |
968 | 968 |
969 // Get the number of bytes available in the buffer. | 969 // Get the number of bytes available in the buffer. |
970 inline int available_space() const { return reloc_info_writer.pos() - pc_; } | 970 inline int available_space() const { return reloc_info_writer.pos() - pc_; } |
971 | 971 |
972 static bool IsNop(Address addr) { return *addr == 0x90; } | 972 static bool IsNop(Address addr) { return *addr == 0x90; } |
973 | 973 |
974 PositionsRecorder* positions_recorder() { return &positions_recorder_; } | 974 PositionsRecorder* positions_recorder() { return &positions_recorder_; } |
975 | 975 |
| 976 int relocation_writer_size() { |
| 977 return (buffer_ + buffer_size_) - reloc_info_writer.pos(); |
| 978 } |
| 979 |
976 // Avoid overflows for displacements etc. | 980 // Avoid overflows for displacements etc. |
977 static const int kMaximalBufferSize = 512*MB; | 981 static const int kMaximalBufferSize = 512*MB; |
978 static const int kMinimalBufferSize = 4*KB; | 982 static const int kMinimalBufferSize = 4*KB; |
979 | 983 |
980 protected: | 984 protected: |
981 void movsd(XMMRegister dst, const Operand& src); | 985 void movsd(XMMRegister dst, const Operand& src); |
982 void movsd(const Operand& dst, XMMRegister src); | 986 void movsd(const Operand& dst, XMMRegister src); |
983 | 987 |
984 void emit_sse_operand(XMMRegister reg, const Operand& adr); | 988 void emit_sse_operand(XMMRegister reg, const Operand& adr); |
985 void emit_sse_operand(XMMRegister dst, XMMRegister src); | 989 void emit_sse_operand(XMMRegister dst, XMMRegister src); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 private: | 1084 private: |
1081 Assembler* assembler_; | 1085 Assembler* assembler_; |
1082 #ifdef DEBUG | 1086 #ifdef DEBUG |
1083 int space_before_; | 1087 int space_before_; |
1084 #endif | 1088 #endif |
1085 }; | 1089 }; |
1086 | 1090 |
1087 } } // namespace v8::internal | 1091 } } // namespace v8::internal |
1088 | 1092 |
1089 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1093 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |