1 /*
2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
350 , _tmp1(tmp1)
351 , _tmp2(tmp2)
352 , _tmp3(tmp3)
353 , _fast_check(false)
354 , _info_for_patch(NULL)
355 , _info_for_exception(info_for_exception)
356 , _stub(NULL)
357 , _profiled_method(NULL)
358 , _profiled_bci(-1)
359 , _should_profile(false)
360 , _need_null_check(true)
361 {
362 if (code == lir_store_check) {
363 _stub = new ArrayStoreExceptionStub(object, info_for_exception);
364 assert(info_for_exception != NULL, "store_check throws exceptions");
365 } else {
366 ShouldNotReachHere();
367 }
368 }
369
370
371 LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length,
372 LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info)
373 : LIR_Op(lir_arraycopy, LIR_OprFact::illegalOpr, info)
374 , _src(src)
375 , _src_pos(src_pos)
376 , _dst(dst)
377 , _dst_pos(dst_pos)
378 , _length(length)
379 , _tmp(tmp)
380 , _expected_type(expected_type)
381 , _flags(flags) {
382 _stub = new ArrayCopyStub(this);
383 }
384
385 LIR_OpUpdateCRC32::LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)
386 : LIR_Op(lir_updatecrc32, res, NULL)
387 , _crc(crc)
388 , _val(val) {
389 }
841 case lir_checkcast:
842 case lir_store_check: {
843 assert(op->as_OpTypeCheck() != NULL, "must be");
844 LIR_OpTypeCheck* opTypeCheck = (LIR_OpTypeCheck*)op;
845
846 if (opTypeCheck->_info_for_exception) do_info(opTypeCheck->_info_for_exception);
847 if (opTypeCheck->_info_for_patch) do_info(opTypeCheck->_info_for_patch);
848 if (opTypeCheck->_object->is_valid()) do_input(opTypeCheck->_object);
849 if (op->code() == lir_store_check && opTypeCheck->_object->is_valid()) {
850 do_temp(opTypeCheck->_object);
851 }
852 if (opTypeCheck->_array->is_valid()) do_input(opTypeCheck->_array);
853 if (opTypeCheck->_tmp1->is_valid()) do_temp(opTypeCheck->_tmp1);
854 if (opTypeCheck->_tmp2->is_valid()) do_temp(opTypeCheck->_tmp2);
855 if (opTypeCheck->_tmp3->is_valid()) do_temp(opTypeCheck->_tmp3);
856 if (opTypeCheck->_result->is_valid()) do_output(opTypeCheck->_result);
857 do_stub(opTypeCheck->_stub);
858 break;
859 }
860
861 // LIR_OpCompareAndSwap
862 case lir_cas_long:
863 case lir_cas_obj:
864 case lir_cas_int: {
865 assert(op->as_OpCompareAndSwap() != NULL, "must be");
866 LIR_OpCompareAndSwap* opCompareAndSwap = (LIR_OpCompareAndSwap*)op;
867
868 assert(opCompareAndSwap->_addr->is_valid(), "used");
869 assert(opCompareAndSwap->_cmp_value->is_valid(), "used");
870 assert(opCompareAndSwap->_new_value->is_valid(), "used");
871 if (opCompareAndSwap->_info) do_info(opCompareAndSwap->_info);
872 do_input(opCompareAndSwap->_addr);
873 do_temp(opCompareAndSwap->_addr);
874 do_input(opCompareAndSwap->_cmp_value);
875 do_temp(opCompareAndSwap->_cmp_value);
876 do_input(opCompareAndSwap->_new_value);
877 do_temp(opCompareAndSwap->_new_value);
878 if (opCompareAndSwap->_tmp1->is_valid()) do_temp(opCompareAndSwap->_tmp1);
879 if (opCompareAndSwap->_tmp2->is_valid()) do_temp(opCompareAndSwap->_tmp2);
880 if (opCompareAndSwap->_result->is_valid()) do_output(opCompareAndSwap->_result);
1028 masm->append_code_stub(stub());
1029 }
1030 }
1031
1032 void LIR_Op2::emit_code(LIR_Assembler* masm) {
1033 masm->emit_op2(this);
1034 }
1035
1036 void LIR_OpAllocArray::emit_code(LIR_Assembler* masm) {
1037 masm->emit_alloc_array(this);
1038 masm->append_code_stub(stub());
1039 }
1040
1041 void LIR_OpTypeCheck::emit_code(LIR_Assembler* masm) {
1042 masm->emit_opTypeCheck(this);
1043 if (stub()) {
1044 masm->append_code_stub(stub());
1045 }
1046 }
1047
1048 void LIR_OpCompareAndSwap::emit_code(LIR_Assembler* masm) {
1049 masm->emit_compare_and_swap(this);
1050 }
1051
1052 void LIR_Op3::emit_code(LIR_Assembler* masm) {
1053 masm->emit_op3(this);
1054 }
1055
1056 void LIR_OpLock::emit_code(LIR_Assembler* masm) {
1057 masm->emit_lock(this);
1058 if (stub()) {
1059 masm->append_code_stub(stub());
1060 }
1061 if (throw_imse_stub()) {
1062 masm->append_code_stub(throw_imse_stub());
1063 }
1064 }
1065
1066 #ifdef ASSERT
1067 void LIR_OpAssert::emit_code(LIR_Assembler* masm) {
1427 if (profiled_method != NULL) {
1428 c->set_profiled_method(profiled_method);
1429 c->set_profiled_bci(profiled_bci);
1430 c->set_should_profile(true);
1431 }
1432 append(c);
1433 }
1434
1435 void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null) {
1436 if (deoptimize_on_null) {
1437 // Emit an explicit null check and deoptimize if opr is null
1438 CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
1439 cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
1440 branch(lir_cond_equal, T_OBJECT, deopt);
1441 } else {
1442 // Emit an implicit null check
1443 append(new LIR_Op1(lir_null_check, opr, info));
1444 }
1445 }
1446
1447 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1448 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1449 append(new LIR_OpCompareAndSwap(lir_cas_long, addr, cmp_value, new_value, t1, t2, result));
1450 }
1451
1452 void LIR_List::cas_obj(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1453 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1454 append(new LIR_OpCompareAndSwap(lir_cas_obj, addr, cmp_value, new_value, t1, t2, result));
1455 }
1456
1457 void LIR_List::cas_int(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1458 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1459 append(new LIR_OpCompareAndSwap(lir_cas_int, addr, cmp_value, new_value, t1, t2, result));
1460 }
1461
1462
1463 #ifdef PRODUCT
1464
1465 void print_LIR(BlockList* blocks) {
1466 }
1719 case lir_fmaf: s = "fmaf"; break;
1720 // LIR_OpJavaCall
1721 case lir_static_call: s = "static"; break;
1722 case lir_optvirtual_call: s = "optvirtual"; break;
1723 case lir_icvirtual_call: s = "icvirtual"; break;
1724 case lir_virtual_call: s = "virtual"; break;
1725 case lir_dynamic_call: s = "dynamic"; break;
1726 // LIR_OpArrayCopy
1727 case lir_arraycopy: s = "arraycopy"; break;
1728 // LIR_OpUpdateCRC32
1729 case lir_updatecrc32: s = "updatecrc32"; break;
1730 // LIR_OpLock
1731 case lir_lock: s = "lock"; break;
1732 case lir_unlock: s = "unlock"; break;
1733 // LIR_OpDelay
1734 case lir_delay_slot: s = "delay"; break;
1735 // LIR_OpTypeCheck
1736 case lir_instanceof: s = "instanceof"; break;
1737 case lir_checkcast: s = "checkcast"; break;
1738 case lir_store_check: s = "store_check"; break;
1739 // LIR_OpCompareAndSwap
1740 case lir_cas_long: s = "cas_long"; break;
1741 case lir_cas_obj: s = "cas_obj"; break;
1742 case lir_cas_int: s = "cas_int"; break;
1743 // LIR_OpProfileCall
1744 case lir_profile_call: s = "profile_call"; break;
1745 // LIR_OpProfileType
1746 case lir_profile_type: s = "profile_type"; break;
1747 // LIR_OpAssert
1748 #ifdef ASSERT
1749 case lir_assert: s = "assert"; break;
1750 #endif
1751 case lir_none: ShouldNotReachHere();break;
1752 default: s = "illegal_op"; break;
1753 }
1754 return s;
1755 }
1756
1757 // LIR_OpJavaCall
1758 void LIR_OpJavaCall::print_instr(outputStream* out) const {
1961 tmp3()->print(out); out->print(" ");
1962 tmp4()->print(out); out->print(" ");
1963 out->print("[type:0x%x]", type()); out->print(" ");
1964 out->print("[label:" INTPTR_FORMAT "]", p2i(stub()->entry()));
1965 }
1966
1967
1968 void LIR_OpTypeCheck::print_instr(outputStream* out) const {
1969 object()->print(out); out->print(" ");
1970 if (code() == lir_store_check) {
1971 array()->print(out); out->print(" ");
1972 }
1973 if (code() != lir_store_check) {
1974 klass()->print_name_on(out); out->print(" ");
1975 if (fast_check()) out->print("fast_check ");
1976 }
1977 tmp1()->print(out); out->print(" ");
1978 tmp2()->print(out); out->print(" ");
1979 tmp3()->print(out); out->print(" ");
1980 result_opr()->print(out); out->print(" ");
1981 if (info_for_exception() != NULL) out->print(" [bci:%d]", info_for_exception()->stack()->bci());
1982 }
1983
1984
1985 // LIR_Op3
1986 void LIR_Op3::print_instr(outputStream* out) const {
1987 in_opr1()->print(out); out->print(" ");
1988 in_opr2()->print(out); out->print(" ");
1989 in_opr3()->print(out); out->print(" ");
1990 result_opr()->print(out);
1991 }
1992
1993
1994 void LIR_OpLock::print_instr(outputStream* out) const {
1995 hdr_opr()->print(out); out->print(" ");
1996 obj_opr()->print(out); out->print(" ");
1997 lock_opr()->print(out); out->print(" ");
1998 if (_scratch->is_valid()) {
1999 _scratch->print(out); out->print(" ");
2000 }
|
1 /*
2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
350 , _tmp1(tmp1)
351 , _tmp2(tmp2)
352 , _tmp3(tmp3)
353 , _fast_check(false)
354 , _info_for_patch(NULL)
355 , _info_for_exception(info_for_exception)
356 , _stub(NULL)
357 , _profiled_method(NULL)
358 , _profiled_bci(-1)
359 , _should_profile(false)
360 , _need_null_check(true)
361 {
362 if (code == lir_store_check) {
363 _stub = new ArrayStoreExceptionStub(object, info_for_exception);
364 assert(info_for_exception != NULL, "store_check throws exceptions");
365 } else {
366 ShouldNotReachHere();
367 }
368 }
369
370 LIR_OpFlattenedStoreCheck::LIR_OpFlattenedStoreCheck(LIR_Opr object, ciKlass* element_klass,
371 LIR_Opr tmp1, LIR_Opr tmp2,
372 CodeEmitInfo* info_for_exception)
373 : LIR_Op(lir_flattened_store_check, LIR_OprFact::illegalOpr, NULL)
374 , _object(object)
375 , _element_klass(element_klass)
376 , _tmp1(tmp1)
377 , _tmp2(tmp2)
378 , _info_for_exception(info_for_exception)
379 {
380 _stub = new ArrayStoreExceptionStub(object, info_for_exception);
381 }
382
383 LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length,
384 LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info)
385 : LIR_Op(lir_arraycopy, LIR_OprFact::illegalOpr, info)
386 , _src(src)
387 , _src_pos(src_pos)
388 , _dst(dst)
389 , _dst_pos(dst_pos)
390 , _length(length)
391 , _tmp(tmp)
392 , _expected_type(expected_type)
393 , _flags(flags) {
394 _stub = new ArrayCopyStub(this);
395 }
396
397 LIR_OpUpdateCRC32::LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)
398 : LIR_Op(lir_updatecrc32, res, NULL)
399 , _crc(crc)
400 , _val(val) {
401 }
853 case lir_checkcast:
854 case lir_store_check: {
855 assert(op->as_OpTypeCheck() != NULL, "must be");
856 LIR_OpTypeCheck* opTypeCheck = (LIR_OpTypeCheck*)op;
857
858 if (opTypeCheck->_info_for_exception) do_info(opTypeCheck->_info_for_exception);
859 if (opTypeCheck->_info_for_patch) do_info(opTypeCheck->_info_for_patch);
860 if (opTypeCheck->_object->is_valid()) do_input(opTypeCheck->_object);
861 if (op->code() == lir_store_check && opTypeCheck->_object->is_valid()) {
862 do_temp(opTypeCheck->_object);
863 }
864 if (opTypeCheck->_array->is_valid()) do_input(opTypeCheck->_array);
865 if (opTypeCheck->_tmp1->is_valid()) do_temp(opTypeCheck->_tmp1);
866 if (opTypeCheck->_tmp2->is_valid()) do_temp(opTypeCheck->_tmp2);
867 if (opTypeCheck->_tmp3->is_valid()) do_temp(opTypeCheck->_tmp3);
868 if (opTypeCheck->_result->is_valid()) do_output(opTypeCheck->_result);
869 do_stub(opTypeCheck->_stub);
870 break;
871 }
872
873 // LIR_OpFlattenedStoreCheck
874 case lir_flattened_store_check: {
875 assert(op->as_OpFlattenedStoreCheck() != NULL, "must be");
876 LIR_OpFlattenedStoreCheck* opFlattenedStoreCheck = (LIR_OpFlattenedStoreCheck*)op;
877
878 if (opFlattenedStoreCheck->_info_for_exception) do_info(opFlattenedStoreCheck->_info_for_exception);
879 if (opFlattenedStoreCheck->_object->is_valid()) do_temp(opFlattenedStoreCheck->_object);
880 if (opFlattenedStoreCheck->_tmp1->is_valid()) do_temp(opFlattenedStoreCheck->_tmp1);
881 if (opFlattenedStoreCheck->_tmp2->is_valid()) do_temp(opFlattenedStoreCheck->_tmp2);
882 do_stub(opFlattenedStoreCheck->_stub);
883 break;
884 }
885
886 // LIR_OpCompareAndSwap
887 case lir_cas_long:
888 case lir_cas_obj:
889 case lir_cas_int: {
890 assert(op->as_OpCompareAndSwap() != NULL, "must be");
891 LIR_OpCompareAndSwap* opCompareAndSwap = (LIR_OpCompareAndSwap*)op;
892
893 assert(opCompareAndSwap->_addr->is_valid(), "used");
894 assert(opCompareAndSwap->_cmp_value->is_valid(), "used");
895 assert(opCompareAndSwap->_new_value->is_valid(), "used");
896 if (opCompareAndSwap->_info) do_info(opCompareAndSwap->_info);
897 do_input(opCompareAndSwap->_addr);
898 do_temp(opCompareAndSwap->_addr);
899 do_input(opCompareAndSwap->_cmp_value);
900 do_temp(opCompareAndSwap->_cmp_value);
901 do_input(opCompareAndSwap->_new_value);
902 do_temp(opCompareAndSwap->_new_value);
903 if (opCompareAndSwap->_tmp1->is_valid()) do_temp(opCompareAndSwap->_tmp1);
904 if (opCompareAndSwap->_tmp2->is_valid()) do_temp(opCompareAndSwap->_tmp2);
905 if (opCompareAndSwap->_result->is_valid()) do_output(opCompareAndSwap->_result);
1053 masm->append_code_stub(stub());
1054 }
1055 }
1056
1057 void LIR_Op2::emit_code(LIR_Assembler* masm) {
1058 masm->emit_op2(this);
1059 }
1060
1061 void LIR_OpAllocArray::emit_code(LIR_Assembler* masm) {
1062 masm->emit_alloc_array(this);
1063 masm->append_code_stub(stub());
1064 }
1065
1066 void LIR_OpTypeCheck::emit_code(LIR_Assembler* masm) {
1067 masm->emit_opTypeCheck(this);
1068 if (stub()) {
1069 masm->append_code_stub(stub());
1070 }
1071 }
1072
1073 void LIR_OpFlattenedStoreCheck::emit_code(LIR_Assembler* masm) {
1074 masm->emit_opFlattenedStoreCheck(this);
1075 if (stub()) {
1076 masm->append_code_stub(stub());
1077 }
1078 }
1079
1080 void LIR_OpCompareAndSwap::emit_code(LIR_Assembler* masm) {
1081 masm->emit_compare_and_swap(this);
1082 }
1083
1084 void LIR_Op3::emit_code(LIR_Assembler* masm) {
1085 masm->emit_op3(this);
1086 }
1087
1088 void LIR_OpLock::emit_code(LIR_Assembler* masm) {
1089 masm->emit_lock(this);
1090 if (stub()) {
1091 masm->append_code_stub(stub());
1092 }
1093 if (throw_imse_stub()) {
1094 masm->append_code_stub(throw_imse_stub());
1095 }
1096 }
1097
1098 #ifdef ASSERT
1099 void LIR_OpAssert::emit_code(LIR_Assembler* masm) {
1459 if (profiled_method != NULL) {
1460 c->set_profiled_method(profiled_method);
1461 c->set_profiled_bci(profiled_bci);
1462 c->set_should_profile(true);
1463 }
1464 append(c);
1465 }
1466
1467 void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null) {
1468 if (deoptimize_on_null) {
1469 // Emit an explicit null check and deoptimize if opr is null
1470 CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
1471 cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
1472 branch(lir_cond_equal, T_OBJECT, deopt);
1473 } else {
1474 // Emit an implicit null check
1475 append(new LIR_Op1(lir_null_check, opr, info));
1476 }
1477 }
1478
1479 void LIR_List::flattened_store_check(LIR_Opr object, ciKlass* element_klass,
1480 LIR_Opr tmp1, LIR_Opr tmp2,
1481 CodeEmitInfo* info_for_exception) {
1482 LIR_OpFlattenedStoreCheck* c = new LIR_OpFlattenedStoreCheck(object, element_klass, tmp1, tmp2, info_for_exception);
1483 append(c);
1484 }
1485
1486 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1487 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1488 append(new LIR_OpCompareAndSwap(lir_cas_long, addr, cmp_value, new_value, t1, t2, result));
1489 }
1490
1491 void LIR_List::cas_obj(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1492 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1493 append(new LIR_OpCompareAndSwap(lir_cas_obj, addr, cmp_value, new_value, t1, t2, result));
1494 }
1495
1496 void LIR_List::cas_int(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
1497 LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
1498 append(new LIR_OpCompareAndSwap(lir_cas_int, addr, cmp_value, new_value, t1, t2, result));
1499 }
1500
1501
1502 #ifdef PRODUCT
1503
1504 void print_LIR(BlockList* blocks) {
1505 }
1758 case lir_fmaf: s = "fmaf"; break;
1759 // LIR_OpJavaCall
1760 case lir_static_call: s = "static"; break;
1761 case lir_optvirtual_call: s = "optvirtual"; break;
1762 case lir_icvirtual_call: s = "icvirtual"; break;
1763 case lir_virtual_call: s = "virtual"; break;
1764 case lir_dynamic_call: s = "dynamic"; break;
1765 // LIR_OpArrayCopy
1766 case lir_arraycopy: s = "arraycopy"; break;
1767 // LIR_OpUpdateCRC32
1768 case lir_updatecrc32: s = "updatecrc32"; break;
1769 // LIR_OpLock
1770 case lir_lock: s = "lock"; break;
1771 case lir_unlock: s = "unlock"; break;
1772 // LIR_OpDelay
1773 case lir_delay_slot: s = "delay"; break;
1774 // LIR_OpTypeCheck
1775 case lir_instanceof: s = "instanceof"; break;
1776 case lir_checkcast: s = "checkcast"; break;
1777 case lir_store_check: s = "store_check"; break;
1778 // LIR_OpFlattenedStoreCheck
1779 case lir_flattened_store_check: s = "flattened_store_check"; break;
1780 // LIR_OpCompareAndSwap
1781 case lir_cas_long: s = "cas_long"; break;
1782 case lir_cas_obj: s = "cas_obj"; break;
1783 case lir_cas_int: s = "cas_int"; break;
1784 // LIR_OpProfileCall
1785 case lir_profile_call: s = "profile_call"; break;
1786 // LIR_OpProfileType
1787 case lir_profile_type: s = "profile_type"; break;
1788 // LIR_OpAssert
1789 #ifdef ASSERT
1790 case lir_assert: s = "assert"; break;
1791 #endif
1792 case lir_none: ShouldNotReachHere();break;
1793 default: s = "illegal_op"; break;
1794 }
1795 return s;
1796 }
1797
1798 // LIR_OpJavaCall
1799 void LIR_OpJavaCall::print_instr(outputStream* out) const {
2002 tmp3()->print(out); out->print(" ");
2003 tmp4()->print(out); out->print(" ");
2004 out->print("[type:0x%x]", type()); out->print(" ");
2005 out->print("[label:" INTPTR_FORMAT "]", p2i(stub()->entry()));
2006 }
2007
2008
2009 void LIR_OpTypeCheck::print_instr(outputStream* out) const {
2010 object()->print(out); out->print(" ");
2011 if (code() == lir_store_check) {
2012 array()->print(out); out->print(" ");
2013 }
2014 if (code() != lir_store_check) {
2015 klass()->print_name_on(out); out->print(" ");
2016 if (fast_check()) out->print("fast_check ");
2017 }
2018 tmp1()->print(out); out->print(" ");
2019 tmp2()->print(out); out->print(" ");
2020 tmp3()->print(out); out->print(" ");
2021 result_opr()->print(out); out->print(" ");
2022 if (info_for_exception() != NULL) out->print(" [bci:%d]", info_for_exception()->stack()->bci());
2023 }
2024
2025 void LIR_OpFlattenedStoreCheck::print_instr(outputStream* out) const {
2026 object()->print(out); out->print(" ");
2027 element_klass()->print_name_on(out); out->print(" ");
2028 tmp1()->print(out); out->print(" ");
2029 tmp2()->print(out); out->print(" ");
2030 if (info_for_exception() != NULL) out->print(" [bci:%d]", info_for_exception()->stack()->bci());
2031 }
2032
2033
2034 // LIR_Op3
2035 void LIR_Op3::print_instr(outputStream* out) const {
2036 in_opr1()->print(out); out->print(" ");
2037 in_opr2()->print(out); out->print(" ");
2038 in_opr3()->print(out); out->print(" ");
2039 result_opr()->print(out);
2040 }
2041
2042
2043 void LIR_OpLock::print_instr(outputStream* out) const {
2044 hdr_opr()->print(out); out->print(" ");
2045 obj_opr()->print(out); out->print(" ");
2046 lock_opr()->print(out); out->print(" ");
2047 if (_scratch->is_valid()) {
2048 _scratch->print(out); out->print(" ");
2049 }
|