Skip to content

Commit e2cd70a

Browse files
committedMar 27, 2025
8351151: Clean up x86 template interpreter after 32-bit x86 removal
Reviewed-by: coleenp, fparain, vlivanov
1 parent b990780 commit e2cd70a

15 files changed

+125
-1163
lines changed
 

‎src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -1401,9 +1401,6 @@ void InterpreterMacroAssembler::_interp_verify_oop(Register reg, TosState state,
14011401
}
14021402
}
14031403

1404-
void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { ; }
1405-
1406-
14071404
void InterpreterMacroAssembler::notify_method_entry() {
14081405
// Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
14091406
// track stack depth. If it is possible to enter interp_only_mode we add

‎src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
303303
// only if +VerifyOops && state == atos
304304
#define interp_verify_oop(reg, state) _interp_verify_oop(reg, state, __FILE__, __LINE__);
305305
void _interp_verify_oop(Register reg, TosState state, const char* file, int line);
306-
// only if +VerifyFPU && (state == ftos || state == dtos)
307-
void verify_FPU(int stack_depth, TosState state = ftos);
308306

309307
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
310308

‎src/hotspot/cpu/arm/interp_masm_arm.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
198198
// Debugging
199199
void interp_verify_oop(Register reg, TosState state, const char* file, int line); // only if +VerifyOops && state == atos
200200

201-
void verify_FPU(int stack_depth, TosState state = ftos) {
202-
// No VFP state verification is required for ARM
203-
}
204-
205201
// Object locking
206202
void lock_object (Register lock_reg);
207203
void unlock_object(Register lock_reg);

‎src/hotspot/cpu/ppc/interp_masm_ppc.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
265265
// Debugging
266266
void verify_oop(Register reg, TosState state = atos); // only if +VerifyOops && state == atos
267267
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
268-
void verify_FPU(int stack_depth, TosState state = ftos);
269268

270269
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
271270

‎src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -2381,12 +2381,6 @@ static bool verify_return_address(Method* m, int bci) {
23812381
return false;
23822382
}
23832383

2384-
void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
2385-
if (VerifyFPU) {
2386-
unimplemented("verfiyFPU");
2387-
}
2388-
}
2389-
23902384
void InterpreterMacroAssembler::verify_oop_or_return_address(Register reg, Register Rtmp) {
23912385
if (!VerifyOops) return;
23922386

‎src/hotspot/cpu/riscv/interp_masm_riscv.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1431,8 +1431,6 @@ void InterpreterMacroAssembler::profile_switch_case(Register index,
14311431
}
14321432
}
14331433

1434-
void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { ; }
1435-
14361434
void InterpreterMacroAssembler::notify_method_entry() {
14371435
// Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
14381436
// track stack depth. If it is possible to enter interp_only_mode we add

‎src/hotspot/cpu/riscv/interp_masm_riscv.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
284284
void profile_return_type(Register mdp, Register ret, Register tmp);
285285
void profile_parameters_type(Register mdp, Register tmp1, Register tmp2, Register tmp3);
286286

287-
// Debugging
288-
// only if +VerifyFPU && (state == ftos || state == dtos)
289-
void verify_FPU(int stack_depth, TosState state = ftos);
290-
291287
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
292288

293289
// support for jvmti/dtrace

‎src/hotspot/cpu/s390/interp_masm_s390.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ void InterpreterMacroAssembler::dispatch_next(TosState state, int bcp_incr, bool
9393
// Dispatch value in Lbyte_code and increment Lbcp.
9494

9595
void InterpreterMacroAssembler::dispatch_base(TosState state, address* table, bool generate_poll) {
96-
verify_FPU(1, state);
97-
9896
#ifdef ASSERT
9997
address reentry = nullptr;
10098
{ Label OK;
@@ -2189,9 +2187,3 @@ void InterpreterMacroAssembler::pop_interpreter_frame(Register return_pc, Regist
21892187
z_stg(Z_ARG3, _z_parent_ijava_frame_abi(return_pc), Z_SP);
21902188
#endif
21912189
}
2192-
2193-
void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
2194-
if (VerifyFPU) {
2195-
unimplemented("verifyFPU");
2196-
}
2197-
}

‎src/hotspot/cpu/s390/interp_masm_s390.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
313313
// Debugging
314314
void verify_oop(Register reg, TosState state = atos); // Only if +VerifyOops && state == atos.
315315
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
316-
void verify_FPU(int stack_depth, TosState state = ftos);
317316

318317
// JVMTI helpers
319318
void skip_if_jvmti_mode(Label &Lskip, Register Rscratch = Z_R0);

‎src/hotspot/cpu/x86/interp_masm_x86.cpp

+27-261
Large diffs are not rendered by default.

‎src/hotspot/cpu/x86/interp_masm_x86.hpp

+2-18
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
5353

5454
public:
5555
InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code),
56-
_locals_register(LP64_ONLY(r14) NOT_LP64(rdi)),
57-
_bcp_register(LP64_ONLY(r13) NOT_LP64(rsi)) {}
56+
_locals_register(r14),
57+
_bcp_register(r13) {}
5858

5959
void jump_to_entry(address entry);
6060

@@ -121,9 +121,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
121121
Register cpool, // the constant pool (corrupted on return)
122122
Register index); // the constant pool index (corrupted on return)
123123

124-
NOT_LP64(void f2ieee();) // truncate ftos to 32bits
125-
NOT_LP64(void d2ieee();) // truncate dtos to 64bits
126-
127124
// Expression stack
128125
void pop_ptr(Register r = rax);
129126
void pop_i(Register r = rax);
@@ -143,18 +140,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
143140
void pop_f(XMMRegister r);
144141
void pop_d(XMMRegister r);
145142
void push_d(XMMRegister r);
146-
#ifdef _LP64
147143
void pop_l(Register r = rax);
148144
void push_l(Register r = rax);
149-
#else
150-
void pop_l(Register lo = rax, Register hi = rdx);
151-
void pop_f();
152-
void pop_d();
153-
154-
void push_l(Register lo = rax, Register hi = rdx);
155-
void push_d();
156-
void push_f();
157-
#endif // _LP64
158145

159146
void pop(Register r) { ((MacroAssembler*)this)->pop(r); }
160147
void push(Register r) { ((MacroAssembler*)this)->push(r); }
@@ -168,7 +155,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
168155
lea(rsp, Address(rbp, rcx, Address::times_ptr));
169156
// null last_sp until next java call
170157
movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
171-
NOT_LP64(empty_FPU_stack());
172158
}
173159

174160
// Helpers for swap and dup
@@ -273,8 +259,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
273259
// only if +VerifyOops && state == atos
274260
#define interp_verify_oop(reg, state) _interp_verify_oop(reg, state, __FILE__, __LINE__);
275261
void _interp_verify_oop(Register reg, TosState state, const char* file, int line);
276-
// only if +VerifyFPU && (state == ftos || state == dtos)
277-
void verify_FPU(int stack_depth, TosState state = ftos);
278262

279263
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
280264

‎src/hotspot/cpu/x86/interpreterRT_x86.hpp

-7
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,18 @@
3333
class SignatureHandlerGenerator: public NativeSignatureIterator {
3434
private:
3535
MacroAssembler* _masm;
36-
#ifdef AMD64
3736
#ifdef _WIN64
3837
unsigned int _num_args;
3938
#else
4039
unsigned int _num_fp_args;
4140
unsigned int _num_int_args;
4241
#endif // _WIN64
4342
int _stack_offset;
44-
#else
45-
void move(int from_offset, int to_offset);
46-
void box(int from_offset, int to_offset);
47-
#endif // AMD64
4843

4944
void pass_int();
5045
void pass_long();
5146
void pass_float();
52-
#ifdef AMD64
5347
void pass_double();
54-
#endif // AMD64
5548
void pass_object();
5649

5750
public:

‎src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

+34-271
Large diffs are not rendered by default.

‎src/hotspot/cpu/x86/templateTable_x86.cpp

+62-574
Large diffs are not rendered by default.

‎src/hotspot/share/interpreter/templateInterpreterGenerator.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ void TemplateInterpreterGenerator::generate_and_dispatch(Template* t, TosState t
371371
if (PrintBytecodePairHistogram) histogram_bytecode_pair(t);
372372
if (TraceBytecodes) trace_bytecode(t);
373373
if (StopInterpreterAt > 0) stop_interpreter_at();
374-
__ verify_FPU(1, t->tos_in());
375374
#endif // !PRODUCT
376375
int step = 0;
377376
if (!t->does_dispatch()) {

0 commit comments

Comments
 (0)
Please sign in to comment.