Skip to content

Commit 9cfcce4

Browse files
authored
Update (2023.01.07)
29345: No need to preserve static regs in throw_exception stub frame 28537: forward_exception_entry should not require exception_pc on stack 29399: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR 29389: Disable convi2l_type_required 29341: Since T4 can be alloced by C2, it must be saved 29259: Read in the bcp from S0 for the top level interpreter frames 29270: [C2] support {U}DivMod{I/L} 28756: Detach the temp argument of jump_from_interpreted 27559: Corrects the stack offset of SharedRuntime::verify_oop_args() 29266: Delete useless variables and function in class Address 28781: [LA] more configs of Arraycopy stress tests on LA
1 parent 8a71def commit 9cfcce4

File tree

19 files changed

+467
-392
lines changed

19 files changed

+467
-392
lines changed

src/hotspot/cpu/loongarch/assembler_loongarch.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,10 @@
4949
// Implementation of AddressLiteral
5050

5151
AddressLiteral::AddressLiteral(address target, relocInfo::relocType rtype) {
52-
_is_lval = false;
5352
_target = target;
5453
_rspec = rspec_from_rtype(rtype, target);
5554
}
5655

57-
// Implementation of Address
58-
59-
Address Address::make_array(ArrayAddress adr) {
60-
AddressLiteral base = adr.base();
61-
Address index = adr.index();
62-
assert(index._disp == 0, "must not have disp"); // maybe it can?
63-
Address array(index._base, index._index, index._scale, (intptr_t) base.target());
64-
array._rspec = base._rspec;
65-
return array;
66-
}
67-
68-
// exceedingly dangerous constructor
69-
Address::Address(address loc, RelocationHolder spec) {
70-
_base = noreg;
71-
_index = noreg;
72-
_scale = no_scale;
73-
_disp = (intptr_t) loc;
74-
_rspec = spec;
75-
}
76-
7756
bool Assembler::is_vec_imm(float val) {
7857
juint x = *reinterpret_cast<juint*>(&val);
7958
juint masked = x & 0x7e07ffff;

src/hotspot/cpu/loongarch/assembler_loongarch.hpp

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ constexpr Register SCR1 = T7;
110110
// SCR2 is allocable in C2 Compiler
111111
constexpr Register SCR2 = T4;
112112

113-
114-
class ArrayAddress;
115-
116113
class Address {
117114
public:
118115
enum ScaleFactor {
@@ -135,12 +132,6 @@ class Address {
135132
Register _index;
136133
ScaleFactor _scale;
137134
int _disp;
138-
RelocationHolder _rspec;
139-
140-
// Easily misused constructors make them private
141-
Address(address loc, RelocationHolder spec);
142-
Address(int disp, address loc, relocInfo::relocType rtype);
143-
Address(int disp, address loc, RelocationHolder spec);
144135

145136
public:
146137

@@ -188,8 +179,6 @@ class Address {
188179
ScaleFactor scale() const { return _scale; }
189180
int disp() const { return _disp; }
190181

191-
static Address make_array(ArrayAddress);
192-
193182
friend class Assembler;
194183
friend class MacroAssembler;
195184
friend class LIR_Assembler; // base/index/scale/disp
@@ -205,12 +194,7 @@ class Address {
205194
// directories.
206195
//
207196
class AddressLiteral {
208-
friend class ArrayAddress;
209197
RelocationHolder _rspec;
210-
// Typically we use AddressLiterals we want to use their rval
211-
// However in some situations we want the lval (effect address) of the item.
212-
// We provide a special factory for making those lvals.
213-
bool _is_lval;
214198

215199
// If the target is far we'll need to load the ea of this to
216200
// a register to reach it. Otherwise if near we can do rip
@@ -221,8 +205,7 @@ class AddressLiteral {
221205
protected:
222206
// creation
223207
AddressLiteral()
224-
: _is_lval(false),
225-
_target(NULL)
208+
: _target(NULL)
226209
{}
227210

228211
public:
@@ -232,21 +215,12 @@ class AddressLiteral {
232215

233216
AddressLiteral(address target, RelocationHolder const& rspec)
234217
: _rspec(rspec),
235-
_is_lval(false),
236218
_target(target)
237219
{}
238220

239-
AddressLiteral addr() {
240-
AddressLiteral ret = *this;
241-
ret._is_lval = true;
242-
return ret;
243-
}
244-
245-
246221
private:
247222

248223
address target() { return _target; }
249-
bool is_lval() { return _is_lval; }
250224

251225
relocInfo::relocType reloc() const { return _rspec.type(); }
252226
const RelocationHolder& rspec() const { return _rspec; }
@@ -318,25 +292,6 @@ class InternalAddress: public AddressLiteral {
318292

319293
};
320294

321-
// x86 can do array addressing as a single operation since disp can be an absolute
322-
// address amd64 can't. We create a class that expresses the concept but does extra
323-
// magic on amd64 to get the final result
324-
325-
class ArrayAddress {
326-
private:
327-
328-
AddressLiteral _base;
329-
Address _index;
330-
331-
public:
332-
333-
ArrayAddress() {};
334-
ArrayAddress(AddressLiteral base, Address index): _base(base), _index(index) {};
335-
AddressLiteral base() { return _base; }
336-
Address index() { return _index; }
337-
338-
};
339-
340295
// The LoongArch Assembler: Pure assembler doing NO optimizations on the instruction
341296
// level ; i.e., what you write is what you get. The Assembler is generating code into
342297
// a CodeBuffer.

src/hotspot/cpu/loongarch/interp_masm_loongarch.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
175175

176176
// jump to an invoked target
177177
void prepare_to_jump_from_interpreted();
178-
void jump_from_interpreted(Register method, Register temp);
178+
void jump_from_interpreted(Register method);
179179

180180

181181
// Returning from interpreted functions

src/hotspot/cpu/loongarch/interp_masm_loongarch_64.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -483,29 +483,30 @@ void InterpreterMacroAssembler::store_ptr(int n, Register val) {
483483
st_d(val, SP, Interpreter::expr_offset_in_bytes(n));
484484
}
485485

486-
// Jump to from_interpreted entry of a call unless single stepping is possible
487-
// in this thread in which case we must call the i2i entry
488-
void InterpreterMacroAssembler::jump_from_interpreted(Register method, Register temp) {
489-
// record last_sp
486+
void InterpreterMacroAssembler::prepare_to_jump_from_interpreted() {
487+
// set sender sp
490488
move(Rsender, SP);
489+
// record last_sp
491490
st_d(SP, FP, frame::interpreter_frame_last_sp_offset * wordSize);
491+
}
492492

493+
// Jump to from_interpreted entry of a call unless single stepping is possible
494+
// in this thread in which case we must call the i2i entry
495+
void InterpreterMacroAssembler::jump_from_interpreted(Register method) {
496+
prepare_to_jump_from_interpreted();
493497
if (JvmtiExport::can_post_interpreter_events()) {
494498
Label run_compiled_code;
495499
// JVMTI events, such as single-stepping, are implemented partly by avoiding running
496500
// compiled code in threads for which the event is enabled. Check here for
497501
// interp_only_mode if these events CAN be enabled.
498-
499-
// interp_only is an int, on little endian it is sufficient to test the byte only
500-
// Is a cmpl faster?
501-
ld_w(AT, TREG, in_bytes(JavaThread::interp_only_mode_offset()));
502-
beq(AT, R0, run_compiled_code);
503-
ld_d(AT, method, in_bytes(Method::interpreter_entry_offset()));
502+
ld_wu(AT, Address(TREG, JavaThread::interp_only_mode_offset()));
503+
beqz(AT, run_compiled_code);
504+
ld_d(AT, Address(method, Method::interpreter_entry_offset()));
504505
jr(AT);
505506
bind(run_compiled_code);
506507
}
507508

508-
ld_d(AT, method, in_bytes(Method::from_interpreted_offset()));
509+
ld_d(AT, Address(method, Method::from_interpreted_offset()));
509510
jr(AT);
510511
}
511512

0 commit comments

Comments
 (0)