Mercurial > hg > truffle
comparison src/share/vm/opto/compile.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | 3636afd5ec1a |
children | 0bf37f737702 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
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. |
2409 tty->print(" "); | 2409 tty->print(" "); |
2410 tty->print(" %c ", starts_bundle); | 2410 tty->print(" %c ", starts_bundle); |
2411 starts_bundle = ' '; | 2411 starts_bundle = ' '; |
2412 tty->print("\t"); | 2412 tty->print("\t"); |
2413 delay->format(_regalloc, tty); | 2413 delay->format(_regalloc, tty); |
2414 tty->print_cr(""); | 2414 tty->cr(); |
2415 delay = NULL; | 2415 delay = NULL; |
2416 } | 2416 } |
2417 | 2417 |
2418 // Dump the exception table as well | 2418 // Dump the exception table as well |
2419 if( n->is_Catch() && (Verbose || WizardMode) ) { | 2419 if( n->is_Catch() && (Verbose || WizardMode) ) { |
2423 } | 2423 } |
2424 | 2424 |
2425 if (pcs && n->_idx < pc_limit) | 2425 if (pcs && n->_idx < pc_limit) |
2426 tty->print_cr("%3.3x", pcs[n->_idx]); | 2426 tty->print_cr("%3.3x", pcs[n->_idx]); |
2427 else | 2427 else |
2428 tty->print_cr(""); | 2428 tty->cr(); |
2429 | 2429 |
2430 assert(cut_short || delay == NULL, "no unconditional delay branch"); | 2430 assert(cut_short || delay == NULL, "no unconditional delay branch"); |
2431 | 2431 |
2432 } // End of per-block dump | 2432 } // End of per-block dump |
2433 tty->print_cr(""); | 2433 tty->cr(); |
2434 | 2434 |
2435 if (cut_short) tty->print_cr("*** disassembly is cut short ***"); | 2435 if (cut_short) tty->print_cr("*** disassembly is cut short ***"); |
2436 } | 2436 } |
2437 #endif | 2437 #endif |
2438 | 2438 |
3669 break; | 3669 break; |
3670 } | 3670 } |
3671 default: ShouldNotReachHere(); | 3671 default: ShouldNotReachHere(); |
3672 } | 3672 } |
3673 assert(constant_addr, "consts section too small"); | 3673 assert(constant_addr, "consts section too small"); |
3674 assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), err_msg_res("must be: %d == %d", constant_addr - _masm.code()->consts()->start(), con.offset())); | 3674 assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), |
3675 err_msg_res("must be: %d == %d", (int) (constant_addr - _masm.code()->consts()->start()), (int)(con.offset()))); | |
3675 } | 3676 } |
3676 } | 3677 } |
3677 | 3678 |
3678 int Compile::ConstantTable::find_offset(Constant& con) const { | 3679 int Compile::ConstantTable::find_offset(Constant& con) const { |
3679 int idx = _constants.find(con); | 3680 int idx = _constants.find(con); |
3749 MacroAssembler _masm(&cb); | 3750 MacroAssembler _masm(&cb); |
3750 address* jump_table_base = (address*) (_masm.code()->consts()->start() + offset); | 3751 address* jump_table_base = (address*) (_masm.code()->consts()->start() + offset); |
3751 | 3752 |
3752 for (uint i = 0; i < n->outcnt(); i++) { | 3753 for (uint i = 0; i < n->outcnt(); i++) { |
3753 address* constant_addr = &jump_table_base[i]; | 3754 address* constant_addr = &jump_table_base[i]; |
3754 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))); | 3755 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))); |
3755 *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr); | 3756 *constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr); |
3756 cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type); | 3757 cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type); |
3757 } | 3758 } |
3758 } | 3759 } |
3759 | 3760 |
3780 if ( m == NULL ) continue; | 3781 if ( m == NULL ) continue; |
3781 useful.push(m); | 3782 useful.push(m); |
3782 } | 3783 } |
3783 } | 3784 } |
3784 for (int i = 0; i < _print_inlining_list->length(); i++) { | 3785 for (int i = 0; i < _print_inlining_list->length(); i++) { |
3785 tty->print(_print_inlining_list->adr_at(i)->ss()->as_string()); | 3786 tty->print("%s", _print_inlining_list->adr_at(i)->ss()->as_string()); |
3786 } | 3787 } |
3787 } | 3788 } |
3788 } | 3789 } |
3789 | 3790 |
3790 // Dump inlining replay data to the stream. | 3791 // Dump inlining replay data to the stream. |