mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6961690: load oops from constant table on SPARC
Oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence. Reviewed-by: never, kvn
This commit is contained in:
parent
ab725dba1d
commit
ffaadcecea
31 changed files with 1795 additions and 830 deletions
|
@ -1443,6 +1443,45 @@ void MacroAssembler::set64(jlong value, Register d, Register tmp) {
|
|||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue