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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 Operand(Register base, | 293 Operand(Register base, |
294 Register index, | 294 Register index, |
295 ScaleFactor scale, | 295 ScaleFactor scale, |
296 int32_t disp); | 296 int32_t disp); |
297 | 297 |
298 // [index*scale + disp/r] | 298 // [index*scale + disp/r] |
299 Operand(Register index, | 299 Operand(Register index, |
300 ScaleFactor scale, | 300 ScaleFactor scale, |
301 int32_t disp); | 301 int32_t disp); |
302 | 302 |
303 // Offset from existing memory operand. | |
304 // Offset is added to existing displacement as 32-bit signed values - so | |
305 // don't overflow. | |
William Hesse
2010/05/26 08:13:24
Add assert for no overflow in .cc file - see comme
Lasse Reichstein
2010/05/26 08:34:11
Done.
| |
306 Operand(const Operand& base, int32_t offset); | |
307 | |
303 private: | 308 private: |
304 byte rex_; | 309 byte rex_; |
305 byte buf_[10]; | 310 byte buf_[10]; |
306 // The number of bytes in buf_. | 311 // The number of bytes in buf_. |
307 unsigned int len_; | 312 unsigned int len_; |
308 RelocInfo::Mode rmode_; | |
309 | 313 |
310 // Set the ModR/M byte without an encoded 'reg' register. The | 314 // Set the ModR/M byte without an encoded 'reg' register. The |
311 // register is encoded later as part of the emit_operand operation. | 315 // register is encoded later as part of the emit_operand operation. |
312 // set_modrm can be called before or after set_sib and set_disp*. | 316 // set_modrm can be called before or after set_sib and set_disp*. |
313 inline void set_modrm(int mod, Register rm); | 317 inline void set_modrm(int mod, Register rm); |
314 | 318 |
315 // Set the SIB byte if one is needed. Sets the length to 2 rather than 1. | 319 // Set the SIB byte if one is needed. Sets the length to 2 rather than 1. |
316 inline void set_sib(ScaleFactor scale, Register index, Register base); | 320 inline void set_sib(ScaleFactor scale, Register index, Register base); |
317 | 321 |
318 // Adds operand displacement fields (offsets added to the memory address). | 322 // Adds operand displacement fields (offsets added to the memory address). |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1394 private: | 1398 private: |
1395 Assembler* assembler_; | 1399 Assembler* assembler_; |
1396 #ifdef DEBUG | 1400 #ifdef DEBUG |
1397 int space_before_; | 1401 int space_before_; |
1398 #endif | 1402 #endif |
1399 }; | 1403 }; |
1400 | 1404 |
1401 } } // namespace v8::internal | 1405 } } // namespace v8::internal |
1402 | 1406 |
1403 #endif // V8_X64_ASSEMBLER_X64_H_ | 1407 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |