hotspot/src/share/vm/opto/compile.cpp
changeset 24424 2658d7834c6e
parent 24342 34e1384b02db
child 24442 4d4ae31dea26
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  2422           tty->print("   ");
  2422           tty->print("   ");
  2423         tty->print(" %c ", starts_bundle);
  2423         tty->print(" %c ", starts_bundle);
  2424         starts_bundle = ' ';
  2424         starts_bundle = ' ';
  2425         tty->print("\t");
  2425         tty->print("\t");
  2426         delay->format(_regalloc, tty);
  2426         delay->format(_regalloc, tty);
  2427         tty->print_cr("");
  2427         tty->cr();
  2428         delay = NULL;
  2428         delay = NULL;
  2429       }
  2429       }
  2430 
  2430 
  2431       // Dump the exception table as well
  2431       // Dump the exception table as well
  2432       if( n->is_Catch() && (Verbose || WizardMode) ) {
  2432       if( n->is_Catch() && (Verbose || WizardMode) ) {
  2436     }
  2436     }
  2437 
  2437 
  2438     if (pcs && n->_idx < pc_limit)
  2438     if (pcs && n->_idx < pc_limit)
  2439       tty->print_cr("%3.3x", pcs[n->_idx]);
  2439       tty->print_cr("%3.3x", pcs[n->_idx]);
  2440     else
  2440     else
  2441       tty->print_cr("");
  2441       tty->cr();
  2442 
  2442 
  2443     assert(cut_short || delay == NULL, "no unconditional delay branch");
  2443     assert(cut_short || delay == NULL, "no unconditional delay branch");
  2444 
  2444 
  2445   } // End of per-block dump
  2445   } // End of per-block dump
  2446   tty->print_cr("");
  2446   tty->cr();
  2447 
  2447 
  2448   if (cut_short)  tty->print_cr("*** disassembly is cut short ***");
  2448   if (cut_short)  tty->print_cr("*** disassembly is cut short ***");
  2449 }
  2449 }
  2450 #endif
  2450 #endif
  2451 
  2451 
  3686       break;
  3686       break;
  3687     }
  3687     }
  3688     default: ShouldNotReachHere();
  3688     default: ShouldNotReachHere();
  3689     }
  3689     }
  3690     assert(constant_addr, "consts section too small");
  3690     assert(constant_addr, "consts section too small");
  3691     assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), err_msg_res("must be: %d == %d", constant_addr - _masm.code()->consts()->start(), con.offset()));
  3691     assert((constant_addr - _masm.code()->consts()->start()) == con.offset(),
       
  3692             err_msg_res("must be: %d == %d", (int) (constant_addr - _masm.code()->consts()->start()), (int)(con.offset())));
  3692   }
  3693   }
  3693 }
  3694 }
  3694 
  3695 
  3695 int Compile::ConstantTable::find_offset(Constant& con) const {
  3696 int Compile::ConstantTable::find_offset(Constant& con) const {
  3696   int idx = _constants.find(con);
  3697   int idx = _constants.find(con);
  3766   MacroAssembler _masm(&cb);
  3767   MacroAssembler _masm(&cb);
  3767   address* jump_table_base = (address*) (_masm.code()->consts()->start() + offset);
  3768   address* jump_table_base = (address*) (_masm.code()->consts()->start() + offset);
  3768 
  3769 
  3769   for (uint i = 0; i < n->outcnt(); i++) {
  3770   for (uint i = 0; i < n->outcnt(); i++) {
  3770     address* constant_addr = &jump_table_base[i];
  3771     address* constant_addr = &jump_table_base[i];
  3771     assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, *constant_addr, (((address) n) + i)));
  3772     assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, p2i(*constant_addr), p2i(((address) n) + i)));
  3772     *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr);
  3773     *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr);
  3773     cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type);
  3774     cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type);
  3774   }
  3775   }
  3775 }
  3776 }
  3776 
  3777 
  3882       }
  3883       }
  3883     }
  3884     }
  3884   }
  3885   }
  3885   if (do_print_inlining) {
  3886   if (do_print_inlining) {
  3886     for (int i = 0; i < _print_inlining_list->length(); i++) {
  3887     for (int i = 0; i < _print_inlining_list->length(); i++) {
  3887       tty->print(_print_inlining_list->adr_at(i)->ss()->as_string());
  3888       tty->print("%s", _print_inlining_list->adr_at(i)->ss()->as_string());
  3888     }
  3889     }
  3889   }
  3890   }
  3890 }
  3891 }
  3891 
  3892 
  3892 void Compile::log_late_inline(CallGenerator* cg) {
  3893 void Compile::log_late_inline(CallGenerator* cg) {