Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_64.ad @ 4762:069ab3f976d3
7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions
Summary: Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix.
Reviewed-by: never, bdelsart, coleenp, jrose
author | stefank |
---|---|
date | Wed, 07 Dec 2011 11:35:03 +0100 |
parents | 65149e74c706 |
children | 1dc233a8c7fe |
comparison
equal
deleted
inserted
replaced
4761:65149e74c706 | 4762:069ab3f976d3 |
---|---|
11303 %{ | 11303 %{ |
11304 match(Set result (PartialSubtypeCheck sub super)); | 11304 match(Set result (PartialSubtypeCheck sub super)); |
11305 effect(KILL rcx, KILL cr); | 11305 effect(KILL rcx, KILL cr); |
11306 | 11306 |
11307 ins_cost(1100); // slightly larger than the next version | 11307 ins_cost(1100); // slightly larger than the next version |
11308 format %{ "movq rdi, [$sub + (sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes())]\n\t" | 11308 format %{ "movq rdi, [$sub + in_bytes(Klass::secondary_supers_offset())]\n\t" |
11309 "movl rcx, [rdi + arrayOopDesc::length_offset_in_bytes()]\t# length to scan\n\t" | 11309 "movl rcx, [rdi + arrayOopDesc::length_offset_in_bytes()]\t# length to scan\n\t" |
11310 "addq rdi, arrayOopDex::base_offset_in_bytes(T_OBJECT)\t# Skip to start of data; set NZ in case count is zero\n\t" | 11310 "addq rdi, arrayOopDex::base_offset_in_bytes(T_OBJECT)\t# Skip to start of data; set NZ in case count is zero\n\t" |
11311 "repne scasq\t# Scan *rdi++ for a match with rax while rcx--\n\t" | 11311 "repne scasq\t# Scan *rdi++ for a match with rax while rcx--\n\t" |
11312 "jne,s miss\t\t# Missed: rdi not-zero\n\t" | 11312 "jne,s miss\t\t# Missed: rdi not-zero\n\t" |
11313 "movq [$sub + (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())], $super\t# Hit: update cache\n\t" | 11313 "movq [$sub + in_bytes(Klass::secondary_super_cache_offset())], $super\t# Hit: update cache\n\t" |
11314 "xorq $result, $result\t\t Hit: rdi zero\n\t" | 11314 "xorq $result, $result\t\t Hit: rdi zero\n\t" |
11315 "miss:\t" %} | 11315 "miss:\t" %} |
11316 | 11316 |
11317 opcode(0x1); // Force a XOR of RDI | 11317 opcode(0x1); // Force a XOR of RDI |
11318 ins_encode(enc_PartialSubtypeCheck()); | 11318 ins_encode(enc_PartialSubtypeCheck()); |
11326 %{ | 11326 %{ |
11327 match(Set cr (CmpP (PartialSubtypeCheck sub super) zero)); | 11327 match(Set cr (CmpP (PartialSubtypeCheck sub super) zero)); |
11328 effect(KILL rcx, KILL result); | 11328 effect(KILL rcx, KILL result); |
11329 | 11329 |
11330 ins_cost(1000); | 11330 ins_cost(1000); |
11331 format %{ "movq rdi, [$sub + (sizeof(oopDesc) + Klass::secondary_supers_offset_in_bytes())]\n\t" | 11331 format %{ "movq rdi, [$sub + in_bytes(Klass::secondary_supers_offset())]\n\t" |
11332 "movl rcx, [rdi + arrayOopDesc::length_offset_in_bytes()]\t# length to scan\n\t" | 11332 "movl rcx, [rdi + arrayOopDesc::length_offset_in_bytes()]\t# length to scan\n\t" |
11333 "addq rdi, arrayOopDex::base_offset_in_bytes(T_OBJECT)\t# Skip to start of data; set NZ in case count is zero\n\t" | 11333 "addq rdi, arrayOopDex::base_offset_in_bytes(T_OBJECT)\t# Skip to start of data; set NZ in case count is zero\n\t" |
11334 "repne scasq\t# Scan *rdi++ for a match with rax while cx-- != 0\n\t" | 11334 "repne scasq\t# Scan *rdi++ for a match with rax while cx-- != 0\n\t" |
11335 "jne,s miss\t\t# Missed: flags nz\n\t" | 11335 "jne,s miss\t\t# Missed: flags nz\n\t" |
11336 "movq [$sub + (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())], $super\t# Hit: update cache\n\t" | 11336 "movq [$sub + in_bytes(Klass::secondary_super_cache_offset())], $super\t# Hit: update cache\n\t" |
11337 "miss:\t" %} | 11337 "miss:\t" %} |
11338 | 11338 |
11339 opcode(0x0); // No need to XOR RDI | 11339 opcode(0x0); // No need to XOR RDI |
11340 ins_encode(enc_PartialSubtypeCheck()); | 11340 ins_encode(enc_PartialSubtypeCheck()); |
11341 ins_pipe(pipe_slow); | 11341 ins_pipe(pipe_slow); |