Mercurial > hg > graal-jvmci-8
diff src/cpu/sparc/vm/assembler_sparc.cpp @ 2008:2f644f85485d
6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by: never, kvn
author | twisti |
---|---|
date | Fri, 03 Dec 2010 01:34:31 -0800 |
parents | ac637b7220d1 |
children | 7737fa7ec2b5 b1a2afa37ec4 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/assembler_sparc.cpp Thu Dec 02 17:21:12 2010 -0800 +++ b/src/cpu/sparc/vm/assembler_sparc.cpp Fri Dec 03 01:34:31 2010 -0800 @@ -1443,6 +1443,45 @@ } } +int MacroAssembler::size_of_set64(jlong value) { + v9_dep(); + + int hi = (int)(value >> 32); + int lo = (int)(value & ~0); + int count = 0; + + // (Matcher::isSimpleConstant64 knows about the following optimizations.) + if (Assembler::is_simm13(lo) && value == lo) { + count++; + } else if (hi == 0) { + count++; + if (low10(lo) != 0) + count++; + } + else if (hi == -1) { + count += 2; + } + else if (lo == 0) { + if (Assembler::is_simm13(hi)) { + count++; + } else { + count++; + if (low10(hi) != 0) + count++; + } + count++; + } + else { + count += 2; + if (low10(hi) != 0) + count++; + if (low10(lo) != 0) + count++; + count += 2; + } + return count; +} + // compute size in bytes of sparc frame, given // number of extraWords int MacroAssembler::total_frame_size_in_bytes(int extraWords) {