Revision: 13317
Author:   [email protected]
Date:     Mon Jan  7 01:15:25 2013
Log:      Use RelocInfo::IsNone in a few more places.

I had missed some earlier.

Followup to:
https://chromiumcodereview.appspot.com/11695006/

There are now NONE and NONE64 RelocInfo types, but only ARM uses them
both at the same time. They were added in:
https://chromiumcodereview.appspot.com/11191029/

R= [email protected]

Review URL: https://chromiumcodereview.appspot.com/11742045
Patch from JF Bastien <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13317

Modified:
 /branches/bleeding_edge/src/ia32/assembler-ia32-inl.h
 /branches/bleeding_edge/src/ia32/assembler-ia32.cc
 /branches/bleeding_edge/src/ia32/assembler-ia32.h

=======================================
--- /branches/bleeding_edge/src/ia32/assembler-ia32-inl.h Fri Jan 4 02:56:24 2013 +++ /branches/bleeding_edge/src/ia32/assembler-ia32-inl.h Mon Jan 7 01:15:25 2013
@@ -396,7 +396,7 @@


 void Assembler::emit_w(const Immediate& x) {
-  ASSERT(x.rmode_ == RelocInfo::NONE32);
+  ASSERT(RelocInfo::IsNone(x.rmode_));
   uint16_t value = static_cast<uint16_t>(x.x_);
   reinterpret_cast<uint16_t*>(pc_)[0] = value;
   pc_ += sizeof(uint16_t);
=======================================
--- /branches/bleeding_edge/src/ia32/assembler-ia32.cc Fri Jan 4 02:56:24 2013 +++ /branches/bleeding_edge/src/ia32/assembler-ia32.cc Mon Jan 7 01:15:25 2013
@@ -255,11 +255,11 @@

 Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) {
   // [base + disp/r]
-  if (disp == 0 && rmode == RelocInfo::NONE32 && !base.is(ebp)) {
+  if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) {
     // [base]
     set_modrm(0, base);
     if (base.is(esp)) set_sib(times_1, esp, base);
-  } else if (is_int8(disp) && rmode == RelocInfo::NONE32) {
+  } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) {
     // [base + disp8]
     set_modrm(1, base);
     if (base.is(esp)) set_sib(times_1, esp, base);
@@ -280,11 +280,11 @@
                  RelocInfo::Mode rmode) {
   ASSERT(!index.is(esp));  // illegal addressing mode
   // [base + index*scale + disp/r]
-  if (disp == 0 && rmode == RelocInfo::NONE32 && !base.is(ebp)) {
+  if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) {
     // [base + index*scale]
     set_modrm(0, esp);
     set_sib(scale, index, base);
-  } else if (is_int8(disp) && rmode == RelocInfo::NONE32) {
+  } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) {
     // [base + index*scale + disp8]
     set_modrm(1, esp);
     set_sib(scale, index, base);
@@ -1180,7 +1180,7 @@
   EnsureSpace ensure_space(this);
   // Only use test against byte for registers that have a byte
   // variant: eax, ebx, ecx, and edx.
-  if (imm.rmode_ == RelocInfo::NONE32 &&
+  if (RelocInfo::IsNone(imm.rmode_) &&
       is_uint8(imm.x_) &&
       reg.is_byte_register()) {
     uint8_t imm8 = imm.x_;
@@ -2614,7 +2614,7 @@
   pc_ += length;

   // Emit relocation information if necessary.
-  if (length >= sizeof(int32_t) && adr.rmode_ != RelocInfo::NONE32) {
+  if (length >= sizeof(int32_t) && !RelocInfo::IsNone(adr.rmode_)) {
     pc_ -= sizeof(int32_t);  // pc_ must be *at* disp32
     RecordRelocInfo(adr.rmode_);
     pc_ += sizeof(int32_t);
=======================================
--- /branches/bleeding_edge/src/ia32/assembler-ia32.h Fri Jan 4 02:56:24 2013 +++ /branches/bleeding_edge/src/ia32/assembler-ia32.h Mon Jan 7 01:15:25 2013
@@ -337,12 +337,12 @@
     return Immediate(label);
   }

-  bool is_zero() const { return x_ == 0 && rmode_ == RelocInfo::NONE32; }
+  bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); }
   bool is_int8() const {
-    return -128 <= x_ && x_ < 128 && rmode_ == RelocInfo::NONE32;
+    return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_);
   }
   bool is_int16() const {
-    return -32768 <= x_ && x_ < 32768 && rmode_ == RelocInfo::NONE32;
+    return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_);
   }

  private:

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to