Mercurial > hg > truffle
diff src/share/vm/opto/compile.cpp @ 3839:3d42f82cd811
7063628: Use cbcond on T4
Summary: Add new short branch instruction to Hotspot sparc assembler.
Reviewed-by: never, twisti, jrose
author | kvn |
---|---|
date | Thu, 21 Jul 2011 11:25:07 -0700 |
parents | 7889bbcc7f88 |
children | 11211f7cb5a0 |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Thu Jul 21 08:38:25 2011 -0700 +++ b/src/share/vm/opto/compile.cpp Thu Jul 21 11:25:07 2011 -0700 @@ -517,7 +517,17 @@ buf.stubs()->initialize_shared_locs( &locs_buf[lsize * 2], lsize); // Do the emission. + + Label fakeL; // Fake label for branch instructions. + bool is_branch = n->is_Branch() && n->as_Mach()->ideal_Opcode() != Op_Jump; + if (is_branch) { + MacroAssembler masm(&buf); + masm.bind(fakeL); + n->as_Mach()->label_set(&fakeL, 0); + } n->emit(buf, this->regalloc()); + if (is_branch) // Clear the reference to fake label. + n->as_Mach()->label_set(NULL, 0); // End scratch_emit_size section. set_in_scratch_emit_size(false);