From a37fd0030603daffb63a41fe3d8eed474111e67c Mon Sep 17 00:00:00 2001 From: TheRealMDoerr Date: Mon, 11 Sep 2023 22:59:51 +0200 Subject: [PATCH] Cleanup further Argument constants. --- src/hotspot/cpu/ppc/assembler_ppc.hpp | 7 +------ src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp index fca634e9b3c94..61a5d6425eec6 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp @@ -126,11 +126,6 @@ class Argument { int _number; // The number of the argument. public: enum { - // Only 8 registers may contain integer parameters. - n_register_parameters = 8, - // Can have up to 8 floating registers. - n_float_register_parameters = 8, - // PPC C calling conventions. // The first eight arguments are passed in int regs if they are int. n_int_register_parameters_c = 8, @@ -155,7 +150,7 @@ class Argument { int number() const { return _number; } // Locating register-based arguments: - bool is_register() const { return _number < n_register_parameters; } + bool is_register() const { return _number < n_int_register_parameters_c; } Register as_register() const { assert(is_register(), "must be a register argument"); diff --git a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp index 2b7bc5fcaea4a..da962e193859f 100644 --- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp +++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp @@ -940,14 +940,14 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call, Regist in_bytes(ConstMethod::size_of_parameters_offset()), Rconst_method); if (native_call) { // If we're calling a native method, we reserve space for the worst-case signature - // handler varargs vector, which is max(Argument::n_register_parameters, parameter_count+2). + // handler varargs vector, which is max(Argument::n_int_register_parameters_c, parameter_count+2). // We add two slots to the parameter_count, one for the jni // environment and one for a possible native mirror. Label skip_native_calculate_max_stack; __ addi(Rtop_frame_size, Rsize_of_parameters, 2); - __ cmpwi(CCR0, Rtop_frame_size, Argument::n_register_parameters); + __ cmpwi(CCR0, Rtop_frame_size, Argument::n_int_register_parameters_c); __ bge(CCR0, skip_native_calculate_max_stack); - __ li(Rtop_frame_size, Argument::n_register_parameters); + __ li(Rtop_frame_size, Argument::n_int_register_parameters_c); __ bind(skip_native_calculate_max_stack); __ sldi(Rsize_of_parameters, Rsize_of_parameters, Interpreter::logStackElementSize); __ sldi(Rtop_frame_size, Rtop_frame_size, Interpreter::logStackElementSize); @@ -1339,7 +1339,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // outgoing argument area. // // Not needed on PPC64. - //__ add(SP, SP, Argument::n_register_parameters*BytesPerWord); + //__ add(SP, SP, Argument::n_int_register_parameters_c*BytesPerWord); assert(result_handler_addr->is_nonvolatile(), "result_handler_addr must be in a non-volatile register"); // Save across call to native method.