8281812: x86: Use short jumps in TemplateTable::condy_helper

Reviewed-by: redestad, neliasso
This commit is contained in:
Aleksey Shipilev 2022-02-16 09:42:56 +00:00
parent a86cab8d42
commit fef5d74d0e

View File

@ -525,7 +525,7 @@ void TemplateTable::condy_helper(Label& Done) {
// tos in (itos, ftos, stos, btos, ctos, ztos) // tos in (itos, ftos, stos, btos, ctos, ztos)
Label notInt, notFloat, notShort, notByte, notChar, notBool; Label notInt, notFloat, notShort, notByte, notChar, notBool;
__ cmpl(flags, itos); __ cmpl(flags, itos);
__ jcc(Assembler::notEqual, notInt); __ jccb(Assembler::notEqual, notInt);
// itos // itos
__ movl(rax, field); __ movl(rax, field);
__ push(itos); __ push(itos);
@ -533,7 +533,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notInt); __ bind(notInt);
__ cmpl(flags, ftos); __ cmpl(flags, ftos);
__ jcc(Assembler::notEqual, notFloat); __ jccb(Assembler::notEqual, notFloat);
// ftos // ftos
__ load_float(field); __ load_float(field);
__ push(ftos); __ push(ftos);
@ -541,7 +541,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notFloat); __ bind(notFloat);
__ cmpl(flags, stos); __ cmpl(flags, stos);
__ jcc(Assembler::notEqual, notShort); __ jccb(Assembler::notEqual, notShort);
// stos // stos
__ load_signed_short(rax, field); __ load_signed_short(rax, field);
__ push(stos); __ push(stos);
@ -549,7 +549,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notShort); __ bind(notShort);
__ cmpl(flags, btos); __ cmpl(flags, btos);
__ jcc(Assembler::notEqual, notByte); __ jccb(Assembler::notEqual, notByte);
// btos // btos
__ load_signed_byte(rax, field); __ load_signed_byte(rax, field);
__ push(btos); __ push(btos);
@ -557,7 +557,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notByte); __ bind(notByte);
__ cmpl(flags, ctos); __ cmpl(flags, ctos);
__ jcc(Assembler::notEqual, notChar); __ jccb(Assembler::notEqual, notChar);
// ctos // ctos
__ load_unsigned_short(rax, field); __ load_unsigned_short(rax, field);
__ push(ctos); __ push(ctos);
@ -565,7 +565,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notChar); __ bind(notChar);
__ cmpl(flags, ztos); __ cmpl(flags, ztos);
__ jcc(Assembler::notEqual, notBool); __ jccb(Assembler::notEqual, notBool);
// ztos // ztos
__ load_signed_byte(rax, field); __ load_signed_byte(rax, field);
__ push(ztos); __ push(ztos);
@ -579,7 +579,7 @@ void TemplateTable::condy_helper(Label& Done) {
{ {
Label notLong, notDouble; Label notLong, notDouble;
__ cmpl(flags, ltos); __ cmpl(flags, ltos);
__ jcc(Assembler::notEqual, notLong); __ jccb(Assembler::notEqual, notLong);
// ltos // ltos
// Loading high word first because movptr clobbers rax // Loading high word first because movptr clobbers rax
NOT_LP64(__ movptr(rdx, field.plus_disp(4))); NOT_LP64(__ movptr(rdx, field.plus_disp(4)));
@ -589,7 +589,7 @@ void TemplateTable::condy_helper(Label& Done) {
__ bind(notLong); __ bind(notLong);
__ cmpl(flags, dtos); __ cmpl(flags, dtos);
__ jcc(Assembler::notEqual, notDouble); __ jccb(Assembler::notEqual, notDouble);
// dtos // dtos
__ load_double(field); __ load_double(field);
__ push(dtos); __ push(dtos);