Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/assembler_x86_32.cpp @ 117:deadee49286e
6644928: Internal Error (src/share/vm/code/relocInfo.hpp:1089)
Summary: Cardtable base can be zero, ExternalAddress can't take a NULL.
author | sgoldman |
---|---|
date | Fri, 11 Apr 2008 06:18:44 -0700 |
parents | 3d62cb85208d |
children | d1605aabd0a1 37f87013dfd8 |
comparison
equal
deleted
inserted
replaced
109:9f4457a14b58 | 117:deadee49286e |
---|---|
3403 void MacroAssembler::store_check_part_2(Register obj) { | 3403 void MacroAssembler::store_check_part_2(Register obj) { |
3404 BarrierSet* bs = Universe::heap()->barrier_set(); | 3404 BarrierSet* bs = Universe::heap()->barrier_set(); |
3405 assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind"); | 3405 assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind"); |
3406 CardTableModRefBS* ct = (CardTableModRefBS*)bs; | 3406 CardTableModRefBS* ct = (CardTableModRefBS*)bs; |
3407 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); | 3407 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); |
3408 ExternalAddress cardtable((address)ct->byte_map_base); | 3408 |
3409 Address index(noreg, obj, Address::times_1); | 3409 // The calculation for byte_map_base is as follows: |
3410 | 3410 // byte_map_base = _byte_map - (uintptr_t(low_bound) >> card_shift); |
3411 movb(as_Address(ArrayAddress(cardtable, index)), 0); | 3411 // So this essentially converts an address to a displacement and |
3412 // it will never need to be relocated. On 64bit however the value may be too | |
3413 // large for a 32bit displacement | |
3414 | |
3415 intptr_t disp = (intptr_t) ct->byte_map_base; | |
3416 Address cardtable(noreg, obj, Address::times_1, disp); | |
3417 movb(cardtable, 0); | |
3412 } | 3418 } |
3413 | 3419 |
3414 | 3420 |
3415 void MacroAssembler::c2bool(Register x) { | 3421 void MacroAssembler::c2bool(Register x) { |
3416 // implements x == 0 ? 0 : 1 | 3422 // implements x == 0 ? 0 : 1 |