Mercurial > hg > truffle
comparison src/share/vm/adlc/formssel.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 | 62c54fcc0a35 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 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. |
1320 // This component isn't in the input array. Print out the static | 1320 // This component isn't in the input array. Print out the static |
1321 // name of the register. | 1321 // name of the register. |
1322 OperandForm* oper = form->is_operand(); | 1322 OperandForm* oper = form->is_operand(); |
1323 if (oper != NULL && oper->is_bound_register()) { | 1323 if (oper != NULL && oper->is_bound_register()) { |
1324 const RegDef* first = oper->get_RegClass()->find_first_elem(); | 1324 const RegDef* first = oper->get_RegClass()->find_first_elem(); |
1325 fprintf(fp, " st->print(\"%s\");\n", first->_regname); | 1325 fprintf(fp, " st->print_raw(\"%s\");\n", first->_regname); |
1326 } else { | 1326 } else { |
1327 globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var); | 1327 globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var); |
1328 } | 1328 } |
1329 } else { | 1329 } else { |
1330 // Output the format call for this operand | 1330 // Output the format call for this operand |
2528 switch(const_type) { | 2528 switch(const_type) { |
2529 case Form::idealI: fprintf(fp," st->print(\"#%%d\", _c%d);\n", const_index); break; | 2529 case Form::idealI: fprintf(fp," st->print(\"#%%d\", _c%d);\n", const_index); break; |
2530 case Form::idealP: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; | 2530 case Form::idealP: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; |
2531 case Form::idealNKlass: | 2531 case Form::idealNKlass: |
2532 case Form::idealN: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; | 2532 case Form::idealN: fprintf(fp," if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break; |
2533 case Form::idealL: fprintf(fp," st->print(\"#%%lld\", _c%d);\n", const_index); break; | 2533 case Form::idealL: fprintf(fp," st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", const_index); break; |
2534 case Form::idealF: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; | 2534 case Form::idealF: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; |
2535 case Form::idealD: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; | 2535 case Form::idealD: fprintf(fp," st->print(\"#%%f\", _c%d);\n", const_index); break; |
2536 default: | 2536 default: |
2537 assert( false, "ShouldNotReachHere()"); | 2537 assert( false, "ShouldNotReachHere()"); |
2538 } | 2538 } |