8199604_cardtablemodrefbs_rename
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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_Compilation.hpp"
27 #include "c1/c1_LIRAssembler.hpp"
28 #include "c1/c1_MacroAssembler.hpp"
29 #include "c1/c1_Runtime1.hpp"
30 #include "c1/c1_ValueStack.hpp"
31 #include "ci/ciArrayKlass.hpp"
32 #include "ci/ciInstance.hpp"
33 #include "gc/shared/collectedHeap.hpp"
34 #include "gc/shared/barrierSet.hpp"
35 #include "gc/shared/cardTableModRefBS.hpp"
36 #include "nativeInst_s390.hpp"
37 #include "oops/objArrayKlass.hpp"
38 #include "runtime/safepointMechanism.inline.hpp"
39 #include "runtime/sharedRuntime.hpp"
40 #include "vmreg_s390.inline.hpp"
41
42 #define __ _masm->
43
44 #ifndef PRODUCT
45 #undef __
46 #define __ (Verbose ? (_masm->block_comment(FILE_AND_LINE),_masm) : _masm)->
47 #endif
48
49 //------------------------------------------------------------
50
51 bool LIR_Assembler::is_small_constant(LIR_Opr opr) {
52 // Not used on ZARCH_64
53 ShouldNotCallThis();
54 return false;
|
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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "c1/c1_Compilation.hpp"
27 #include "c1/c1_LIRAssembler.hpp"
28 #include "c1/c1_MacroAssembler.hpp"
29 #include "c1/c1_Runtime1.hpp"
30 #include "c1/c1_ValueStack.hpp"
31 #include "ci/ciArrayKlass.hpp"
32 #include "ci/ciInstance.hpp"
33 #include "gc/shared/collectedHeap.hpp"
34 #include "gc/shared/barrierSet.hpp"
35 #include "gc/shared/cardTableBarrierSet.hpp"
36 #include "nativeInst_s390.hpp"
37 #include "oops/objArrayKlass.hpp"
38 #include "runtime/safepointMechanism.inline.hpp"
39 #include "runtime/sharedRuntime.hpp"
40 #include "vmreg_s390.inline.hpp"
41
42 #define __ _masm->
43
44 #ifndef PRODUCT
45 #undef __
46 #define __ (Verbose ? (_masm->block_comment(FILE_AND_LINE),_masm) : _masm)->
47 #endif
48
49 //------------------------------------------------------------
50
51 bool LIR_Assembler::is_small_constant(LIR_Opr opr) {
52 // Not used on ZARCH_64
53 ShouldNotCallThis();
54 return false;
|
613 case T_LONG: // fall through
614 case T_DOUBLE:
615 lmem = 8; lcon = 8; cbits = (int64_t)(c->as_jlong_bits());
616 break;
617
618 case T_BOOLEAN: // fall through
619 case T_BYTE:
620 lmem = 1; lcon = 1; cbits = (int8_t)(c->as_jint());
621 break;
622
623 case T_CHAR: // fall through
624 case T_SHORT:
625 lmem = 2; lcon = 2; cbits = (int16_t)(c->as_jint());
626 break;
627
628 default:
629 ShouldNotReachHere();
630 };
631
632 // Index register is normally not supported, but for
633 // LIRGenerator::CardTableModRef_post_barrier we make an exception.
634 if (type == T_BYTE && dest->as_address_ptr()->index()->is_valid()) {
635 __ load_const_optimized(Z_R0_scratch, (int8_t)(c->as_jint()));
636 store_offset = __ offset();
637 if (Immediate::is_uimm12(addr.disp())) {
638 __ z_stc(Z_R0_scratch, addr);
639 } else {
640 __ z_stcy(Z_R0_scratch, addr);
641 }
642 }
643
644 if (store_offset == -1) {
645 store_offset = __ store_const(addr, cbits, lmem, lcon);
646 assert(store_offset >= 0, "check");
647 }
648
649 if (info != NULL) {
650 add_debug_info_for_null_check(store_offset, info);
651 }
652 }
|
613 case T_LONG: // fall through
614 case T_DOUBLE:
615 lmem = 8; lcon = 8; cbits = (int64_t)(c->as_jlong_bits());
616 break;
617
618 case T_BOOLEAN: // fall through
619 case T_BYTE:
620 lmem = 1; lcon = 1; cbits = (int8_t)(c->as_jint());
621 break;
622
623 case T_CHAR: // fall through
624 case T_SHORT:
625 lmem = 2; lcon = 2; cbits = (int16_t)(c->as_jint());
626 break;
627
628 default:
629 ShouldNotReachHere();
630 };
631
632 // Index register is normally not supported, but for
633 // LIRGenerator::CardTableBarrierSet_post_barrier we make an exception.
634 if (type == T_BYTE && dest->as_address_ptr()->index()->is_valid()) {
635 __ load_const_optimized(Z_R0_scratch, (int8_t)(c->as_jint()));
636 store_offset = __ offset();
637 if (Immediate::is_uimm12(addr.disp())) {
638 __ z_stc(Z_R0_scratch, addr);
639 } else {
640 __ z_stcy(Z_R0_scratch, addr);
641 }
642 }
643
644 if (store_offset == -1) {
645 store_offset = __ store_const(addr, cbits, lmem, lcon);
646 assert(store_offset >= 0, "check");
647 }
648
649 if (info != NULL) {
650 add_debug_info_for_null_check(store_offset, info);
651 }
652 }
|