Skip to content

Commit

Permalink
8281812: x86: Use short jumps in TemplateTable::condy_helper
Browse files Browse the repository at this point in the history
Reviewed-by: redestad, neliasso
  • Loading branch information
shipilev committed Feb 16, 2022
1 parent a86cab8 commit fef5d74
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/hotspot/cpu/x86/templateTable_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,47 +525,47 @@ void TemplateTable::condy_helper(Label& Done) {
// tos in (itos, ftos, stos, btos, ctos, ztos)
Label notInt, notFloat, notShort, notByte, notChar, notBool;
__ cmpl(flags, itos);
__ jcc(Assembler::notEqual, notInt);
__ jccb(Assembler::notEqual, notInt);
// itos
__ movl(rax, field);
__ push(itos);
__ jmp(Done);

__ bind(notInt);
__ cmpl(flags, ftos);
__ jcc(Assembler::notEqual, notFloat);
__ jccb(Assembler::notEqual, notFloat);
// ftos
__ load_float(field);
__ push(ftos);
__ jmp(Done);

__ bind(notFloat);
__ cmpl(flags, stos);
__ jcc(Assembler::notEqual, notShort);
__ jccb(Assembler::notEqual, notShort);
// stos
__ load_signed_short(rax, field);
__ push(stos);
__ jmp(Done);

__ bind(notShort);
__ cmpl(flags, btos);
__ jcc(Assembler::notEqual, notByte);
__ jccb(Assembler::notEqual, notByte);
// btos
__ load_signed_byte(rax, field);
__ push(btos);
__ jmp(Done);

__ bind(notByte);
__ cmpl(flags, ctos);
__ jcc(Assembler::notEqual, notChar);
__ jccb(Assembler::notEqual, notChar);
// ctos
__ load_unsigned_short(rax, field);
__ push(ctos);
__ jmp(Done);

__ bind(notChar);
__ cmpl(flags, ztos);
__ jcc(Assembler::notEqual, notBool);
__ jccb(Assembler::notEqual, notBool);
// ztos
__ load_signed_byte(rax, field);
__ push(ztos);
Expand All @@ -579,7 +579,7 @@ void TemplateTable::condy_helper(Label& Done) {
{
Label notLong, notDouble;
__ cmpl(flags, ltos);
__ jcc(Assembler::notEqual, notLong);
__ jccb(Assembler::notEqual, notLong);
// ltos
// Loading high word first because movptr clobbers rax
NOT_LP64(__ movptr(rdx, field.plus_disp(4)));
Expand All @@ -589,7 +589,7 @@ void TemplateTable::condy_helper(Label& Done) {

__ bind(notLong);
__ cmpl(flags, dtos);
__ jcc(Assembler::notEqual, notDouble);
__ jccb(Assembler::notEqual, notDouble);
// dtos
__ load_double(field);
__ push(dtos);
Expand Down

1 comment on commit fef5d74

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.