3081 |
3081 |
3082 __ cmp(lir_cond(x->cond()), left.result(), right.result()); |
3082 __ cmp(lir_cond(x->cond()), left.result(), right.result()); |
3083 __ cmove(lir_cond(x->cond()), t_val.result(), f_val.result(), reg, as_BasicType(x->x()->type())); |
3083 __ cmove(lir_cond(x->cond()), t_val.result(), f_val.result(), reg, as_BasicType(x->x()->type())); |
3084 } |
3084 } |
3085 |
3085 |
|
3086 #ifdef TRACE_HAVE_INTRINSICS |
|
3087 void LIRGenerator::do_ClassIDIntrinsic(Intrinsic* x) { |
|
3088 CodeEmitInfo* info = state_for(x); |
|
3089 CodeEmitInfo* info2 = new CodeEmitInfo(info); // Clone for the second null check |
|
3090 |
|
3091 assert(info != NULL, "must have info"); |
|
3092 LIRItem arg(x->argument_at(0), this); |
|
3093 |
|
3094 arg.load_item(); |
|
3095 LIR_Opr klass = new_register(T_METADATA); |
|
3096 __ move(new LIR_Address(arg.result(), java_lang_Class::klass_offset_in_bytes(), T_ADDRESS), klass, info); |
|
3097 LIR_Opr id = new_register(T_LONG); |
|
3098 ByteSize offset = TRACE_KLASS_TRACE_ID_OFFSET; |
|
3099 LIR_Address* trace_id_addr = new LIR_Address(klass, in_bytes(offset), T_LONG); |
|
3100 |
|
3101 __ move(trace_id_addr, id); |
|
3102 __ logical_or(id, LIR_OprFact::longConst(0x01l), id); |
|
3103 __ store(id, trace_id_addr); |
|
3104 |
|
3105 #ifdef TRACE_ID_META_BITS |
|
3106 __ logical_and(id, LIR_OprFact::longConst(~TRACE_ID_META_BITS), id); |
|
3107 #endif |
|
3108 #ifdef TRACE_ID_CLASS_SHIFT |
|
3109 __ unsigned_shift_right(id, TRACE_ID_CLASS_SHIFT, id); |
|
3110 #endif |
|
3111 |
|
3112 __ move(id, rlock_result(x)); |
|
3113 } |
|
3114 #endif |
|
3115 |
|
3116 |
3086 void LIRGenerator::do_RuntimeCall(address routine, Intrinsic* x) { |
3117 void LIRGenerator::do_RuntimeCall(address routine, Intrinsic* x) { |
3087 assert(x->number_of_arguments() == 0, "wrong type"); |
3118 assert(x->number_of_arguments() == 0, "wrong type"); |
3088 // Enforce computation of _reserved_argument_area_size which is required on some platforms. |
3119 // Enforce computation of _reserved_argument_area_size which is required on some platforms. |
3089 BasicTypeList signature; |
3120 BasicTypeList signature; |
3090 CallingConvention* cc = frame_map()->c_calling_convention(&signature); |
3121 CallingConvention* cc = frame_map()->c_calling_convention(&signature); |