| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 inline explicit Immediate(int x); | 330 inline explicit Immediate(int x); |
| 331 inline explicit Immediate(const ExternalReference& ext); | 331 inline explicit Immediate(const ExternalReference& ext); |
| 332 inline explicit Immediate(Handle<Object> handle); | 332 inline explicit Immediate(Handle<Object> handle); |
| 333 inline explicit Immediate(Smi* value); | 333 inline explicit Immediate(Smi* value); |
| 334 inline explicit Immediate(Address addr); | 334 inline explicit Immediate(Address addr); |
| 335 | 335 |
| 336 static Immediate CodeRelativeOffset(Label* label) { | 336 static Immediate CodeRelativeOffset(Label* label) { |
| 337 return Immediate(label); | 337 return Immediate(label); |
| 338 } | 338 } |
| 339 | 339 |
| 340 bool is_zero() const { return x_ == 0 && rmode_ == RelocInfo::NONE; } | 340 bool is_zero() const { return x_ == 0 && rmode_ == RelocInfo::NONE32; } |
| 341 bool is_int8() const { | 341 bool is_int8() const { |
| 342 return -128 <= x_ && x_ < 128 && rmode_ == RelocInfo::NONE; | 342 return -128 <= x_ && x_ < 128 && rmode_ == RelocInfo::NONE32; |
| 343 } | 343 } |
| 344 bool is_int16() const { | 344 bool is_int16() const { |
| 345 return -32768 <= x_ && x_ < 32768 && rmode_ == RelocInfo::NONE; | 345 return -32768 <= x_ && x_ < 32768 && rmode_ == RelocInfo::NONE32; |
| 346 } | 346 } |
| 347 | 347 |
| 348 private: | 348 private: |
| 349 inline explicit Immediate(Label* value); | 349 inline explicit Immediate(Label* value); |
| 350 | 350 |
| 351 int x_; | 351 int x_; |
| 352 RelocInfo::Mode rmode_; | 352 RelocInfo::Mode rmode_; |
| 353 | 353 |
| 354 friend class Assembler; | 354 friend class Assembler; |
| 355 friend class MacroAssembler; | 355 friend class MacroAssembler; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 375 public: | 375 public: |
| 376 // XMM reg | 376 // XMM reg |
| 377 INLINE(explicit Operand(XMMRegister xmm_reg)); | 377 INLINE(explicit Operand(XMMRegister xmm_reg)); |
| 378 | 378 |
| 379 // [disp/r] | 379 // [disp/r] |
| 380 INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); | 380 INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); |
| 381 // disp only must always be relocated | 381 // disp only must always be relocated |
| 382 | 382 |
| 383 // [base + disp/r] | 383 // [base + disp/r] |
| 384 explicit Operand(Register base, int32_t disp, | 384 explicit Operand(Register base, int32_t disp, |
| 385 RelocInfo::Mode rmode = RelocInfo::NONE); | 385 RelocInfo::Mode rmode = RelocInfo::NONE32); |
| 386 | 386 |
| 387 // [base + index*scale + disp/r] | 387 // [base + index*scale + disp/r] |
| 388 explicit Operand(Register base, | 388 explicit Operand(Register base, |
| 389 Register index, | 389 Register index, |
| 390 ScaleFactor scale, | 390 ScaleFactor scale, |
| 391 int32_t disp, | 391 int32_t disp, |
| 392 RelocInfo::Mode rmode = RelocInfo::NONE); | 392 RelocInfo::Mode rmode = RelocInfo::NONE32); |
| 393 | 393 |
| 394 // [index*scale + disp/r] | 394 // [index*scale + disp/r] |
| 395 explicit Operand(Register index, | 395 explicit Operand(Register index, |
| 396 ScaleFactor scale, | 396 ScaleFactor scale, |
| 397 int32_t disp, | 397 int32_t disp, |
| 398 RelocInfo::Mode rmode = RelocInfo::NONE); | 398 RelocInfo::Mode rmode = RelocInfo::NONE32); |
| 399 | 399 |
| 400 static Operand StaticVariable(const ExternalReference& ext) { | 400 static Operand StaticVariable(const ExternalReference& ext) { |
| 401 return Operand(reinterpret_cast<int32_t>(ext.address()), | 401 return Operand(reinterpret_cast<int32_t>(ext.address()), |
| 402 RelocInfo::EXTERNAL_REFERENCE); | 402 RelocInfo::EXTERNAL_REFERENCE); |
| 403 } | 403 } |
| 404 | 404 |
| 405 static Operand StaticArray(Register index, | 405 static Operand StaticArray(Register index, |
| 406 ScaleFactor scale, | 406 ScaleFactor scale, |
| 407 const ExternalReference& arr) { | 407 const ExternalReference& arr) { |
| 408 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()), | 408 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()), |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 private: | 1270 private: |
| 1271 Assembler* assembler_; | 1271 Assembler* assembler_; |
| 1272 #ifdef DEBUG | 1272 #ifdef DEBUG |
| 1273 int space_before_; | 1273 int space_before_; |
| 1274 #endif | 1274 #endif |
| 1275 }; | 1275 }; |
| 1276 | 1276 |
| 1277 } } // namespace v8::internal | 1277 } } // namespace v8::internal |
| 1278 | 1278 |
| 1279 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1279 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |