< prev index next >

src/hotspot/cpu/arm/relocInfo_arm.cpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/assembler.inline.hpp"
  27 #include "assembler_arm.inline.hpp"
  28 #include "code/relocInfo.hpp"
  29 #include "nativeInst_arm.hpp"
  30 #include "oops/compressedOops.inline.hpp"
  31 #include "oops/oop.hpp"
  32 #include "runtime/orderAccess.inline.hpp"
  33 #include "runtime/safepoint.hpp"
  34 
  35 void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
  36 
  37   NativeMovConstReg* ni = nativeMovConstReg_at(addr());
  38 #if defined(AARCH64) && defined(COMPILER2)
  39   if (ni->is_movz()) {
  40     assert(type() == relocInfo::oop_type, "!");
  41     if (verify_only) {
  42       uintptr_t d = ni->data();
  43       guarantee((d >> 32) == 0, "not narrow oop");
  44       narrowOop no = d;
  45       oop o = CompressedOops::decode(no);
  46       guarantee(cast_from_oop<intptr_t>(o) == (intptr_t)x, "instructions must match");
  47     } else {
  48       ni->set_data((intptr_t)x);
  49     }
  50     return;
  51   }
  52 #endif




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/assembler.inline.hpp"
  27 #include "assembler_arm.inline.hpp"
  28 #include "code/relocInfo.hpp"
  29 #include "nativeInst_arm.hpp"
  30 #include "oops/compressedOops.inline.hpp"
  31 #include "oops/oop.hpp"
  32 #include "runtime/orderAccess.hpp"
  33 #include "runtime/safepoint.hpp"
  34 
  35 void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
  36 
  37   NativeMovConstReg* ni = nativeMovConstReg_at(addr());
  38 #if defined(AARCH64) && defined(COMPILER2)
  39   if (ni->is_movz()) {
  40     assert(type() == relocInfo::oop_type, "!");
  41     if (verify_only) {
  42       uintptr_t d = ni->data();
  43       guarantee((d >> 32) == 0, "not narrow oop");
  44       narrowOop no = d;
  45       oop o = CompressedOops::decode(no);
  46       guarantee(cast_from_oop<intptr_t>(o) == (intptr_t)x, "instructions must match");
  47     } else {
  48       ni->set_data((intptr_t)x);
  49     }
  50     return;
  51   }
  52 #endif


< prev index next >