< prev index next >

src/cpu/s390/vm/templateTable_s390.cpp

Print this page
rev 12273 : 8169317: [s390] Various minor bug fixes and adaptions.


3814   }
3815 
3816   // slow case
3817   __ bind(slow_case);
3818   __ get_constant_pool(Z_ARG2);
3819   __ get_2_byte_integer_at_bcp(Z_ARG3/*dest*/, 1, InterpreterMacroAssembler::Unsigned);
3820   call_VM(Z_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), Z_ARG2, Z_ARG3);
3821   __ verify_oop(Z_tos);
3822 
3823   // continue
3824   __ bind(done);
3825 
3826   BLOCK_COMMENT("} TemplateTable::_new");
3827 }
3828 
3829 void TemplateTable::newarray() {
3830   transition(itos, atos);
3831 
3832   // Call runtime.
3833   __ z_llgc(Z_ARG2, at_bcp(1));   // type
3834   // size in Z_tos
3835   call_VM(Z_RET,
3836           CAST_FROM_FN_PTR(address, InterpreterRuntime::newarray),
3837           Z_ARG2, Z_tos);
3838 }
3839 
3840 void TemplateTable::anewarray() {
3841   transition(itos, atos);
3842   __ get_2_byte_integer_at_bcp(Z_ARG3, 1, InterpreterMacroAssembler::Unsigned);
3843   __ get_constant_pool(Z_ARG2);
3844   __ z_llgfr(Z_ARG4, Z_tos);
3845   call_VM(Z_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::anewarray),
3846           Z_ARG2, Z_ARG3, Z_ARG4);
3847 }
3848 
3849 void TemplateTable::arraylength() {
3850   transition(atos, itos);
3851 
3852   int offset = arrayOopDesc::length_offset_in_bytes();
3853 
3854   __ null_check(Z_tos, Z_R0_scratch, offset);
3855   __ mem2reg_opt(Z_tos, Address(Z_tos, offset), false);
3856 }
3857 
3858 void TemplateTable::checkcast() {
3859   transition(atos, atos);
3860 
3861   NearLabel done, is_null, ok_is_subtype, quicked, resolved;
3862 
3863   BLOCK_COMMENT("checkcast {");
3864   // If object is NULL, we are almost done.




3814   }
3815 
3816   // slow case
3817   __ bind(slow_case);
3818   __ get_constant_pool(Z_ARG2);
3819   __ get_2_byte_integer_at_bcp(Z_ARG3/*dest*/, 1, InterpreterMacroAssembler::Unsigned);
3820   call_VM(Z_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), Z_ARG2, Z_ARG3);
3821   __ verify_oop(Z_tos);
3822 
3823   // continue
3824   __ bind(done);
3825 
3826   BLOCK_COMMENT("} TemplateTable::_new");
3827 }
3828 
3829 void TemplateTable::newarray() {
3830   transition(itos, atos);
3831 
3832   // Call runtime.
3833   __ z_llgc(Z_ARG2, at_bcp(1));   // type
3834   __ z_lgfr(Z_ARG3, Z_tos);       // size
3835   call_VM(Z_RET,
3836           CAST_FROM_FN_PTR(address, InterpreterRuntime::newarray),
3837           Z_ARG2, Z_ARG3);
3838 }
3839 
3840 void TemplateTable::anewarray() {
3841   transition(itos, atos);
3842   __ get_2_byte_integer_at_bcp(Z_ARG3, 1, InterpreterMacroAssembler::Unsigned);
3843   __ get_constant_pool(Z_ARG2);
3844   __ z_lgfr(Z_ARG4, Z_tos);
3845   call_VM(Z_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::anewarray),
3846           Z_ARG2, Z_ARG3, Z_ARG4);
3847 }
3848 
3849 void TemplateTable::arraylength() {
3850   transition(atos, itos);
3851 
3852   int offset = arrayOopDesc::length_offset_in_bytes();
3853 
3854   __ null_check(Z_tos, Z_R0_scratch, offset);
3855   __ mem2reg_opt(Z_tos, Address(Z_tos, offset), false);
3856 }
3857 
3858 void TemplateTable::checkcast() {
3859   transition(atos, atos);
3860 
3861   NearLabel done, is_null, ok_is_subtype, quicked, resolved;
3862 
3863   BLOCK_COMMENT("checkcast {");
3864   // If object is NULL, we are almost done.


< prev index next >