comparison 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
comparison
equal deleted inserted replaced
3838:6a991dcb52bb 3839:3d42f82cd811
515 buf.consts()->initialize_shared_locs(&locs_buf[lsize * 0], lsize); 515 buf.consts()->initialize_shared_locs(&locs_buf[lsize * 0], lsize);
516 buf.insts()->initialize_shared_locs( &locs_buf[lsize * 1], lsize); 516 buf.insts()->initialize_shared_locs( &locs_buf[lsize * 1], lsize);
517 buf.stubs()->initialize_shared_locs( &locs_buf[lsize * 2], lsize); 517 buf.stubs()->initialize_shared_locs( &locs_buf[lsize * 2], lsize);
518 518
519 // Do the emission. 519 // Do the emission.
520
521 Label fakeL; // Fake label for branch instructions.
522 bool is_branch = n->is_Branch() && n->as_Mach()->ideal_Opcode() != Op_Jump;
523 if (is_branch) {
524 MacroAssembler masm(&buf);
525 masm.bind(fakeL);
526 n->as_Mach()->label_set(&fakeL, 0);
527 }
520 n->emit(buf, this->regalloc()); 528 n->emit(buf, this->regalloc());
529 if (is_branch) // Clear the reference to fake label.
530 n->as_Mach()->label_set(NULL, 0);
521 531
522 // End scratch_emit_size section. 532 // End scratch_emit_size section.
523 set_in_scratch_emit_size(false); 533 set_in_scratch_emit_size(false);
524 534
525 return buf.insts_size(); 535 return buf.insts_size();