1269 LIR_Opr call_result = call_runtime(clazz.value(), object.value(),
1270 CAST_FROM_FN_PTR(address, Runtime1::is_instance_of),
1271 x->type(),
1272 NULL); // NULL CodeEmitInfo results in a leaf call
1273 __ move(call_result, result);
1274 }
1275
1276 // Example: object.getClass ()
1277 void LIRGenerator::do_getClass(Intrinsic* x) {
1278 assert(x->number_of_arguments() == 1, "wrong type");
1279
1280 LIRItem rcvr(x->argument_at(0), this);
1281 rcvr.load_item();
1282 LIR_Opr result = rlock_result(x);
1283
1284 // need to perform the null check on the rcvr
1285 CodeEmitInfo* info = NULL;
1286 if (x->needs_null_check()) {
1287 info = state_for(x);
1288 }
1289 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), UseCompressedKlassPointers ? T_OBJECT : T_ADDRESS), result, info);
1290 __ move_wide(new LIR_Address(result, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result);
1291 }
1292
1293
1294 // Example: Thread.currentThread()
1295 void LIRGenerator::do_currentThread(Intrinsic* x) {
1296 assert(x->number_of_arguments() == 0, "wrong type");
1297 LIR_Opr reg = rlock_result(x);
1298 __ move_wide(new LIR_Address(getThreadPointer(), in_bytes(JavaThread::threadObj_offset()), T_OBJECT), reg);
1299 }
1300
1301
1302 void LIRGenerator::do_RegisterFinalizer(Intrinsic* x) {
1303 assert(x->number_of_arguments() == 1, "wrong type");
1304 LIRItem receiver(x->argument_at(0), this);
1305
1306 receiver.load_item();
1307 BasicTypeList signature;
1308 signature.append(T_OBJECT); // receiver
1309 LIR_OprList* args = new LIR_OprList();
|
1269 LIR_Opr call_result = call_runtime(clazz.value(), object.value(),
1270 CAST_FROM_FN_PTR(address, Runtime1::is_instance_of),
1271 x->type(),
1272 NULL); // NULL CodeEmitInfo results in a leaf call
1273 __ move(call_result, result);
1274 }
1275
1276 // Example: object.getClass ()
1277 void LIRGenerator::do_getClass(Intrinsic* x) {
1278 assert(x->number_of_arguments() == 1, "wrong type");
1279
1280 LIRItem rcvr(x->argument_at(0), this);
1281 rcvr.load_item();
1282 LIR_Opr result = rlock_result(x);
1283
1284 // need to perform the null check on the rcvr
1285 CodeEmitInfo* info = NULL;
1286 if (x->needs_null_check()) {
1287 info = state_for(x);
1288 }
1289 __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), result, info);
1290 __ move_wide(new LIR_Address(result, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result);
1291 }
1292
1293
1294 // Example: Thread.currentThread()
1295 void LIRGenerator::do_currentThread(Intrinsic* x) {
1296 assert(x->number_of_arguments() == 0, "wrong type");
1297 LIR_Opr reg = rlock_result(x);
1298 __ move_wide(new LIR_Address(getThreadPointer(), in_bytes(JavaThread::threadObj_offset()), T_OBJECT), reg);
1299 }
1300
1301
1302 void LIRGenerator::do_RegisterFinalizer(Intrinsic* x) {
1303 assert(x->number_of_arguments() == 1, "wrong type");
1304 LIRItem receiver(x->argument_at(0), this);
1305
1306 receiver.load_item();
1307 BasicTypeList signature;
1308 signature.append(T_OBJECT); // receiver
1309 LIR_OprList* args = new LIR_OprList();
|