< prev index next >

src/hotspot/cpu/s390/s390.ad

Print this page
rev 50942 : 8206459: [s390] Prevent restoring incorrect bcp and locals in interpreter and avoid incorrect size of partialSubtypeCheckNode in C2
Reviewed-by:


9822 // Die now.
9823 instruct ShouldNotReachHere() %{
9824   match(Halt);
9825   ins_cost(CALL_COST);
9826   size(2);
9827   format %{ "ILLTRAP; ShouldNotReachHere" %}
9828   ins_encode %{ __ z_illtrap(); %}
9829   ins_pipe(pipe_class_dummy);
9830 %}
9831 
9832 // ============================================================================
9833 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
9834 // array for an instance of the superklass. Set a hidden internal cache on a
9835 // hit (cache is checked with exposed code in gen_subtype_check()). Return
9836 // not zero for a miss or zero for a hit. The encoding ALSO sets flags.
9837 instruct partialSubtypeCheck(rarg1RegP index, rarg2RegP sub, rarg3RegP super, flagsReg pcc,
9838                              rarg4RegP scratch1, rarg5RegP scratch2) %{
9839   match(Set index (PartialSubtypeCheck sub super));
9840   effect(KILL pcc, KILL scratch1, KILL scratch2);
9841   ins_cost(10 * DEFAULT_COST);
9842   size(12);
9843   format %{ "  CALL   PartialSubtypeCheck\n" %}
9844   ins_encode %{
9845     AddressLiteral stub_address(StubRoutines::zarch::partial_subtype_check());
9846     __ load_const_optimized(Z_ARG4, stub_address);
9847     __ z_basr(Z_R14, Z_ARG4);
9848   %}
9849   ins_pipe(pipe_class_dummy);
9850 %}
9851 
9852 instruct partialSubtypeCheck_vs_zero(flagsReg pcc, rarg2RegP sub, rarg3RegP super, immP0 zero,
9853                                      rarg1RegP index, rarg4RegP scratch1, rarg5RegP scratch2) %{
9854   match(Set pcc (CmpI (PartialSubtypeCheck sub super) zero));
9855   effect(KILL scratch1, KILL scratch2, KILL index);
9856   ins_cost(10 * DEFAULT_COST);
9857   // TODO: s390 port size(FIXED_SIZE);
9858   format %{ "CALL   PartialSubtypeCheck_vs_zero\n" %}
9859   ins_encode %{
9860     AddressLiteral stub_address(StubRoutines::zarch::partial_subtype_check());
9861     __ load_const_optimized(Z_ARG4, stub_address);
9862     __ z_basr(Z_R14, Z_ARG4);




9822 // Die now.
9823 instruct ShouldNotReachHere() %{
9824   match(Halt);
9825   ins_cost(CALL_COST);
9826   size(2);
9827   format %{ "ILLTRAP; ShouldNotReachHere" %}
9828   ins_encode %{ __ z_illtrap(); %}
9829   ins_pipe(pipe_class_dummy);
9830 %}
9831 
9832 // ============================================================================
9833 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass
9834 // array for an instance of the superklass. Set a hidden internal cache on a
9835 // hit (cache is checked with exposed code in gen_subtype_check()). Return
9836 // not zero for a miss or zero for a hit. The encoding ALSO sets flags.
9837 instruct partialSubtypeCheck(rarg1RegP index, rarg2RegP sub, rarg3RegP super, flagsReg pcc,
9838                              rarg4RegP scratch1, rarg5RegP scratch2) %{
9839   match(Set index (PartialSubtypeCheck sub super));
9840   effect(KILL pcc, KILL scratch1, KILL scratch2);
9841   ins_cost(10 * DEFAULT_COST);
9842   // TODO: s390 port size(FIXED_SIZE);
9843   format %{ "  CALL   PartialSubtypeCheck\n" %}
9844   ins_encode %{
9845     AddressLiteral stub_address(StubRoutines::zarch::partial_subtype_check());
9846     __ load_const_optimized(Z_ARG4, stub_address);
9847     __ z_basr(Z_R14, Z_ARG4);
9848   %}
9849   ins_pipe(pipe_class_dummy);
9850 %}
9851 
9852 instruct partialSubtypeCheck_vs_zero(flagsReg pcc, rarg2RegP sub, rarg3RegP super, immP0 zero,
9853                                      rarg1RegP index, rarg4RegP scratch1, rarg5RegP scratch2) %{
9854   match(Set pcc (CmpI (PartialSubtypeCheck sub super) zero));
9855   effect(KILL scratch1, KILL scratch2, KILL index);
9856   ins_cost(10 * DEFAULT_COST);
9857   // TODO: s390 port size(FIXED_SIZE);
9858   format %{ "CALL   PartialSubtypeCheck_vs_zero\n" %}
9859   ins_encode %{
9860     AddressLiteral stub_address(StubRoutines::zarch::partial_subtype_check());
9861     __ load_const_optimized(Z_ARG4, stub_address);
9862     __ z_basr(Z_R14, Z_ARG4);


< prev index next >