85 } 86 #ifdef _LP64 87 case Location::dbl: 88 // Double value in an aligned adjacent pair 89 return new StackValue(*(intptr_t*)value_addr); 90 case Location::lng: 91 // Long value in an aligned adjacent pair 92 return new StackValue(*(intptr_t*)value_addr); 93 case Location::narrowoop: { 94 union { intptr_t p; narrowOop noop;} value; 95 value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); 96 if (loc.is_register()) { 97 // The callee has no clue whether the register holds an int, 98 // long or is unused. He always saves a long. Here we know 99 // a long was saved, but we only want an int back. Narrow the 100 // saved long to the int that the JVM wants. 101 value.noop = (narrowOop) *(julong*) value_addr; 102 } else { 103 value.noop = *(narrowOop*) value_addr; 104 } 105 // Decode narrowoop and wrap a handle around the oop 106 Handle h(oopDesc::decode_heap_oop(value.noop)); 107 return new StackValue(h); 108 } 109 #endif 110 case Location::oop: { 111 oop val = *(oop *)value_addr; 112 #ifdef _LP64 113 if (Universe::is_narrow_oop_base(val)) { 114 // Compiled code may produce decoded oop = narrow_oop_base 115 // when a narrow oop implicit null check is used. 116 // The narrow_oop_base could be NULL or be the address 117 // of the page below heap. Use NULL value for both cases. 118 val = (oop)NULL; 119 } 120 #endif 121 Handle h(val); // Wrap a handle around the oop 122 return new StackValue(h); 123 } 124 case Location::addr: { 125 ShouldNotReachHere(); // both C1 and C2 now inline jsrs 126 } 127 case Location::normal: { 128 // Just copy all other bits straight through 129 union { intptr_t p; jint ji;} value; 130 value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); 131 value.ji = *(jint*)value_addr; 132 return new StackValue(value.p); 133 } 134 case Location::invalid: 135 return new StackValue(); 136 default: 137 ShouldNotReachHere(); 138 } | 85 } 86 #ifdef _LP64 87 case Location::dbl: 88 // Double value in an aligned adjacent pair 89 return new StackValue(*(intptr_t*)value_addr); 90 case Location::lng: 91 // Long value in an aligned adjacent pair 92 return new StackValue(*(intptr_t*)value_addr); 93 case Location::narrowoop: { 94 union { intptr_t p; narrowOop noop;} value; 95 value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); 96 if (loc.is_register()) { 97 // The callee has no clue whether the register holds an int, 98 // long or is unused. He always saves a long. Here we know 99 // a long was saved, but we only want an int back. Narrow the 100 // saved long to the int that the JVM wants. 101 value.noop = (narrowOop) *(julong*) value_addr; 102 } else { 103 value.noop = *(narrowOop*) value_addr; 104 } 105 // Decode narrowoop 106 oop val = oopDesc::decode_heap_oop(value.noop); 107 // Deoptimization must make sure all oops have passed load barriers 108 #if INCLUDE_ALL_GCS 109 if (UseShenandoahGC) { 110 val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val); 111 } 112 #endif 113 Handle h(val); // Wrap a handle around the oop 114 return new StackValue(h); 115 } 116 #endif 117 case Location::oop: { 118 oop val = *(oop *)value_addr; 119 #ifdef _LP64 120 if (Universe::is_narrow_oop_base(val)) { 121 // Compiled code may produce decoded oop = narrow_oop_base 122 // when a narrow oop implicit null check is used. 123 // The narrow_oop_base could be NULL or be the address 124 // of the page below heap. Use NULL value for both cases. 125 val = (oop)NULL; 126 } 127 #endif 128 // Deoptimization must make sure all oops have passed load barriers 129 #if INCLUDE_ALL_GCS 130 if (UseShenandoahGC) { 131 val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val); 132 } 133 #endif 134 Handle h(val); // Wrap a handle around the oop 135 return new StackValue(h); 136 } 137 case Location::addr: { 138 ShouldNotReachHere(); // both C1 and C2 now inline jsrs 139 } 140 case Location::normal: { 141 // Just copy all other bits straight through 142 union { intptr_t p; jint ji;} value; 143 value.p = (intptr_t) CONST64(0xDEADDEAFDEADDEAF); 144 value.ji = *(jint*)value_addr; 145 return new StackValue(value.p); 146 } 147 case Location::invalid: 148 return new StackValue(); 149 default: 150 ShouldNotReachHere(); 151 } |