src/share/vm/opto/library_call.cpp

Print this page




2583     Node* p = make_load(control(), adr, value_type, type, adr_type, MemNode::unordered, is_volatile);
2584     // load value
2585     switch (type) {
2586     case T_BOOLEAN:
2587     case T_CHAR:
2588     case T_BYTE:
2589     case T_SHORT:
2590     case T_INT:
2591     case T_LONG:
2592     case T_FLOAT:
2593     case T_DOUBLE:
2594       break;
2595     case T_OBJECT:
2596       if (need_read_barrier) {
2597         insert_pre_barrier(heap_base_oop, offset, p, !(is_volatile || need_mem_bar));
2598       }
2599       break;
2600     case T_ADDRESS:
2601       // Cast to an int type.
2602       p = _gvn.transform(new (C) CastP2XNode(NULL, p));
2603       p = ConvX2L(p);
2604       break;
2605     default:
2606       fatal(err_msg_res("unexpected type %d: %s", type, type2name(type)));
2607       break;
2608     }
2609     // The load node has the control of the preceding MemBarCPUOrder.  All
2610     // following nodes will have the control of the MemBarCPUOrder inserted at
2611     // the end of this method.  So, pushing the load onto the stack at a later
2612     // point is fine.
2613     set_result(p);
2614   } else {
2615     // place effect of store into memory
2616     switch (type) {
2617     case T_DOUBLE:
2618       val = dstore_rounding(val);
2619       break;
2620     case T_ADDRESS:
2621       // Repackage the long as a pointer.
2622       val = ConvL2X(val);
2623       val = _gvn.transform(new (C) CastX2PNode(val));




2583     Node* p = make_load(control(), adr, value_type, type, adr_type, MemNode::unordered, is_volatile);
2584     // load value
2585     switch (type) {
2586     case T_BOOLEAN:
2587     case T_CHAR:
2588     case T_BYTE:
2589     case T_SHORT:
2590     case T_INT:
2591     case T_LONG:
2592     case T_FLOAT:
2593     case T_DOUBLE:
2594       break;
2595     case T_OBJECT:
2596       if (need_read_barrier) {
2597         insert_pre_barrier(heap_base_oop, offset, p, !(is_volatile || need_mem_bar));
2598       }
2599       break;
2600     case T_ADDRESS:
2601       // Cast to an int type.
2602       p = _gvn.transform(new (C) CastP2XNode(NULL, p));
2603       p = ConvX2UL(p);
2604       break;
2605     default:
2606       fatal(err_msg_res("unexpected type %d: %s", type, type2name(type)));
2607       break;
2608     }
2609     // The load node has the control of the preceding MemBarCPUOrder.  All
2610     // following nodes will have the control of the MemBarCPUOrder inserted at
2611     // the end of this method.  So, pushing the load onto the stack at a later
2612     // point is fine.
2613     set_result(p);
2614   } else {
2615     // place effect of store into memory
2616     switch (type) {
2617     case T_DOUBLE:
2618       val = dstore_rounding(val);
2619       break;
2620     case T_ADDRESS:
2621       // Repackage the long as a pointer.
2622       val = ConvL2X(val);
2623       val = _gvn.transform(new (C) CastX2PNode(val));