< prev index next >

src/share/vm/c1/c1_LIRAssembler.cpp

Print this page




 288   X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed"));
 289 }
 290 
 291 
 292 void LIR_Assembler::emit_lir_list(LIR_List* list) {
 293   peephole(list);
 294 
 295   int n = list->length();
 296   for (int i = 0; i < n; i++) {
 297     LIR_Op* op = list->at(i);
 298 
 299     check_codespace();
 300     CHECK_BAILOUT();
 301 
 302 #ifndef PRODUCT
 303     if (CommentedAssembly) {
 304       // Don't record out every op since that's too verbose.  Print
 305       // branches since they include block and stub names.  Also print
 306       // patching moves since they generate funny looking code.
 307       if (op->code() == lir_branch ||
 308           (op->code() == lir_move && op->as_Op1()->patch_code() != lir_patch_none)) {

 309         stringStream st;
 310         op->print_on(&st);
 311         _masm->block_comment(st.as_string());
 312       }
 313     }
 314     if (PrintLIRWithAssembly) {
 315       // print out the LIR operation followed by the resulting assembly
 316       list->at(i)->print(); tty->cr();
 317     }
 318 #endif /* PRODUCT */
 319 
 320     op->emit_code(this);
 321 
 322     if (compilation()->debug_info_recorder()->recording_non_safepoints()) {
 323       process_debug_info(op);
 324     }
 325 
 326 #ifndef PRODUCT
 327     if (PrintLIRWithAssembly) {
 328       _masm->code()->decode();


 573     case lir_ffree:
 574       ffree(op->in_opr()->as_jint());
 575       break;
 576 
 577     case lir_branch:
 578       break;
 579 
 580     case lir_push:
 581       push(op->in_opr());
 582       break;
 583 
 584     case lir_pop:
 585       pop(op->in_opr());
 586       break;
 587 
 588     case lir_neg:
 589       negate(op->in_opr(), op->result_opr());
 590       break;
 591 
 592     case lir_leal:
 593       leal(op->in_opr(), op->result_opr());
 594       break;
 595 
 596     case lir_null_check:
 597       if (GenerateCompilerNullChecks) {
 598         add_debug_info_for_null_check_here(op->info());
 599 
 600         if (op->in_opr()->is_single_cpu()) {
 601           _masm->null_check(op->in_opr()->as_register());
 602         } else {
 603           Unimplemented();
 604         }
 605       }
 606       break;
 607 
 608     case lir_monaddr:
 609       monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr());
 610       break;
 611 
 612 #ifdef SPARC
 613     case lir_pack64:




 288   X86_ONLY(assert(_masm->rsp_offset() == 0, "frame size should be fixed"));
 289 }
 290 
 291 
 292 void LIR_Assembler::emit_lir_list(LIR_List* list) {
 293   peephole(list);
 294 
 295   int n = list->length();
 296   for (int i = 0; i < n; i++) {
 297     LIR_Op* op = list->at(i);
 298 
 299     check_codespace();
 300     CHECK_BAILOUT();
 301 
 302 #ifndef PRODUCT
 303     if (CommentedAssembly) {
 304       // Don't record out every op since that's too verbose.  Print
 305       // branches since they include block and stub names.  Also print
 306       // patching moves since they generate funny looking code.
 307       if (op->code() == lir_branch ||
 308           (op->code() == lir_move && op->as_Op1()->patch_code() != lir_patch_none) ||
 309           (op->code() == lir_leal && op->as_Op1()->patch_code() != lir_patch_none)) {
 310         stringStream st;
 311         op->print_on(&st);
 312         _masm->block_comment(st.as_string());
 313       }
 314     }
 315     if (PrintLIRWithAssembly) {
 316       // print out the LIR operation followed by the resulting assembly
 317       list->at(i)->print(); tty->cr();
 318     }
 319 #endif /* PRODUCT */
 320 
 321     op->emit_code(this);
 322 
 323     if (compilation()->debug_info_recorder()->recording_non_safepoints()) {
 324       process_debug_info(op);
 325     }
 326 
 327 #ifndef PRODUCT
 328     if (PrintLIRWithAssembly) {
 329       _masm->code()->decode();


 574     case lir_ffree:
 575       ffree(op->in_opr()->as_jint());
 576       break;
 577 
 578     case lir_branch:
 579       break;
 580 
 581     case lir_push:
 582       push(op->in_opr());
 583       break;
 584 
 585     case lir_pop:
 586       pop(op->in_opr());
 587       break;
 588 
 589     case lir_neg:
 590       negate(op->in_opr(), op->result_opr());
 591       break;
 592 
 593     case lir_leal:
 594       leal(op->in_opr(), op->result_opr(), op->patch_code(), op->info());
 595       break;
 596 
 597     case lir_null_check:
 598       if (GenerateCompilerNullChecks) {
 599         add_debug_info_for_null_check_here(op->info());
 600 
 601         if (op->in_opr()->is_single_cpu()) {
 602           _masm->null_check(op->in_opr()->as_register());
 603         } else {
 604           Unimplemented();
 605         }
 606       }
 607       break;
 608 
 609     case lir_monaddr:
 610       monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr());
 611       break;
 612 
 613 #ifdef SPARC
 614     case lir_pack64:


< prev index next >