< prev index next >

src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp

Print this page

  25 
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "asm/assembler.hpp"
  28 #include "c1/c1_CodeStubs.hpp"
  29 #include "c1/c1_Compilation.hpp"
  30 #include "c1/c1_LIRAssembler.hpp"
  31 #include "c1/c1_MacroAssembler.hpp"
  32 #include "c1/c1_Runtime1.hpp"
  33 #include "c1/c1_ValueStack.hpp"
  34 #include "ci/ciArrayKlass.hpp"
  35 #include "ci/ciInstance.hpp"
  36 #include "code/aotCodeCache.hpp"
  37 #include "code/compiledIC.hpp"
  38 #include "gc/shared/collectedHeap.hpp"
  39 #include "gc/shared/gc_globals.hpp"
  40 #include "nativeInst_aarch64.hpp"
  41 #include "oops/objArrayKlass.hpp"
  42 #include "runtime/frame.inline.hpp"
  43 #include "runtime/sharedRuntime.hpp"
  44 #include "runtime/stubRoutines.hpp"

  45 #include "utilities/powerOfTwo.hpp"
  46 #include "vmreg_aarch64.inline.hpp"
  47 
  48 
  49 #ifndef PRODUCT
  50 #define COMMENT(x)   do { __ block_comment(x); } while (0)
  51 #else
  52 #define COMMENT(x)
  53 #endif
  54 
  55 NEEDS_CLEANUP // remove this definitions ?
  56 const Register SYNC_header = r0;   // synchronization header
  57 const Register SHIFT_count = r0;   // where count for shift operations must be
  58 
  59 #define __ _masm->
  60 
  61 
  62 static void select_different_registers(Register preserve,
  63                                        Register extra,
  64                                        Register &tmp1,

 519   LIR_Const* c = src->as_constant_ptr();
 520 
 521   switch (c->type()) {
 522     case T_INT: {
 523       assert(patch_code == lir_patch_none, "no patching handled here");
 524       __ movw(dest->as_register(), c->as_jint());
 525       break;
 526     }
 527 
 528     case T_ADDRESS: {
 529       assert(patch_code == lir_patch_none, "no patching handled here");
 530       __ mov(dest->as_register(), c->as_jint());
 531       break;
 532     }
 533 
 534     case T_LONG: {
 535       assert(patch_code == lir_patch_none, "no patching handled here");
 536 #if INCLUDE_CDS
 537       if (AOTCodeCache::is_on_for_dump()) {
 538         address b = c->as_pointer();




 539         if (AOTRuntimeConstants::contains(b)) {
 540           __ load_aotrc_address(dest->as_register_lo(), b);
 541           break;
 542         }
 543       }
 544 #endif
 545       __ mov(dest->as_register_lo(), (intptr_t)c->as_jlong());
 546       break;
 547     }
 548 
 549     case T_OBJECT: {
 550         if (patch_code == lir_patch_none) {
 551           jobject2reg(c->as_jobject(), dest->as_register());
 552         } else {
 553           jobject2reg_with_patching(dest->as_register(), info);
 554         }
 555       break;
 556     }
 557 
 558     case T_METADATA: {

  25 
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "asm/assembler.hpp"
  28 #include "c1/c1_CodeStubs.hpp"
  29 #include "c1/c1_Compilation.hpp"
  30 #include "c1/c1_LIRAssembler.hpp"
  31 #include "c1/c1_MacroAssembler.hpp"
  32 #include "c1/c1_Runtime1.hpp"
  33 #include "c1/c1_ValueStack.hpp"
  34 #include "ci/ciArrayKlass.hpp"
  35 #include "ci/ciInstance.hpp"
  36 #include "code/aotCodeCache.hpp"
  37 #include "code/compiledIC.hpp"
  38 #include "gc/shared/collectedHeap.hpp"
  39 #include "gc/shared/gc_globals.hpp"
  40 #include "nativeInst_aarch64.hpp"
  41 #include "oops/objArrayKlass.hpp"
  42 #include "runtime/frame.inline.hpp"
  43 #include "runtime/sharedRuntime.hpp"
  44 #include "runtime/stubRoutines.hpp"
  45 #include "runtime/threadIdentifier.hpp"
  46 #include "utilities/powerOfTwo.hpp"
  47 #include "vmreg_aarch64.inline.hpp"
  48 
  49 
  50 #ifndef PRODUCT
  51 #define COMMENT(x)   do { __ block_comment(x); } while (0)
  52 #else
  53 #define COMMENT(x)
  54 #endif
  55 
  56 NEEDS_CLEANUP // remove this definitions ?
  57 const Register SYNC_header = r0;   // synchronization header
  58 const Register SHIFT_count = r0;   // where count for shift operations must be
  59 
  60 #define __ _masm->
  61 
  62 
  63 static void select_different_registers(Register preserve,
  64                                        Register extra,
  65                                        Register &tmp1,

 520   LIR_Const* c = src->as_constant_ptr();
 521 
 522   switch (c->type()) {
 523     case T_INT: {
 524       assert(patch_code == lir_patch_none, "no patching handled here");
 525       __ movw(dest->as_register(), c->as_jint());
 526       break;
 527     }
 528 
 529     case T_ADDRESS: {
 530       assert(patch_code == lir_patch_none, "no patching handled here");
 531       __ mov(dest->as_register(), c->as_jint());
 532       break;
 533     }
 534 
 535     case T_LONG: {
 536       assert(patch_code == lir_patch_none, "no patching handled here");
 537 #if INCLUDE_CDS
 538       if (AOTCodeCache::is_on_for_dump()) {
 539         address b = c->as_pointer();
 540         if (b == (address)ThreadIdentifier::unsafe_offset()) {
 541           __ lea(dest->as_register_lo(), ExternalAddress(b));
 542           break;
 543         }
 544         if (AOTRuntimeConstants::contains(b)) {
 545           __ load_aotrc_address(dest->as_register_lo(), b);
 546           break;
 547         }
 548       }
 549 #endif
 550       __ mov(dest->as_register_lo(), (intptr_t)c->as_jlong());
 551       break;
 552     }
 553 
 554     case T_OBJECT: {
 555         if (patch_code == lir_patch_none) {
 556           jobject2reg(c->as_jobject(), dest->as_register());
 557         } else {
 558           jobject2reg_with_patching(dest->as_register(), info);
 559         }
 560       break;
 561     }
 562 
 563     case T_METADATA: {
< prev index next >