Revision: 18802
Author:   [email protected]
Date:     Fri Jan 24 01:45:53 2014 UTC
Log:      Introduce Assembler::RelocInfoNone function for X64

[email protected]

Review URL: https://codereview.chromium.org/140553004
http://code.google.com/p/v8/source/detail?r=18802

Modified:
 /branches/bleeding_edge/src/x64/assembler-x64.cc
 /branches/bleeding_edge/src/x64/assembler-x64.h
 /branches/bleeding_edge/src/x64/code-stubs-x64.cc
 /branches/bleeding_edge/src/x64/deoptimizer-x64.cc
 /branches/bleeding_edge/src/x64/full-codegen-x64.cc
 /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
 /branches/bleeding_edge/src/x64/macro-assembler-x64.cc
 /branches/bleeding_edge/src/x64/macro-assembler-x64.h

=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.cc Thu Jan 16 11:35:30 2014 UTC +++ /branches/bleeding_edge/src/x64/assembler-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -110,7 +110,7 @@
 #endif

   // Patch the code.
-  patcher.masm()->movp(kScratchRegister, target, RelocInfo::NONE64);
+ patcher.masm()->movp(kScratchRegister, target, Assembler::RelocInfoNone());
   patcher.masm()->call(kScratchRegister);

   // Check that the size of the code generated is as expected.
=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.h Wed Jan 8 07:02:02 2014 UTC +++ /branches/bleeding_edge/src/x64/assembler-x64.h Fri Jan 24 01:45:53 2014 UTC
@@ -589,6 +589,15 @@
       Address instruction_payload, Address target) {
     set_target_address_at(instruction_payload, target);
   }
+
+  static inline RelocInfo::Mode RelocInfoNone() {
+    if (kPointerSize == kInt64Size) {
+      return RelocInfo::NONE64;
+    } else {
+      ASSERT(kPointerSize == kInt32Size);
+      return RelocInfo::NONE32;
+    }
+  }

   inline Handle<Object> code_target_object_handle_at(Address pc);
   inline Address runtime_entry_at(Address pc);
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Thu Jan 23 16:20:25 2014 UTC +++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -2719,7 +2719,7 @@

   // Do full GC and retry runtime call one final time.
   Failure* failure = Failure::InternalError();
-  __ Move(rax, failure, RelocInfo::NONE64);
+  __ Move(rax, failure, Assembler::RelocInfoNone());
   GenerateCore(masm,
                &throw_normal_exception,
                &throw_termination_exception,
@@ -2740,7 +2740,7 @@
                                       isolate);
   Label already_have_failure;
   JumpIfOOM(masm, rax, kScratchRegister, &already_have_failure);
-  __ Move(rax, Failure::OutOfMemoryException(0x1), RelocInfo::NONE64);
+ __ Move(rax, Failure::OutOfMemoryException(0x1), Assembler::RelocInfoNone());
   __ bind(&already_have_failure);
   __ Store(pending_exception, rax);
   // Fall through to the next label.
@@ -2770,7 +2770,7 @@
// Scratch register is neither callee-save, nor an argument register on any
     // platform. It's free to use at this point.
     // Cannot use smi-register for loading yet.
-    __ Move(kScratchRegister, Smi::FromInt(marker), RelocInfo::NONE64);
+ __ Move(kScratchRegister, Smi::FromInt(marker), Assembler::RelocInfoNone());
     __ push(kScratchRegister);  // context slot
     __ push(kScratchRegister);  // function slot
     // Save callee-saved registers (X64/Win64 calling conventions).
@@ -2838,7 +2838,7 @@
   ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
                                       isolate);
   __ Store(pending_exception, rax);
-  __ Move(rax, Failure::Exception(), RelocInfo::NONE64);
+  __ Move(rax, Failure::Exception(), Assembler::RelocInfoNone());
   __ jmp(&exit);

   // Invoke: Link this frame into the handler chain.  There's only one
@@ -4878,7 +4878,7 @@

   // Call the entry hook function.
   __ Move(rax, FUNCTION_ADDR(masm->isolate()->function_entry_hook()),
-          RelocInfo::NONE64);
+          Assembler::RelocInfoNone());

   AllowExternalCallThatCantCauseGC scope(masm);

=======================================
--- /branches/bleeding_edge/src/x64/deoptimizer-x64.cc Mon Jan 20 04:59:40 2014 UTC +++ /branches/bleeding_edge/src/x64/deoptimizer-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -71,7 +71,7 @@
     // LLazyBailout instructions with nops if necessary.
     CodePatcher patcher(call_address, Assembler::kCallSequenceLength);
     patcher.masm()->Call(GetDeoptimizationEntry(isolate, i, LAZY),
-                         RelocInfo::NONE64);
+                         Assembler::RelocInfoNone());
     ASSERT(prev_call_address == NULL ||
            call_address >= prev_call_address + patch_size());
     ASSERT(call_address + patch_size() <= code->instruction_end());
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Thu Jan 23 08:36:22 2014 UTC +++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -3364,7 +3364,7 @@
     __ bind(&runtime);
     __ PrepareCallCFunction(2);
     __ movp(arg_reg_1, object);
-    __ Move(arg_reg_2, index, RelocInfo::NONE64);
+    __ Move(arg_reg_2, index, Assembler::RelocInfoNone());
__ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
     __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
     __ jmp(&done);
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Thu Jan 23 08:36:22 2014 UTC +++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -1643,7 +1643,7 @@
     __ bind(&runtime);
     __ PrepareCallCFunction(2);
     __ movp(arg_reg_1, object);
-    __ Move(arg_reg_2, index, RelocInfo::NONE64);
+    __ Move(arg_reg_2, index, Assembler::RelocInfoNone());
__ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
     __ bind(&done);
   }
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Thu Jan 23 13:02:27 2014 UTC +++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Fri Jan 24 01:45:53 2014 UTC
@@ -163,7 +163,7 @@
   int64_t address = reinterpret_cast<int64_t>(source.address());
   if (is_int32(address) && !Serializer::enabled()) {
     if (emit_debug_code()) {
-      Move(kScratchRegister, kZapValue, RelocInfo::NONE64);
+      Move(kScratchRegister, kZapValue, Assembler::RelocInfoNone());
     }
     push(Immediate(static_cast<int32_t>(address)));
     return;
@@ -289,7 +289,7 @@
     intptr_t new_space_start =
         reinterpret_cast<intptr_t>(isolate()->heap()->NewSpaceStart());
     Move(kScratchRegister, reinterpret_cast<Address>(-new_space_start),
-         RelocInfo::NONE64);
+         Assembler::RelocInfoNone());
     if (scratch.is(object)) {
       addq(scratch, kScratchRegister);
     } else {
@@ -340,8 +340,8 @@
// Clobber clobbered input registers when running with the debug-code flag
   // turned on to provoke errors.
   if (emit_debug_code()) {
-    Move(value, kZapValue, RelocInfo::NONE64);
-    Move(dst, kZapValue, RelocInfo::NONE64);
+    Move(value, kZapValue, Assembler::RelocInfoNone());
+    Move(dst, kZapValue, Assembler::RelocInfoNone());
   }
 }

@@ -374,8 +374,8 @@
// Clobber clobbered input registers when running with the debug-code flag
   // turned on to provoke errors.
   if (emit_debug_code()) {
-    Move(value, kZapValue, RelocInfo::NONE64);
-    Move(index, kZapValue, RelocInfo::NONE64);
+    Move(value, kZapValue, Assembler::RelocInfoNone());
+    Move(index, kZapValue, Assembler::RelocInfoNone());
   }
 }

@@ -439,8 +439,8 @@
   // Clobber clobbered registers when running with the debug-code flag
   // turned on to provoke errors.
   if (emit_debug_code()) {
-    Move(address, kZapValue, RelocInfo::NONE64);
-    Move(value, kZapValue, RelocInfo::NONE64);
+    Move(address, kZapValue, Assembler::RelocInfoNone());
+    Move(value, kZapValue, Assembler::RelocInfoNone());
   }
 }

@@ -528,10 +528,11 @@
 #endif

   push(rax);
-  Move(kScratchRegister, reinterpret_cast<Smi*>(p0), RelocInfo::NONE64);
+  Move(kScratchRegister, reinterpret_cast<Smi*>(p0),
+       Assembler::RelocInfoNone());
   push(kScratchRegister);
   Move(kScratchRegister, Smi::FromInt(static_cast<int>(p1 - p0)),
-       RelocInfo::NONE64);
+       Assembler::RelocInfoNone());
   push(kScratchRegister);

   if (!has_frame_) {
@@ -1043,7 +1044,8 @@

 void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) {
   if (emit_debug_code()) {
-    Move(dst, Smi::FromInt(kSmiConstantRegisterValue), RelocInfo::NONE64);
+    Move(dst, Smi::FromInt(kSmiConstantRegisterValue),
+         Assembler::RelocInfoNone());
     cmpq(dst, kSmiConstantRegister);
     Assert(equal, kUninitializedKSmiConstantRegister);
   }
@@ -1083,7 +1085,7 @@
       UNREACHABLE();
       return;
     default:
-      Move(dst, source, RelocInfo::NONE64);
+      Move(dst, source, Assembler::RelocInfoNone());
       return;
   }
   if (negative) {
@@ -2623,7 +2625,7 @@

 void MacroAssembler::Call(Address destination, RelocInfo::Mode rmode) {
 #ifdef DEBUG
-  int end_position = pc_offset() + CallSize(destination, rmode);
+  int end_position = pc_offset() + CallSize(destination);
 #endif
   Move(kScratchRegister, destination, rmode);
   call(kScratchRegister);
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.h Mon Jan 20 04:59:40 2014 UTC +++ /branches/bleeding_edge/src/x64/macro-assembler-x64.h Fri Jan 24 01:45:53 2014 UTC
@@ -391,7 +391,7 @@

   void InitializeSmiConstantRegister() {
     Move(kSmiConstantRegister, Smi::FromInt(kSmiConstantRegisterValue),
-         RelocInfo::NONE64);
+         Assembler::RelocInfoNone());
   }

   // Conversions between tagged smi values and non-tagged integer values.
@@ -877,7 +877,7 @@
             TypeFeedbackId ast_id = TypeFeedbackId::None());

   // The size of the code generated for different call instructions.
-  int CallSize(Address destination, RelocInfo::Mode rmode) {
+  int CallSize(Address destination) {
     return kCallSequenceLength;
   }
   int CallSize(ExternalReference ext);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to