src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7063628 Cdiff src/cpu/x86/vm/x86_64.ad

src/cpu/x86/vm/x86_64.ad

Print this page

        

*** 2426,2445 **** } %} enc_class Lbl(label labl) %{ ! // JMP, CALL Label* l = $labl$$label; ! emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0); %} enc_class LblShort(label labl) %{ ! // JMP, CALL Label* l = $labl$$label; ! int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0; assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); emit_d8(cbuf, disp); %} enc_class opc2_reg(rRegI dst) --- 2426,2445 ---- } %} enc_class Lbl(label labl) %{ ! // GOTO Label* l = $labl$$label; ! emit_d32(cbuf, (l->loc_pos() - (cbuf.insts_size() + 4))); %} enc_class LblShort(label labl) %{ ! // GOTO Label* l = $labl$$label; ! int disp = l->loc_pos() - (cbuf.insts_size() + 1); assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); emit_d8(cbuf, disp); %} enc_class opc2_reg(rRegI dst)
*** 2464,2482 **** %{ // JCC Label* l = $labl$$label; $$$emit8$primary; emit_cc(cbuf, $secondary, $cop$$cmpcode); ! emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0); %} enc_class JccShort (cmpOp cop, label labl) %{ // JCC Label *l = $labl$$label; emit_cc(cbuf, $primary, $cop$$cmpcode); ! int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0; assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); emit_d8(cbuf, disp); %} enc_class enc_cmov(cmpOp cop) --- 2464,2482 ---- %{ // JCC Label* l = $labl$$label; $$$emit8$primary; emit_cc(cbuf, $secondary, $cop$$cmpcode); ! emit_d32(cbuf, (l->loc_pos() - (cbuf.insts_size() + 4))); %} enc_class JccShort (cmpOp cop, label labl) %{ // JCC Label *l = $labl$$label; emit_cc(cbuf, $primary, $cop$$cmpcode); ! int disp = l->loc_pos() - (cbuf.insts_size() + 1); assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); emit_d8(cbuf, disp); %} enc_class enc_cmov(cmpOp cop)
*** 12129,12148 **** $$$emit8$primary; emit_cc(cbuf, $secondary, Assembler::parity); int parity_disp = -1; if ($cop$$cmpcode == Assembler::notEqual) { // the two jumps 6 bytes apart so the jump distances are too ! parity_disp = l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0; } else if ($cop$$cmpcode == Assembler::equal) { parity_disp = 6; } else { ShouldNotReachHere(); } emit_d32(cbuf, parity_disp); $$$emit8$primary; emit_cc(cbuf, $secondary, $cop$$cmpcode); ! int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0; emit_d32(cbuf, disp); %} ins_pipe(pipe_jcc); ins_pc_relative(1); %} --- 12129,12148 ---- $$$emit8$primary; emit_cc(cbuf, $secondary, Assembler::parity); int parity_disp = -1; if ($cop$$cmpcode == Assembler::notEqual) { // the two jumps 6 bytes apart so the jump distances are too ! parity_disp = l->loc_pos() - (cbuf.insts_size() + 4); } else if ($cop$$cmpcode == Assembler::equal) { parity_disp = 6; } else { ShouldNotReachHere(); } emit_d32(cbuf, parity_disp); $$$emit8$primary; emit_cc(cbuf, $secondary, $cop$$cmpcode); ! int disp = l->loc_pos() - (cbuf.insts_size() + 4); emit_d32(cbuf, disp); %} ins_pipe(pipe_jcc); ins_pc_relative(1); %}
*** 12333,12351 **** ins_encode %{ Label* l = $labl$$label; emit_cc(cbuf, $primary, Assembler::parity); int parity_disp = -1; if ($cop$$cmpcode == Assembler::notEqual) { ! parity_disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0; } else if ($cop$$cmpcode == Assembler::equal) { parity_disp = 2; } else { ShouldNotReachHere(); } emit_d8(cbuf, parity_disp); emit_cc(cbuf, $primary, $cop$$cmpcode); ! int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0; emit_d8(cbuf, disp); assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); assert(-128 <= parity_disp && parity_disp <= 127, "Displacement too large for short jmp"); %} ins_pipe(pipe_jcc); --- 12333,12351 ---- ins_encode %{ Label* l = $labl$$label; emit_cc(cbuf, $primary, Assembler::parity); int parity_disp = -1; if ($cop$$cmpcode == Assembler::notEqual) { ! parity_disp = l->loc_pos() - (cbuf.insts_size() + 1); } else if ($cop$$cmpcode == Assembler::equal) { parity_disp = 2; } else { ShouldNotReachHere(); } emit_d8(cbuf, parity_disp); emit_cc(cbuf, $primary, $cop$$cmpcode); ! int disp = l->loc_pos() - (cbuf.insts_size() + 1); emit_d8(cbuf, disp); assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp"); assert(-128 <= parity_disp && parity_disp <= 127, "Displacement too large for short jmp"); %} ins_pipe(pipe_jcc);
src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File