< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page
rev 56016 : 8229422: Taskqueue: Outdated selection of weak memory model platforms
Reviewed-by:


1453   if (needs_check) {
1454     // Perform the registration of finalizable objects.
1455     ValueStack* state_before = copy_state_for_exception();
1456     load_local(objectType, 0);
1457     append_split(new Intrinsic(voidType, vmIntrinsics::_Object_init,
1458                                state()->pop_arguments(1),
1459                                true, state_before, true));
1460   }
1461 }
1462 
1463 
1464 void GraphBuilder::method_return(Value x, bool ignore_return) {
1465   if (RegisterFinalizersAtInit &&
1466       method()->intrinsic_id() == vmIntrinsics::_Object_init) {
1467     call_register_finalizer();
1468   }
1469 
1470   bool need_mem_bar = false;
1471   if (method()->name() == ciSymbol::object_initializer_name() &&
1472       (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields())
1473                               || (support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile())


1474      )){
1475     need_mem_bar = true;
1476   }
1477 
1478   BasicType bt = method()->return_type()->basic_type();
1479   switch (bt) {
1480     case T_BYTE:
1481     {
1482       Value shift = append(new Constant(new IntConstant(24)));
1483       x = append(new ShiftOp(Bytecodes::_ishl, x, shift));
1484       x = append(new ShiftOp(Bytecodes::_ishr, x, shift));
1485       break;
1486     }
1487     case T_SHORT:
1488     {
1489       Value shift = append(new Constant(new IntConstant(16)));
1490       x = append(new ShiftOp(Bytecodes::_ishl, x, shift));
1491       x = append(new ShiftOp(Bytecodes::_ishr, x, shift));
1492       break;
1493     }




1453   if (needs_check) {
1454     // Perform the registration of finalizable objects.
1455     ValueStack* state_before = copy_state_for_exception();
1456     load_local(objectType, 0);
1457     append_split(new Intrinsic(voidType, vmIntrinsics::_Object_init,
1458                                state()->pop_arguments(1),
1459                                true, state_before, true));
1460   }
1461 }
1462 
1463 
1464 void GraphBuilder::method_return(Value x, bool ignore_return) {
1465   if (RegisterFinalizersAtInit &&
1466       method()->intrinsic_id() == vmIntrinsics::_Object_init) {
1467     call_register_finalizer();
1468   }
1469 
1470   bool need_mem_bar = false;
1471   if (method()->name() == ciSymbol::object_initializer_name() &&
1472       (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields())
1473                               || (SUPPORT_IRIW_FOR_NOT_MULTI_COPY_ATOMIC_CPU &&
1474                                   IRIW_WITH_RELEASE_VOLATILE_IN_CONSTRUCTOR &&
1475                                   scope()->wrote_volatile())
1476      )){
1477     need_mem_bar = true;
1478   }
1479 
1480   BasicType bt = method()->return_type()->basic_type();
1481   switch (bt) {
1482     case T_BYTE:
1483     {
1484       Value shift = append(new Constant(new IntConstant(24)));
1485       x = append(new ShiftOp(Bytecodes::_ishl, x, shift));
1486       x = append(new ShiftOp(Bytecodes::_ishr, x, shift));
1487       break;
1488     }
1489     case T_SHORT:
1490     {
1491       Value shift = append(new Constant(new IntConstant(16)));
1492       x = append(new ShiftOp(Bytecodes::_ishl, x, shift));
1493       x = append(new ShiftOp(Bytecodes::_ishr, x, shift));
1494       break;
1495     }


< prev index next >