1239 result /* pre_val */,
1240 false /* do_load */,
1241 false /* patch */,
1242 NULL /* info */);
1243 }
1244
1245 // Example: object.getClass ()
1246 void LIRGenerator::do_getClass(Intrinsic* x) {
1247 assert(x->number_of_arguments() == 1, "wrong type");
1248
1249 LIRItem rcvr(x->argument_at(0), this);
1250 rcvr.load_item();
1251 LIR_Opr result = rlock_result(x);
1252
1253 // need to perform the null check on the rcvr
1254 CodeEmitInfo* info = NULL;
1255 if (x->needs_null_check()) {
1256 info = state_for(x);
1257 }
1258 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_OBJECT), result, info);
1259 __ move_wide(new LIR_Address(result, Klass::java_mirror_offset_in_bytes() +
1260 klassOopDesc::klass_part_offset_in_bytes(), T_OBJECT), result);
1261 }
1262
1263
1264 // Example: Thread.currentThread()
1265 void LIRGenerator::do_currentThread(Intrinsic* x) {
1266 assert(x->number_of_arguments() == 0, "wrong type");
1267 LIR_Opr reg = rlock_result(x);
1268 __ move_wide(new LIR_Address(getThreadPointer(), in_bytes(JavaThread::threadObj_offset()), T_OBJECT), reg);
1269 }
1270
1271
1272 void LIRGenerator::do_RegisterFinalizer(Intrinsic* x) {
1273 assert(x->number_of_arguments() == 1, "wrong type");
1274 LIRItem receiver(x->argument_at(0), this);
1275
1276 receiver.load_item();
1277 BasicTypeList signature;
1278 signature.append(T_OBJECT); // receiver
1279 LIR_OprList* args = new LIR_OprList();
1280 args->append(receiver.result());
|
1239 result /* pre_val */,
1240 false /* do_load */,
1241 false /* patch */,
1242 NULL /* info */);
1243 }
1244
1245 // Example: object.getClass ()
1246 void LIRGenerator::do_getClass(Intrinsic* x) {
1247 assert(x->number_of_arguments() == 1, "wrong type");
1248
1249 LIRItem rcvr(x->argument_at(0), this);
1250 rcvr.load_item();
1251 LIR_Opr result = rlock_result(x);
1252
1253 // need to perform the null check on the rcvr
1254 CodeEmitInfo* info = NULL;
1255 if (x->needs_null_check()) {
1256 info = state_for(x);
1257 }
1258 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_OBJECT), result, info);
1259 __ move_wide(new LIR_Address(result, Klass::java_mirror_offset_in_bytes(), T_OBJECT), result);
1260 }
1261
1262
1263 // Example: Thread.currentThread()
1264 void LIRGenerator::do_currentThread(Intrinsic* x) {
1265 assert(x->number_of_arguments() == 0, "wrong type");
1266 LIR_Opr reg = rlock_result(x);
1267 __ move_wide(new LIR_Address(getThreadPointer(), in_bytes(JavaThread::threadObj_offset()), T_OBJECT), reg);
1268 }
1269
1270
1271 void LIRGenerator::do_RegisterFinalizer(Intrinsic* x) {
1272 assert(x->number_of_arguments() == 1, "wrong type");
1273 LIRItem receiver(x->argument_at(0), this);
1274
1275 receiver.load_item();
1276 BasicTypeList signature;
1277 signature.append(T_OBJECT); // receiver
1278 LIR_OprList* args = new LIR_OprList();
1279 args->append(receiver.result());
|