PPC: Fix 'PPC: Serializer: serialize internal references via object visitor.'
authormichael_dawson <michael_dawson@ca.ibm.com>
Wed, 25 Mar 2015 06:40:02 +0000 (23:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 25 Mar 2015 06:40:09 +0000 (06:40 +0000)
Port 56d2ee0310972119ec47810ee03a4f7077f7117e

Original commit message:

R=mbrandy@us.ibm.com

BUG=

Review URL: https://codereview.chromium.org/1036453002

Cr-Commit-Position: refs/heads/master@{#27428}

src/ppc/assembler-ppc-inl.h
src/ppc/assembler-ppc.h

index 6877c985f06c82f8caf0345a77c57c2861df1b09..d95c7ec5968a5e8fec471bdabed8f6dcf84d01d4 100644 (file)
@@ -486,8 +486,8 @@ void Assembler::deserialization_set_special_target_at(
 
 
 void Assembler::deserialization_set_target_internal_reference_at(
-    Address pc, Address target) {
-  if (IsLis(instr_at(pc)) && IsOri(instr_at(pc + kInstrSize))) {
+    Address pc, Address target, RelocInfo::Mode mode) {
+  if (RelocInfo::IsInternalReferenceEncoded(mode)) {
     Code* code = NULL;
     set_target_address_at(pc, code, target, SKIP_ICACHE_FLUSH);
   } else {
index 72349976b6bb7b2912c58d7166e42cb701c17330..e13dff094f0731ce361c7485c2731dd4ca3d452f 100644 (file)
@@ -631,7 +631,8 @@ class Assembler : public AssemblerBase {
 
   // This sets the internal reference at the pc.
   inline static void deserialization_set_target_internal_reference_at(
-      Address pc, Address target);
+      Address pc, Address target,
+      RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE);
 
   // Size of an instruction.
   static const int kInstrSize = sizeof(Instr);