RFR: 8353174: Clean up thread register handling after 32-bit x86 removal
Aleksey Shipilev
shade at openjdk.org
Tue Apr 8 10:58:31 UTC 2025
Various `MacroAssembler` methods have this code to support passing the thread register, and getting it if `noreg` is passed:
// determine java_thread register
if (!java_thread->is_valid()) {
#ifdef _LP64
java_thread = r15_thread;
#else
java_thread = rdi;
get_thread(java_thread);
#endif // LP64
}
This never happens after 32-bit x86 removal. x86_64 always uses r15_thread. We can clean those up.
These are also the only major users of `MacroAssembler::get_thread` that we want to remove/rename to avoid falling into traps like [JDK-8353176](https://bugs.openjdk.org/browse/JDK-8353176).
Additional testing:
- [x] Linux x86_64 server fastdebug, `all`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/24323/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24323&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8353174
Stats: 233 lines in 15 files changed: 16 ins; 98 del; 119 mod
Patch: https://git.openjdk.org/jdk/pull/24323.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24323/head:pull/24323
PR: https://git.openjdk.org/jdk/pull/24323
More information about the hotspot-dev
mailing list