Mercurial > hg > truffle
comparison src/share/vm/asm/register.hpp @ 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 | f0c2369fda5a |
children | 166d744df0de |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
116 AbstractRegister a, | 116 AbstractRegister a, |
117 AbstractRegister b | 117 AbstractRegister b |
118 ) { | 118 ) { |
119 assert( | 119 assert( |
120 a != b, | 120 a != b, |
121 err_msg_res("registers must be different: a=%d, b=%d", | 121 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT "", |
122 a, b) | 122 p2i(a), p2i(b)) |
123 ); | 123 ); |
124 } | 124 } |
125 | 125 |
126 | 126 |
127 inline void assert_different_registers( | 127 inline void assert_different_registers( |
130 AbstractRegister c | 130 AbstractRegister c |
131 ) { | 131 ) { |
132 assert( | 132 assert( |
133 a != b && a != c | 133 a != b && a != c |
134 && b != c, | 134 && b != c, |
135 err_msg_res("registers must be different: a=%d, b=%d, c=%d", | 135 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
136 a, b, c) | 136 ", c=" INTPTR_FORMAT "", |
137 p2i(a), p2i(b), p2i(c)) | |
137 ); | 138 ); |
138 } | 139 } |
139 | 140 |
140 | 141 |
141 inline void assert_different_registers( | 142 inline void assert_different_registers( |
146 ) { | 147 ) { |
147 assert( | 148 assert( |
148 a != b && a != c && a != d | 149 a != b && a != c && a != d |
149 && b != c && b != d | 150 && b != c && b != d |
150 && c != d, | 151 && c != d, |
151 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d", | 152 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
152 a, b, c, d) | 153 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT "", |
154 p2i(a), p2i(b), p2i(c), p2i(d)) | |
153 ); | 155 ); |
154 } | 156 } |
155 | 157 |
156 | 158 |
157 inline void assert_different_registers( | 159 inline void assert_different_registers( |
164 assert( | 166 assert( |
165 a != b && a != c && a != d && a != e | 167 a != b && a != c && a != d && a != e |
166 && b != c && b != d && b != e | 168 && b != c && b != d && b != e |
167 && c != d && c != e | 169 && c != d && c != e |
168 && d != e, | 170 && d != e, |
169 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d", | 171 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
170 a, b, c, d, e) | 172 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT "", |
173 p2i(a), p2i(b), p2i(c), p2i(d), p2i(e)) | |
171 ); | 174 ); |
172 } | 175 } |
173 | 176 |
174 | 177 |
175 inline void assert_different_registers( | 178 inline void assert_different_registers( |
184 a != b && a != c && a != d && a != e && a != f | 187 a != b && a != c && a != d && a != e && a != f |
185 && b != c && b != d && b != e && b != f | 188 && b != c && b != d && b != e && b != f |
186 && c != d && c != e && c != f | 189 && c != d && c != e && c != f |
187 && d != e && d != f | 190 && d != e && d != f |
188 && e != f, | 191 && e != f, |
189 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d", | 192 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
190 a, b, c, d, e, f) | 193 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT |
194 ", f=" INTPTR_FORMAT "", | |
195 p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f)) | |
191 ); | 196 ); |
192 } | 197 } |
193 | 198 |
194 | 199 |
195 inline void assert_different_registers( | 200 inline void assert_different_registers( |
206 && b != c && b != d && b != e && b != f && b != g | 211 && b != c && b != d && b != e && b != f && b != g |
207 && c != d && c != e && c != f && c != g | 212 && c != d && c != e && c != f && c != g |
208 && d != e && d != f && d != g | 213 && d != e && d != f && d != g |
209 && e != f && e != g | 214 && e != f && e != g |
210 && f != g, | 215 && f != g, |
211 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d", | 216 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
212 a, b, c, d, e, f, g) | 217 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT |
218 ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT "", | |
219 p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g)) | |
213 ); | 220 ); |
214 } | 221 } |
215 | 222 |
216 | 223 |
217 inline void assert_different_registers( | 224 inline void assert_different_registers( |
230 && c != d && c != e && c != f && c != g && c != h | 237 && c != d && c != e && c != f && c != g && c != h |
231 && d != e && d != f && d != g && d != h | 238 && d != e && d != f && d != g && d != h |
232 && e != f && e != g && e != h | 239 && e != f && e != g && e != h |
233 && f != g && f != h | 240 && f != g && f != h |
234 && g != h, | 241 && g != h, |
235 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d", | 242 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
236 a, b, c, d, e, f, g, h) | 243 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT |
244 ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT "", | |
245 p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h)) | |
237 ); | 246 ); |
238 } | 247 } |
239 | 248 |
240 | 249 |
241 inline void assert_different_registers( | 250 inline void assert_different_registers( |
256 && d != e && d != f && d != g && d != h && d != i | 265 && d != e && d != f && d != g && d != h && d != i |
257 && e != f && e != g && e != h && e != i | 266 && e != f && e != g && e != h && e != i |
258 && f != g && f != h && f != i | 267 && f != g && f != h && f != i |
259 && g != h && g != i | 268 && g != h && g != i |
260 && h != i, | 269 && h != i, |
261 err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d", | 270 err_msg_res("registers must be different: a=" INTPTR_FORMAT ", b=" INTPTR_FORMAT |
262 a, b, c, d, e, f, g, h, i) | 271 ", c=" INTPTR_FORMAT ", d=" INTPTR_FORMAT ", e=" INTPTR_FORMAT |
272 ", f=" INTPTR_FORMAT ", g=" INTPTR_FORMAT ", h=" INTPTR_FORMAT | |
273 ", i=" INTPTR_FORMAT "", | |
274 p2i(a), p2i(b), p2i(c), p2i(d), p2i(e), p2i(f), p2i(g), p2i(h), p2i(i)) | |
263 ); | 275 ); |
264 } | 276 } |
265 | 277 |
266 #endif // SHARE_VM_ASM_REGISTER_HPP | 278 #endif // SHARE_VM_ASM_REGISTER_HPP |