501 break;
502 }
503
504
505 // LIR_OpLabel
506 case lir_label: // result and info always invalid
507 {
508 assert(op->as_OpLabel() != NULL, "must be");
509 assert(op->_info == NULL, "info not used by this instruction");
510 assert(op->_result->is_illegal(), "not used");
511 break;
512 }
513
514
515 // LIR_Op1
516 case lir_fxch: // input always valid, result and info always invalid
517 case lir_fld: // input always valid, result and info always invalid
518 case lir_ffree: // input always valid, result and info always invalid
519 case lir_push: // input always valid, result and info always invalid
520 case lir_pop: // input always valid, result and info always invalid
521 case lir_return: // input always valid, result and info always invalid
522 case lir_leal: // input and result always valid, info always invalid
523 case lir_neg: // input and result always valid, info always invalid
524 case lir_monaddr: // input and result always valid, info always invalid
525 case lir_null_check: // input and info always valid, result always invalid
526 case lir_move: // input and result always valid, may have info
527 case lir_pack64: // input and result always valid
528 case lir_unpack64: // input and result always valid
529 {
530 assert(op->as_Op1() != NULL, "must be");
531 LIR_Op1* op1 = (LIR_Op1*)op;
532
533 if (op1->_info) do_info(op1->_info);
534 if (op1->_opr->is_valid()) do_input(op1->_opr);
535 if (op1->_result->is_valid()) do_output(op1->_result);
536
537 break;
538 }
539
540 case lir_safepoint:
541 {
542 assert(op->as_Op1() != NULL, "must be");
543 LIR_Op1* op1 = (LIR_Op1*)op;
544
545 assert(op1->_info != NULL, ""); do_info(op1->_info);
546 if (op1->_opr->is_valid()) do_temp(op1->_opr); // safepoints on SPARC need temporary register
547 assert(op1->_result->is_illegal(), "safepoint does not produce value");
548
549 break;
550 }
551
552 // LIR_OpConvert;
553 case lir_convert: // input and result always valid, info always invalid
554 {
555 assert(op->as_OpConvert() != NULL, "must be");
556 LIR_OpConvert* opConvert = (LIR_OpConvert*)op;
557
558 assert(opConvert->_info == NULL, "must be");
559 if (opConvert->_opr->is_valid()) do_input(opConvert->_opr);
560 if (opConvert->_result->is_valid()) do_output(opConvert->_result);
561 #ifdef PPC
562 if (opConvert->_tmp1->is_valid()) do_temp(opConvert->_tmp1);
563 if (opConvert->_tmp2->is_valid()) do_temp(opConvert->_tmp2);
564 #endif
565 do_stub(opConvert->_stub);
566
567 break;
568 }
1510 }
1511 append(c);
1512 }
1513
1514
1515 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1516 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1517 append(new LIR_OpCompareAndSwap(lir_cas_long, addr, cmp_value, new_value, t1, t2, result));
1518 }
1519
1520 void LIR_List::cas_obj(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1521 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1522 append(new LIR_OpCompareAndSwap(lir_cas_obj, addr, cmp_value, new_value, t1, t2, result));
1523 }
1524
1525 void LIR_List::cas_int(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1526 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1527 append(new LIR_OpCompareAndSwap(lir_cas_int, addr, cmp_value, new_value, t1, t2, result));
1528 }
1529
1530
1531 #ifdef PRODUCT
1532
1533 void print_LIR(BlockList* blocks) {
1534 }
1535
1536 #else
1537 // LIR_OprDesc
1538 void LIR_OprDesc::print() const {
1539 print(tty);
1540 }
1541
1542 void LIR_OprDesc::print(outputStream* out) const {
1543 if (is_illegal()) {
1544 return;
1545 }
1546
1547 out->print("[");
1548 if (is_pointer()) {
1549 pointer()->print_value_on(out);
|
501 break;
502 }
503
504
505 // LIR_OpLabel
506 case lir_label: // result and info always invalid
507 {
508 assert(op->as_OpLabel() != NULL, "must be");
509 assert(op->_info == NULL, "info not used by this instruction");
510 assert(op->_result->is_illegal(), "not used");
511 break;
512 }
513
514
515 // LIR_Op1
516 case lir_fxch: // input always valid, result and info always invalid
517 case lir_fld: // input always valid, result and info always invalid
518 case lir_ffree: // input always valid, result and info always invalid
519 case lir_push: // input always valid, result and info always invalid
520 case lir_pop: // input always valid, result and info always invalid
521 case lir_leal: // input and result always valid, info always invalid
522 case lir_neg: // input and result always valid, info always invalid
523 case lir_monaddr: // input and result always valid, info always invalid
524 case lir_null_check: // input and info always valid, result always invalid
525 case lir_move: // input and result always valid, may have info
526 case lir_pack64: // input and result always valid
527 case lir_unpack64: // input and result always valid
528 {
529 assert(op->as_Op1() != NULL, "must be");
530 LIR_Op1* op1 = (LIR_Op1*)op;
531
532 if (op1->_info) do_info(op1->_info);
533 if (op1->_opr->is_valid()) do_input(op1->_opr);
534 if (op1->_result->is_valid()) do_output(op1->_result);
535
536 break;
537 }
538
539 case lir_return: // input always valid, result and info always invalid
540 {
541 assert(op->as_Op1Safepoint() != NULL, "must be");
542 LIR_Op1Safepoint* op_ret = (LIR_Op1Safepoint*)op;
543
544 if (op_ret->_info) do_info(op_ret->_info);
545 if (op_ret->_opr->is_valid()) do_input(op_ret->_opr);
546 if (op_ret->_result->is_valid()) do_output(op_ret->_result);
547
548 if (op_ret->tls_stub() != NULL) do_stub(op_ret->tls_stub());
549
550 break;
551 }
552
553 case lir_safepoint:
554 {
555 assert(op->as_Op1Safepoint() != NULL, "must be");
556 LIR_Op1Safepoint* op1 = (LIR_Op1Safepoint*)op;
557
558 assert(op1->_info != NULL, ""); do_info(op1->_info);
559 if (op1->_opr->is_valid()) do_temp(op1->_opr); // safepoints on SPARC need temporary register
560 assert(op1->_result->is_illegal(), "safepoint does not produce value");
561
562 if (op1->tls_stub() != NULL) do_stub(op1->tls_stub());
563
564 break;
565 }
566
567 // LIR_OpConvert;
568 case lir_convert: // input and result always valid, info always invalid
569 {
570 assert(op->as_OpConvert() != NULL, "must be");
571 LIR_OpConvert* opConvert = (LIR_OpConvert*)op;
572
573 assert(opConvert->_info == NULL, "must be");
574 if (opConvert->_opr->is_valid()) do_input(opConvert->_opr);
575 if (opConvert->_result->is_valid()) do_output(opConvert->_result);
576 #ifdef PPC
577 if (opConvert->_tmp1->is_valid()) do_temp(opConvert->_tmp1);
578 if (opConvert->_tmp2->is_valid()) do_temp(opConvert->_tmp2);
579 #endif
580 do_stub(opConvert->_stub);
581
582 break;
583 }
1525 }
1526 append(c);
1527 }
1528
1529
1530 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1531 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1532 append(new LIR_OpCompareAndSwap(lir_cas_long, addr, cmp_value, new_value, t1, t2, result));
1533 }
1534
1535 void LIR_List::cas_obj(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1536 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1537 append(new LIR_OpCompareAndSwap(lir_cas_obj, addr, cmp_value, new_value, t1, t2, result));
1538 }
1539
1540 void LIR_List::cas_int(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1541 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1542 append(new LIR_OpCompareAndSwap(lir_cas_int, addr, cmp_value, new_value, t1, t2, result));
1543 }
1544
1545 // LIR_Op1Safepoint
1546 LIR_Op1Safepoint::LIR_Op1Safepoint(LIR_Code code, LIR_Opr opr, CodeEmitInfo* info)
1547 : LIR_Op1(code, opr, info)
1548 , _tls_stub(NULL) {
1549 if (ThreadLocalSafepoints) {
1550 _tls_stub = new C1ThreadLocalSafepoint(code == lir_return);
1551 }
1552 }
1553
1554 #ifdef PRODUCT
1555
1556 void print_LIR(BlockList* blocks) {
1557 }
1558
1559 #else
1560 // LIR_OprDesc
1561 void LIR_OprDesc::print() const {
1562 print(tty);
1563 }
1564
1565 void LIR_OprDesc::print(outputStream* out) const {
1566 if (is_illegal()) {
1567 return;
1568 }
1569
1570 out->print("[");
1571 if (is_pointer()) {
1572 pointer()->print_value_on(out);
|