Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/bytecodeInterpreter.cpp @ 520:52a431267315
6791168: Fix invalid code in bytecodeInterpreter that can cause gcc ICE
Summary: Fix compilation errors from latest gcc in CC_INTERP including offending missing void* cast.
Reviewed-by: xlu
author | coleenp |
---|---|
date | Tue, 13 Jan 2009 14:41:44 -0500 |
parents | d1605aabd0a1 |
children | 0fbdb4381b99 98cb887364d3 |
comparison
equal
deleted
inserted
replaced
516:fc7ab6287598 | 520:52a431267315 |
---|---|
161 */ | 161 */ |
162 #undef CONTINUE | 162 #undef CONTINUE |
163 #ifdef USELABELS | 163 #ifdef USELABELS |
164 // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an | 164 // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an |
165 // initialization (which is is the initialization of the table pointer...) | 165 // initialization (which is is the initialization of the table pointer...) |
166 #define DISPATCH(opcode) goto *dispatch_table[opcode] | 166 #define DISPATCH(opcode) goto *(void*)dispatch_table[opcode] |
167 #define CONTINUE { \ | 167 #define CONTINUE { \ |
168 opcode = *pc; \ | 168 opcode = *pc; \ |
169 DO_UPDATE_INSTRUCTION_COUNT(opcode); \ | 169 DO_UPDATE_INSTRUCTION_COUNT(opcode); \ |
170 DEBUGGER_SINGLE_STEP_NOTIFY(); \ | 170 DEBUGGER_SINGLE_STEP_NOTIFY(); \ |
171 DISPATCH(opcode); \ | 171 DISPATCH(opcode); \ |
339 * passed is a null ref. | 339 * passed is a null ref. |
340 * On some architectures/platforms it should be possible to do this implicitly | 340 * On some architectures/platforms it should be possible to do this implicitly |
341 */ | 341 */ |
342 #undef CHECK_NULL | 342 #undef CHECK_NULL |
343 #define CHECK_NULL(obj_) \ | 343 #define CHECK_NULL(obj_) \ |
344 if ((obj_) == 0) { \ | 344 if ((obj_) == NULL) { \ |
345 VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ | 345 VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ |
346 } | 346 } |
347 | 347 |
348 #define VMdoubleConstZero() 0.0 | 348 #define VMdoubleConstZero() 0.0 |
349 #define VMdoubleConstOne() 1.0 | 349 #define VMdoubleConstOne() 1.0 |
1360 CONTINUE; \ | 1360 CONTINUE; \ |
1361 } | 1361 } |
1362 | 1362 |
1363 #define NULL_COMPARISON_NOT_OP(name) \ | 1363 #define NULL_COMPARISON_NOT_OP(name) \ |
1364 CASE(_if##name): { \ | 1364 CASE(_if##name): { \ |
1365 int skip = (!(STACK_OBJECT(-1) == 0)) \ | 1365 int skip = (!(STACK_OBJECT(-1) == NULL)) \ |
1366 ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ | 1366 ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ |
1367 address branch_pc = pc; \ | 1367 address branch_pc = pc; \ |
1368 UPDATE_PC_AND_TOS(skip, -1); \ | 1368 UPDATE_PC_AND_TOS(skip, -1); \ |
1369 DO_BACKEDGE_CHECKS(skip, branch_pc); \ | 1369 DO_BACKEDGE_CHECKS(skip, branch_pc); \ |
1370 CONTINUE; \ | 1370 CONTINUE; \ |
1371 } | 1371 } |
1372 | 1372 |
1373 #define NULL_COMPARISON_OP(name) \ | 1373 #define NULL_COMPARISON_OP(name) \ |
1374 CASE(_if##name): { \ | 1374 CASE(_if##name): { \ |
1375 int skip = ((STACK_OBJECT(-1) == 0)) \ | 1375 int skip = ((STACK_OBJECT(-1) == NULL)) \ |
1376 ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ | 1376 ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ |
1377 address branch_pc = pc; \ | 1377 address branch_pc = pc; \ |
1378 UPDATE_PC_AND_TOS(skip, -1); \ | 1378 UPDATE_PC_AND_TOS(skip, -1); \ |
1379 DO_BACKEDGE_CHECKS(skip, branch_pc); \ | 1379 DO_BACKEDGE_CHECKS(skip, branch_pc); \ |
1380 CONTINUE; \ | 1380 CONTINUE; \ |