Compare commits

...

497 Commits

Author SHA1 Message Date
Konanki Sreenath
405a5699eb 8368032: Enhance Certificate Checking
Backport-of: 8747d00ad14838d5a2e3403b807a60a722044374
2025-12-18 08:04:02 +00:00
Sean Coffey
6389c79793 8372753: jpackage ignores --file-associations option with predefined app image
Backport-of: 44c11c754e3612f83ca4027ad3d43b90d33e86c5
2025-12-03 10:17:42 +00:00
Nibedita Jena
0f212044d1 Merge 2025-11-25 15:15:48 +00:00
Kerem Kat
796f2b42b0 8371425: Include folder names in vscode workspace virtual folders
Backport-of: 98f40e4575
2025-11-25 13:07:45 +00:00
SendaoYan
da10b6d84b 8371697: test/jdk/java/nio/file/FileStore/Basic.java fails after 8360887 on linux
Backport-of: 46b5e588ab
2025-11-25 12:13:59 +00:00
SendaoYan
95f4bc9b6e 8368982: Test sun/security/tools/jarsigner/EC.java completed and timed out
Backport-of: b0721e2859
2025-11-25 12:11:46 +00:00
Goetz Lindenmaier
6a410a8a1a 8372320: Bump update version for OpenJDK: jdk-25.0.3
Reviewed-by: sgehwolf, shade
2025-11-25 07:30:22 +00:00
Nibedita Jena
61e17e0a3b Merge 2025-11-18 14:13:31 +00:00
Alexey Semenyuk
8fd9a739c8 8371094: --mac-signing-key-user-name no longer works
Reviewed-by: aivanov
Backport-of: 0555f6228c
2025-11-17 21:11:48 +00:00
Aleksey Shipilev
816cfbfa06 8370318: AES-GCM vector intrinsic may read out of bounds (x86_64, AVX-512)
Backport-of: 7bb490c4bf
2025-11-14 13:51:28 +00:00
Renjith Kannath Pariyangad
44ca0caba3 8370465: Right to Left Orientation Issues with MenuItem Component
Backport-of: fc5df4ac8f
2025-11-13 14:02:04 +00:00
Nibedita Jena
1135e28698 Merge 2025-11-05 15:21:33 +00:00
SendaoYan
89c5659aa8 8366694: Test JdbStopInNotificationThreadTest.java timed out after 60 second
8366850: Test com/sun/jdi/JdbStopInNotificationThreadTest.java failed

Reviewed-by: phh
Backport-of: ed62bda2e0
2025-10-31 01:44:43 +00:00
Bhogesh Patil
63ffd603da 8370428: Change milestone to fcs for all releases
Reviewed-by: jwilhelm
2025-10-28 14:31:52 +00:00
Ravi.Patel8
fcece2ecb1 8368606: Printer lookup returns empty on AIX platform due to uninitialized results list
Backport-of: 9b1633ded0
2025-10-28 12:33:55 +00:00
Paul Hübner
363c49bd9c 8366229: runtime/Thread/TooSmallStackSize.java runs with all collectors
Backport-of: 075ebb4ee5
2025-10-28 12:33:19 +00:00
Nibedita Jena
44d33b662f Merge 2025-10-28 06:43:53 +00:00
Srinivas Vamsi Parasa
8f284e3d29 8354348: Enable Extended EVEX to REX2/REX demotion for commutative operations with same dst and src2
Backport-of: c41add8d3e
2025-10-27 20:47:11 +00:00
Matias Saavedra Silva
7e1ef275f1 8364660: ClassVerifier::ends_in_athrow() should be removed
Reviewed-by: jwilhelm, dlong, rhalade
Backport-of: 1bd814c3b2
2025-10-27 14:32:38 +00:00
Vladimir Petko
ceac6c7e8c 8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils
Reviewed-by: rriggs
Backport-of: c6ab63d306
2025-10-27 08:07:11 +00:00
SendaoYan
f98bbdf2a4 8367904: Test java/net/InetAddress/ptr/Lookup.java should throw SkippedException
Backport-of: c0815e40b6
2025-10-26 13:57:20 +00:00
Vladimir Petko
5228b25bda 8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails
Backport-of: 5609ee11a2
2025-10-24 11:49:55 +00:00
Hari Prasad Kummari
4a7697c541 8346884: Add since checker test to jdk.editpad
Backport-of: 7daf9813c0
2025-10-24 11:49:30 +00:00
David Briemann
c78ec16f2c 8369979: Flag UsePopCountInstruction was accidentally disabled on PPC64
Backport-of: 9b9559a2e3
2025-10-24 08:55:57 +00:00
Matthias Baesken
9bafce815f 8369563: Gtest dll_address_to_function_and_library_name has issues with stripped pdb files
Backport-of: 98e1d2fab1
2025-10-24 06:29:08 +00:00
Matthias Baesken
e3167a4c8e 8368960: Adjust java UL logging in the build
Backport-of: bd25db1fb8
2025-10-24 06:27:19 +00:00
SendaoYan
cc2f6b68d1 8367869: Test java/io/FileDescriptor/Sync.java timed out
Backport-of: 61c5245bf7
2025-10-24 02:55:50 +00:00
SendaoYan
4090ba37db 8367988: NewFileSystemTests.readOnlyZipFileFailure fails when run by root user
Backport-of: b03b6f54c5
2025-10-24 02:22:25 +00:00
Martin Doerr
4724078183 8369946: Bytecode rewriting causes Java heap corruption on PPC
Backport-of: 6bf3581bba
2025-10-23 21:47:00 +00:00
Nibedita Jena
87c1a73b1a Merge 2025-10-22 13:02:18 +00:00
Rob McKenna
f5974634e1 Merge 2025-10-21 17:16:22 +00:00
Alexey Ivanov
ec53140e75 8370331: Problemlist 2 tests due to failures in the CI pipeline
Reviewed-by: robm
2025-10-21 12:57:14 +00:00
Yagmur Eren
1d44608c57 8358748: Large page size initialization fails with assert "page_size must be a power of 2"
Reviewed-by: ayang, dholmes
Backport-of: 40bc083267
2025-10-21 08:07:49 +00:00
Viktor Klang
0a6cbb7b5e 8369656: Calling CompletableFuture.join() could execute task in common pool
Reviewed-by: alanb
Backport-of: b5b83247da
2025-10-21 08:05:29 +00:00
Mohamed Issa
1df2f556db 8358556: Assert when running with -XX:-UseLibmIntrinsic
Backport-of: ef4cbec6fb
2025-10-21 07:31:33 +00:00
Feilong Jiang
cd99e8febd 8369947: Bytecode rewriting causes Java heap corruption on RISC-V
Backport-of: 4625199358
2025-10-20 14:34:43 +00:00
William Kemper
9d467de7d8 8370048: Shenandoah: Deprecated ShenandoahPacing option
Reviewed-by: ysr
2025-10-17 20:38:29 +00:00
Anawesha Khuntia
79721d1890 8364764: java/nio/channels/vthread/BlockingChannelOps.java subtests timed out
Backport-of: f0498c2aed
2025-10-17 14:45:49 +00:00
Kieran Farrell
07af85cbda 8365086: CookieStore.getURIs() and get(URI) should return an immutable List
Backport-of: 022e29a775
2025-10-17 14:45:16 +00:00
Justin King
26c856f505 8369506: Bytecode rewriting causes Java heap corruption on AArch64
Reviewed-by: aph
Backport-of: 18fd047702
2025-10-17 14:43:09 +00:00
Hari Prasad Kummari
f431f9c399 8365660: test/jdk/sun/security/pkcs11/KeyAgreement/ tests skipped without SkipExceprion
Backport-of: ec7361e082
2025-10-17 05:19:59 +00:00
Cesar Soares Lucas
c02e1f0c8d 8357396: Refactor nmethod::make_not_entrant to use Enum instead of "const char*"
Backport-of: 62fde68708
2025-10-16 17:25:20 +00:00
Alexey Semenyuk
6ec62eb029 8369853: jpackage signing tests fail after JDK-8358723
Backport-of: 95def24b02
2025-10-16 17:01:31 +00:00
Alexey Semenyuk
36ba6d1b18 8369868: Compilation error in Win8365790Test.java with JDK-8358723 fix resulting in CI tier3 failure
Reviewed-by: aivanov
2025-10-16 17:01:02 +00:00
Chris Dennis
9018319c0e 8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...)
Reviewed-by: aph
Backport-of: d5a207994b
2025-10-16 15:12:04 +00:00
Matthias Baesken
a428b6bf6c 8369560: Slowdebug build without CDS fails
Reviewed-by: lucy
Backport-of: 0af959a340
2025-10-16 07:12:59 +00:00
Matthias Baesken
7acc55ab72 8369657: [AIX] TOC overflow in static-launcher build when building slowdebug after JDK-8352064
Backport-of: 4b85ba9067
2025-10-16 07:11:03 +00:00
Kieran Farrell
1f4134ed34 8367237: Thread-Safety Usage Warning for java.text.Collator Classes
Reviewed-by: jlu
Backport-of: 64155dfac0
2025-10-15 21:30:11 +00:00
Ravi Reddy
67ed07dccb 8365058: Enhance CopyOnWriteArraySet
Reviewed-by: jlu
Backport-of: 5c7956fd9a56a00c8af2d3092ea5680843429b53
2025-10-15 12:26:04 +00:00
SendaoYan
ef2719a761 8368668: Several vmTestbase/vm/gc/compact tests timed out on large memory machine
Backport-of: 9093d3a04c
2025-10-15 11:21:27 +00:00
Vladimir Petko
50c298fb4f 8369450: [Ubuntu 25.10] openjdk fails to build due to rust-coreutils date
Backport-of: b73228b51c
2025-10-15 11:10:27 +00:00
Vanitha B P
db4391bd97 8367598: Switch to CRC32C for SEED calculation in jdk.test.lib.Utils
Backport-of: 29908148f8
2025-10-15 11:10:08 +00:00
Anawesha Khuntia
ef1e448d6d 8333526: Restructure java/nio/channels/DatagramChannel/StressNativeSignal.java to a fail fast exception handling policy
Backport-of: 4f4030a423
2025-10-15 11:05:59 +00:00
Joakim Nordström
9bc74ce103 8365913: Support latest MSC_VER in abstract_vm_version.cpp
Backport-of: af532cc1b2
2025-10-15 11:02:28 +00:00
Ashish
2d8955b4a3 8359167: Remove unused test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java
Reviewed-by: cjplummer, coffeys
Backport-of: 982064e50c
2025-10-15 11:01:58 +00:00
Erik Gahlin
179653f62f 8368670: Deadlock in JFR on event register + class load
Reviewed-by: mgronlun
Backport-of: 5fccabff15
2025-10-15 10:07:27 +00:00
Ramesh Bhagavatam Gangadhar
07b5de6b40 8366342: Key generator and key pair generator tests skipping, but showing as passed
Backport-of: 7690a45f77
2025-10-15 07:28:58 +00:00
Feilong Jiang
c767b2d9a8 8369616: JavaFrameAnchor on RISC-V has unnecessary barriers and wrong store order in MacroAssembler
Backport-of: 72663695da
2025-10-15 07:18:56 +00:00
Matthias Baesken
1cd8cd8e33 8368565: Adjust comment regarding dependency of libjvm.so to librt
Backport-of: 7bfdb01207
2025-10-15 06:51:03 +00:00
Shivangi Gupta
a5faa59229 8201778: Speed up test javax/net/ssl/DTLS/PacketLossRetransmission.java
Backport-of: fc3e3e26c5
2025-10-15 06:41:30 +00:00
Sean Coffey
21e63914e6 8369319: java/net/httpclient/CancelRequestTest.java fails intermittently
Reviewed-by: dfuchs
2025-10-15 06:23:33 +00:00
Erik Gahlin
38fd7944e9 8364190: JFR: RemoteRecordingStream withers don't work
Reviewed-by: mgronlun
Backport-of: da0d9598d0
2025-10-15 01:27:57 +00:00
Kieran Farrell
702e30ebdf 8367021: Regression in LocaleDataTest refactoring
Backport-of: 48831c65b5
2025-10-14 21:25:24 +00:00
Kieran Farrell
28eaab4297 8369184: SimpleTimeZone equals() Returns True for Unequal Instances with Different hashCode Values
Backport-of: 37b725d9c1
2025-10-14 21:23:40 +00:00
Alexey Ivanov
8a953dfaff 8365280: Enhance JOptionPane
Backport-of: 8d9541f8c907d10159d524fc00fce85a2d99e51d
2025-10-14 16:11:24 +00:00
Nibedita Jena
60d3381f62 Merge 2025-10-14 15:05:12 +00:00
Ramesh Bhagavatam Gangadhar
b8aa130bab 8366159: SkippedException is treated as a pass for pkcs11/KeyStore, pkcs11/SecretKeyFactory and pkcs11/SecureRandom
Backport-of: 166ef5e7b1
2025-10-14 15:00:54 +00:00
nibjen
a875f32a00 8367133: DTLS: fragmentation of Finished message results in handshake failure
Backport-of: 80cb0ead50
2025-10-13 18:01:54 +00:00
Sergey Bylokhov
368e829f28 8367384: The ICC_Profile class may throw exceptions during serialization
Backport-of: 0e98ec3662
2025-10-13 17:58:33 +00:00
Thomas Fitzsimmons
a1d5dd1f4a 8361711: Add library name configurability to PKCS11Test.java
Backport-of: 1cb1267ce8
2025-10-13 17:39:49 +00:00
Alex Menkov
1471c205e5 8304811: vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/INDIFY_Test.java fails with JVMTI_ERROR_TYPE_MISMATCH
Backport-of: 854b384b12
2025-10-13 17:36:54 +00:00
Roman Marchenko
a156447291 8358751: C2: Recursive inlining check for compiled lambda forms is broken
Backport-of: 9cca4f7c76
2025-10-13 17:34:43 +00:00
Justin Lu
cbc605a229 8369078: Fix faulty test conversion in IllegalCharsetName.java
Backport-of: 0f406c420e
2025-10-13 16:46:40 +00:00
Rui Li
a44b6bdf6e 8360411: [TEST] open/test/jdk/java/io/File/MaxPathLength.java Refactor extract method to encapsulate Windows specific test logic
8363720: Follow up to JDK-8360411 with post review comments

Reviewed-by: phh
Backport-of: 016694bf74
2025-10-13 16:25:35 +00:00
Aleksey Shipilev
d4a7d0dae9 8367948: JFR: MethodTrace threshold setting has no effect
Backport-of: 4bc86a26db
2025-10-13 15:57:12 +00:00
Aleksey Shipilev
8df7dd1c01 8367953: JFR sampler threads does not appear in thread dump
Backport-of: 64c46d8efc
2025-10-13 15:55:05 +00:00
Joakim Nordström
b26b71db02 8364993: JFR: Disable jdk.ModuleExport in default.jfc
Backport-of: a382996bb4
2025-10-13 12:09:57 +00:00
Joakim Nordström
31399cd7ea 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc
Backport-of: 7698c373a6
2025-10-13 12:09:27 +00:00
Aleksey Shipilev
667daee368 8369226: GHA: Switch to MacOS 15
Backport-of: 1ea8cfa6dc
2025-10-13 07:45:05 +00:00
SendaoYan
5838de919a 8365983: Tests should throw SkippedException when SCTP not supported
Backport-of: a029245a4e
2025-10-12 08:10:09 +00:00
Dingli Zhang
1ad9e756f1 8368893: RISC-V: crash after JDK-8352673 on fastdebug version
Backport-of: f49849a5ed
2025-10-11 01:01:46 +00:00
Justin King
e8b86f471b 8369190: JavaFrameAnchor on AArch64 has unnecessary barriers and wrong store order in MacroAssembler
Backport-of: fd29677479
2025-10-10 22:25:36 +00:00
Johannes Bechberger
b1921d3a97 8359690: New test TestCPUTimeSampleThrottling still fails intermittently
Backport-of: 487cc3c5be
2025-10-10 14:47:03 +00:00
Arno Zeller
0fc34e6cee 8362581: Timeouts in java/nio/channels/SocketChannel/OpenLeak.java on UNIX
Backport-of: de59da27a6
2025-10-10 13:44:49 +00:00
Nibedita Jena
c90f35e1ba 8369487: Revert EA option for build promotion
Reviewed-by: coffeys
2025-10-10 10:44:57 +00:00
Robbin Ehn
092261785c 8367692: RISC-V: Align post call nop
Reviewed-by: fyang
Backport-of: 07ecc93dbd
2025-10-10 06:47:12 +00:00
SendaoYan
3bc7538867 8365834: Mark java/net/httpclient/ManyRequests.java as intermittent
Reviewed-by: jpai
Backport-of: 09aad0aea8
2025-10-09 12:05:34 +00:00
Yassine-O
9f72e61d7e 8366844: Update and automate MouseDraggedOriginatedByScrollBarTest.java
Backport-of: f1ee1b4a3d
2025-10-09 10:17:56 +00:00
Alexey Semenyuk
1bb4af873a 8358723: jpackage signing issues: the main launcher doesn't have entitlements
8334238: Enhance AddLShortcutTest jpackage test
8364984: Many jpackage tests are failing on Linux after JDK-8334238
8368890: open/test/jdk/tools/jpackage/macosx/NameWithSpaceTest.java fails randomly

Reviewed-by: aivanov
Backport-of: bdb7d25ac1
2025-10-09 07:29:33 +00:00
Srinivas Vamsi Parasa
8317086129 8366365: [test] test/lib-test/jdk/test/whitebox/CPUInfoTest.java should be updated
Backport-of: 8520fd3f6a
2025-10-09 07:27:36 +00:00
Aleksey Shipilev
9df689f143 8361950: Update to use jtreg 8
Backport-of: 5db1dfe5c8
2025-10-08 15:37:40 +00:00
Hari Prasad Kummari
6569f3ef8a 8361423: Add IPSupport::printPlatformSupport to java/net/NetworkInterface/IPv4Only.java
Backport-of: 2f1aed2a16
2025-10-08 08:58:42 +00:00
Anawesha Khuntia
a95aa6070e 8359477: com/sun/net/httpserver/Test12.java appears to have a temp file race
Backport-of: e1681c4828
2025-10-08 08:56:25 +00:00
Srinivas Vamsi Parasa
60377bfe97 8367780: Enable UseAPX on Intel CPUs only when both APX_F and APX_NCI_NDD_NF cpuid features are present
Backport-of: 3d4e049194
2025-10-08 08:54:36 +00:00
Aleksey Shipilev
4e67a48689 8367313: CTW: Execute in AWT headless mode
Backport-of: 7e738f0d90
2025-10-07 15:43:20 +00:00
Srinivas Vamsi Parasa
e80db07ae6 8367694: Fix jtreg test failure when Intel APX is enabled for KNL platforms
Backport-of: e883dec6be
2025-10-07 15:04:25 +00:00
Nibedita Jena
e0005ae396 Merge 2025-10-07 14:44:52 +00:00
Yassine
9305ebfd10 8365425: [macos26] javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java fails on macOS 26
Backport-of: bdf9834b81
2025-10-07 12:32:13 +00:00
Trupti Patil
a1e42d7a4c 8366750: Remove test 'java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java' from problemlist
Backport-of: b674a42553
2025-10-07 07:33:34 +00:00
Christoph Langer
a98b243698 8364454: ProblemList runtime/cds/DeterministicDump.java on macos for JDK-8363986
Backport-of: ad0fd13f20
2025-10-07 06:51:25 +00:00
William Kemper
ac9a03a67a 8368152: Shenandoah: Incorrect behavior at end of degenerated cycle
Reviewed-by: kdnilsen, phh
Backport-of: f36c33c86d
2025-10-07 06:03:53 +00:00
William Kemper
c66d45ab91 8365956: GenShen: Adaptive tenuring threshold algorithm may raise threshold prematurely
Reviewed-by: phh, kdnilsen
Backport-of: 7fcce27096
2025-10-07 06:01:53 +00:00
Dingli Zhang
66de4b41b9 8368732: RISC-V: Detect support for misaligned vector access via hwprobe
Reviewed-by: fyang
Backport-of: 538a722c2e
2025-10-07 00:48:56 +00:00
Igor Veresov
a3854cff53 8368698: runtime/cds/appcds/aotCache/OldClassSupport.java assert(can_add()) failed: Cannot add TrainingData objects
Backport-of: 4df41d2a75
2025-10-06 21:52:17 +00:00
Sergey Bylokhov
f5c27566fa 8362204: test/jdk/sun/awt/font/TestDevTransform.java fails on Ubuntu 24.04
Backport-of: 89af6e13f2
2025-10-06 18:53:44 +00:00
Srinivas Vamsi Parasa
ee6a040510 8365265: x86 short forward jump exceeds 8-bit offset in methodHandles_x86.cpp when using Intel APX
Backport-of: 38a261415d
2025-10-06 17:36:59 +00:00
Aleksey Shipilev
954430c17f 8345810: Custom launchers must be linked with pthread to avoid dynamic linker issues
Backport-of: 685da0323b
2025-10-06 15:20:12 +00:00
Aleksey Shipilev
affde09871 8362282: runtime/logging/StressAsyncUL.java failed with exitValue = 134
Backport-of: c968a672c0
2025-10-06 15:19:44 +00:00
Aleksey Shipilev
73eb1d7dfe 8357141: Update to use jtreg 7.5.2
Backport-of: fe3be498b8
2025-10-06 15:16:26 +00:00
Andreas Steiner
1c9880bb7a 8359104: gc/TestAlwaysPreTouchBehavior.java#<gcname> fails on Linux
Backport-of: 73df06c80c
2025-10-06 09:16:51 +00:00
Deepak Damodaran
61a014e998 8325766: Extend CertificateBuilder to create trust and end entity certificates programmatically
Reviewed-by: coffeys
2025-10-06 09:05:59 +00:00
SendaoYan
7c60413ad5 8368367: Test jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java fails jdk.GCHeapMemoryUsage "expected 0 > 0"
Backport-of: ed31023fc5
2025-10-03 05:59:15 +00:00
Coleen Phillimore
ee89511ee1 8365823: Revert storing abstract and interface Klasses to non-class metaspace
Reviewed-by: shade
Backport-of: fa00b24954
2025-10-01 12:39:10 +00:00
Matthias Baesken
87c8c19d0b 8359423: Improve error message in case of missing jsa shared archive
Reviewed-by: clanger
Backport-of: ef291d2d5d
2025-10-01 07:17:27 +00:00
Matthias Baesken
756bcc9964 8357691: File blocked.certs contains bad content when boot jdk 25 is used, sun/security/lib/CheckBlockedCerts.java failing
Backport-of: a80ba6260e
2025-10-01 07:02:18 +00:00
Aleksey Shipilev
8058a5be77 8358340: Support CDS heap archive with Generational Shenandoah
Backport-of: 577ac0610a
2025-09-30 16:17:32 +00:00
Aleksey Shipilev
86803cc5d9 8365165: Zap C-heap memory at delete/free
Backport-of: ca753ebad6
2025-09-30 16:17:13 +00:00
Nibedita Jena
d770f2f14e Merge 2025-09-30 13:10:01 +00:00
Sean Coffey
10d48fee02 8362632: Improve HttpServer Request handling
Backport-of: 566ceb1b00f3e7ac7b9189ec84653ccb1f701d25
2025-09-30 10:38:04 +00:00
Severin Gehwolf
3747153d91 8365389: Remove static color fields from SwingUtilities3 and WindowsMenuItemUI
Backport-of: 3468c6e5ef
2025-09-29 08:45:14 +00:00
Aleksey Shipilev
789ead61bb 8364111: InstanceMirrorKlass iterators should handle CDS and hidden classes consistently
Backport-of: ebb7f5d39b
2025-09-29 06:51:05 +00:00
Aleksey Shipilev
ab772dd2cc 8333783: java/nio/channels/FileChannel/directio/DirectIOTest.java is unstable with AV software
Backport-of: 8c6d12250b
2025-09-29 06:47:45 +00:00
Aleksey Shipilev
6c751f29e4 8367333: C2: Vector math operation intrinsification failure
8367969: C2: compiler/vectorapi/TestVectorMathLib.java fails without UnlockDiagnosticVMOptions

Reviewed-by: eastigeevich, phh
Backport-of: aa36799acb
2025-09-29 06:47:22 +00:00
Aleksey Shipilev
668808f8a3 8362530: VM crash with -XX:+PrintTieredEvents when collecting AOT profiling
Backport-of: 26ccb3cef1
2025-09-29 06:47:00 +00:00
Dmitry Markov
74edca3660 8359501: Enhance Handling of URIs
Backport-of: 79283a4b99d7bfff32674b4a29a75f706c9a9ba3
2025-09-26 18:42:41 +00:00
Sergey Bylokhov
ec0d44cf30 8367017: Remove legacy checks from WrappedToolkitTest and convert from bash
Backport-of: e1071797a4
2025-09-26 16:00:10 +00:00
Man Cao
9776e4dd74 8368071: Compilation throughput regressed 2X-8X after JDK-8355003
Reviewed-by: shade
Backport-of: bdfe05b595
2025-09-25 18:53:28 +00:00
Aleksey Shipilev
5861aa7803 8365726: Test crashed with assert in C1 thread: Possible safepoint reached by thread that does not allow it
Backport-of: 452b052fe3
2025-09-25 16:26:10 +00:00
Rob McKenna
78770bfaef 8367031: [backout] Change java.time month/day field types to 'byte'
Backport-of: 00be643fa3
2025-09-25 16:16:56 +00:00
Jayashree S Kumar
a8b394bdea 8360178: TestArguments.atojulong gtest has incorrect format string
Backport-of: 878497fb85
2025-09-25 15:31:40 +00:00
Jayashree S Kumar
5ade8576ab 8361314: Test serviceability/jvmti/VMEvent/MyPackage/VMEventRecursionTest.java FATAL ERROR in native method: Failed during the GetClassSignature call
Backport-of: 8c00c374ec
2025-09-25 15:29:03 +00:00
Jayashree S Kumar
076de11535 8361253: CommandLineOptionTest library should report observed values on failure
Backport-of: f153e415d7
2025-09-25 15:26:54 +00:00
Jayashree S Kumar
00318ca3eb 8361897: gc/z/TestUncommit.java fails with Uncommitted too slow
Backport-of: 3f21c8bd1f
2025-09-25 15:26:20 +00:00
Igor Veresov
17c9b9f9bf 8366948: AOT cache creation crashes when iterating training data
Backport-of: 2aafda1968
2025-09-25 15:13:53 +00:00
Nibedita Jena
5100536d49 8368308: ISO 4217 Amendment 180 Update
Backport-of: 3f9c665586
2025-09-25 14:42:40 +00:00
Nibedita Jena
e2939a13e8 Merge 2025-09-25 14:35:53 +00:00
Matthias Baesken
1fa7ec84db 8362516: Support of GCC static analyzer (-fanalyzer)
Backport-of: ba90ccc6a8
2025-09-25 11:30:38 +00:00
Manukumar V S
40a6020568 8346839: [TESTBUG] "java/awt/textfield/setechochartest4/setechochartest4.java" failed because the test frame disappears on clicking "Click Several Times" button
Backport-of: 58270b757c
2025-09-25 11:14:44 +00:00
Aleksey Shipilev
503ba0a93f 8361520: Stabilize SystemGC benchmarks
Backport-of: a9bd1ad40c
2025-09-25 11:14:14 +00:00
SendaoYan
147c08cc3a 8366893: java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java timed out on macos-aarch64
Backport-of: 0dad3f1ae8
2025-09-25 09:57:02 +00:00
Fei Yang
74c0684839 8368366: RISC-V: AlignVector is mistakenly set to AvoidUnalignedAccesses
Backport-of: 2313f8e4eb
2025-09-25 09:38:17 +00:00
Kieran Farrell
3f9c665586 8368308: ISO 4217 Amendment 180 Update
Reviewed-by: naoto, jlu
Backport-of: 85f5bf3f41
2025-09-24 19:39:50 +00:00
Ramesh Bhagavatam Gangadhar
e90d54198d 8368192: Test java/lang/ProcessBuilder/Basic.java#id0 fails with Exception: Stack trace
Reviewed-by: coffeys
Backport-of: 218e82c875
2025-09-24 11:27:20 +00:00
Nibedita Jena
ff79d18d26 Merge 2025-09-24 10:14:34 +00:00
Fei Yang
1482b6a0db 8362972: C2 fails with unexpected node in SuperWord truncation: IsFiniteF, IsFiniteD
Backport-of: 9f796da377
2025-09-23 00:29:14 +00:00
Sergey Bylokhov
3c07c11d16 8367131: Test com/sun/jdi/ThreadMemoryLeakTest.java fails on 32 bits
Backport-of: fdc11a1569
2025-09-22 19:33:40 +00:00
Francisco Ferrari Bihurriet
c2d79609d8 8367782: VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName
Backport-of: 1b9a11682d
2025-09-22 17:26:28 +00:00
Roger Riggs
00be643fa3 8367031: [backout] Change java.time month/day field types to 'byte'
Reviewed-by: lancea, shade, alanb
Backport-of: 0756ecb214
2025-09-22 15:13:27 +00:00
Tejal Wakchaure
cefd94515e 8365919: Replace currentTimeMillis with nanoTime in Stresser.java
Backport-of: 0ca38bdc4d
2025-09-22 07:26:28 +00:00
Calvin Cheung
147ed00b20 8357064: cds/appcds/ArchiveRelocationTest.java failed with missing expected output
Backport-of: 534d2b33dc
2025-09-22 07:25:50 +00:00
Erik Gahlin
304f253df0 8362836: JFR: Broken pipe in jdk/jfr/event/io/TestIOTopFrame.java
Backport-of: 1b94a3466e
2025-09-22 07:25:19 +00:00
Chad Rakoczy
81493188d6 8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking
Backport-of: 46ae1ee871
2025-09-19 22:09:20 +00:00
Manukumar V S
4bc1dc3260 8023263: [TESTBUG] Test closed/java/awt/Focus/InactiveWindowTest/InactiveFocusRace fails due to not enough time to initialize graphic components
Backport-of: 5271448b3a
2025-09-19 22:05:33 +00:00
Fei Gao
c357a2f7db 8364184: [REDO] AArch64: [VectorAPI] sve vector math operations are not supported after JDK-8353217
Backport-of: 51d710e3cc
2025-09-19 22:02:53 +00:00
Manukumar V S
d930cc5895 8162380: [TEST_BUG] MouseEvent/.../AltGraphModifierTest.java has only "Fail" button
Backport-of: 34c3ac0316
2025-09-19 18:54:47 +00:00
Alexey Semenyuk
8b686d9ee4 8365790: Shutdown hook for application image does not work on Windows
Reviewed-by: almatvee, aivanov
Backport-of: f7ce3a1b5f
2025-09-19 18:43:23 +00:00
Alexey Ivanov
1a69c6b56a 8358532: JFileChooser in GTK L&F still displays HTML filename
Backport-of: 6fe9143bbb
2025-09-19 17:00:43 +00:00
Francesco Andreuzzi
9f2d753643 8367689: Revert removal of several compilation-related vmStructs fields
Reviewed-by: aturbanov, shade
Backport-of: 4c5e901c96
2025-09-19 15:58:56 +00:00
William Kemper
d9981960c5 8367378: GenShen: Missing timing stats when old mark buffers are flushed during final update refs
Backport-of: 11df28916a
2025-09-19 07:35:02 +00:00
Alexey Ivanov
d8b2de8154 8367348: Enhance PassFailJFrame to support links in HTML
Backport-of: 7a3025e3d7
2025-09-18 19:11:29 +00:00
Stefan Johansson
9373d2786c 8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops
Backport-of: 703d930e4d
2025-09-18 13:03:47 +00:00
Stefan Johansson
a66fe2a876 8366434: THP not working properly with G1 after JDK-8345655
Backport-of: a03302d41b
2025-09-18 10:27:59 +00:00
Richard Reingruber
9a0e2ef7f0 8360219: [AIX] assert(locals_base >= l2) failed: bad placement
Backport-of: bea2b029a7
2025-09-18 07:58:17 +00:00
Aleksey Shipilev
fbfcb14383 8364212: Shenandoah: Rework archived objects loading
Backport-of: 68a35511eb
2025-09-18 07:49:56 +00:00
Matthias Baesken
76798c4739 8364352: Some tests fail when using a limited number of pregenerated .jsa CDS archives
Backport-of: 3ca44c8dea
2025-09-18 06:52:58 +00:00
Fei Yang
b2484b5e2d 8365926: RISC-V: Performance regression in renaissance (chi-square)
Reviewed-by: rehn
Backport-of: 5c1865a4fc
2025-09-18 01:05:07 +00:00
Fei Gao
c1c5c95496 8365312: GCC 12 cannot compile SVE on aarch64 with auto-var-init pattern
Backport-of: 999761d0f6
2025-09-17 16:21:52 +00:00
Dingli Zhang
b3bd1ec2f7 8367616: RISC-V: Auto-enable Zicboz extension for debug builds
Backport-of: 90e81c2bee
2025-09-17 00:55:15 +00:00
Axel Boldt-Christmas
43d9fcc879 8366147: ZGC: ZPageAllocator::cleanup_failed_commit_single_partition may leak memory
Backport-of: 86d6a2e05e
2025-09-16 17:21:58 +00:00
Aleksey Shipilev
f542b8f0cc 8363966: GHA: Switch cross-compiling sysroots to Debian trixie
Backport-of: 2a5f149bb8
2025-09-16 16:41:05 +00:00
Nibedita Jena
c4ebace3dc Merge 2025-09-16 15:34:25 +00:00
Anass Baya
f80b3a08d7 8346952: GetGraphicsStressTest.java fails: Native resources unavailable
8361839: Problemlist BogusFocusableWindowState due to failures in the CI pipeline

Reviewed-by: aivanov
Backport-of: 44cff9d6ab
2025-09-16 13:33:46 +00:00
Disha
211e9435d2 8366764: Deproblemlist java/awt/ScrollPane/ScrollPositionTest.java
Backport-of: 9f697c8b1ced41c256bd33f52bdcb2cede2adbf9
2025-09-16 09:46:02 +00:00
Tejal Wakchaure
2a46b6b439 8366029: Do not add -XX:VerifyArchivedFields by default to CDS tests
Backport-of: 15601b4718
2025-09-16 09:45:32 +00:00
Matthias Baesken
27c9af8e2f 8365442: [asan] runtime/ErrorHandling/CreateCoredumpOnCrash.java fails
Backport-of: e5ec464120
2025-09-16 09:08:36 +00:00
Matthias Baesken
d241152fb1 8366092: [GCC static analyzer] UnixOperatingSystem.c warning: use of uninitialized value 'systemTicks'
Backport-of: a6e2a329a0
2025-09-16 09:06:00 +00:00
Matthias Baesken
07fb86296c 8365700: Jar --validate without any --file option leaves around a temporary file /tmp/tmpJar<number>.jar
Backport-of: 320235ccb8
2025-09-16 08:52:36 +00:00
Dingli Zhang
2ec608f487 8367098: RISC-V: sync CPU features with related JVM flags for dependant ones
Backport-of: f51e442b0e
2025-09-16 01:08:14 +00:00
Rui Li
569b97fa16 8364296: Set IntelJccErratumMitigation flag ergonomically
Backport-of: 6c5804722b
2025-09-15 23:09:08 +00:00
Hamlin Li
156fdbe911 8360090: [TEST] RISC-V: disable some cds tests on qemu
Backport-of: c50370599e
2025-09-15 12:22:20 +00:00
skishor
520ded534d 8361367: AOT ExcludedClasses.java test failed with missing constant pool logs
Backport-of: 92712ef45d
2025-09-15 11:20:13 +00:00
Hari Prasad Kummari
1173f8ee7c 8364263: HttpClient: Improve encapsulation of ProxyServer
Backport-of: 190e113031
2025-09-15 11:19:31 +00:00
Dingli Zhang
96698162e6 8367137: RISC-V: Detect Zicboz block size via hwprobe
Backport-of: 5abd18426d
2025-09-13 02:26:49 +00:00
Dingli Zhang
4ad231aa5d 8367066: RISC-V: refine register selection in MacroAssembler:: decode_klass_not_null
Backport-of: 0b3a303053
2025-09-13 00:49:59 +00:00
Lei Zhu
b105b7b5d6 8362533: Tests sun/management/jmxremote/bootstrap/* duplicate VM flags
Backport-of: 458f033d4d
2025-09-11 16:05:24 +00:00
Sarvesh Kumar Jain
d09a3b8cae 8346753: Test javax/swing/JMenuItem/RightLeftOrientation/RightLeftOrientation.java fails on Windows Server 2025 x64 because the icons of RBMenuItem and CBMenuItem are not visible in Nimbus LookAndFeel
Backport-of: 5205eae6ff
2025-09-11 15:53:51 +00:00
Sean Coffey
5390df6b4a 8341496: Improve JMX connections
8367277: Fix copyright header in JMXInterfaceBindingTest.java

Reviewed-by: dfuchs
Backport-of: 76c1173ff5780b18cdb9ba3a519ee83abf651a3a
2025-09-11 15:29:35 +00:00
Renjith Kannath Pariyangad
6f6914eb00 8366446: Test java/awt/geom/ConcurrentDrawPolygonTest.java fails intermittently
Backport-of: 92c451f3b3273babc630a2f0371a0cbb4366c387
2025-09-11 13:04:39 +00:00
SendaoYan
f60d8f8f15 8366359: Test should throw SkippedException when there is no lpstat
Backport-of: f23c150709
2025-09-11 06:02:21 +00:00
Rui Li
e1a102767b 8320836: jtreg gtest runs should limit heap size
Backport-of: ac9e51023f
2025-09-10 16:15:32 +00:00
Rui Li
99e9d624e8 8364198: NMT should have a better corruption message
Backport-of: 2202156acc
2025-09-10 16:14:56 +00:00
Dingli Zhang
a4e90983ee 8367048: RISC-V: Correct pipeline descriptions of the architecture
Backport-of: 0aee7bf24d
2025-09-10 00:47:06 +00:00
Nibedita Jena
982ec33d48 Merge 2025-09-09 13:06:32 +00:00
SendaoYan
f55161a84a 8364786: Test java/net/vthread/HttpALot.java intermittently fails - 24999 handled, expected 25000
Backport-of: f83454cd61
2025-09-09 05:45:47 +00:00
SendaoYan
05d36fd91b 8366031: Mark com/sun/nio/sctp/SctpChannel/CloseDescriptors.java as intermittent
Backport-of: efb81dafaf
2025-09-09 05:45:30 +00:00
SendaoYan
421c14d952 8366558: Gtests leave /tmp/cgroups-test* files
Backport-of: 49fd6a0cb4
2025-09-09 05:44:55 +00:00
skishor
12abba93e8 8357816: Add test from JDK-8350576
Backport-of: d8c3533a91
2025-09-08 17:26:48 +00:00
Trupti Patil
e321014e88 8361298: SwingUtilities/bug4967768.java fails where character P is not underline
Backport-of: 57553ca1db
2025-09-08 17:25:28 +00:00
Manukumar V S
961e8ee953 8347277: java/awt/Focus/ComponentLostFocusTest.java fails intermittently
Backport-of: e2a503e26e
2025-09-08 17:24:16 +00:00
Tejal Wakchaure
086c696dcc 8365638: JFR: Add --exact for debugging out-of-order events
Backport-of: a42ba1ff1a
2025-09-08 17:23:56 +00:00
Matthias Baesken
23d8614ad0 8365487: [asan] some oops (mode) related tests fail
Backport-of: 98f54d90ea
2025-09-08 12:09:23 +00:00
Matthias Baesken
d7afe4df18 8364514: [asan] runtime/jni/checked/TestCharArrayReleasing.java heap-buffer-overflow
Backport-of: 67ba8b45dd
2025-09-08 07:18:58 +00:00
SendaoYan
b2121b0dd8 8365863: /test/jdk/sun/security/pkcs11/Cipher tests skip without SkippedException
Backport-of: 993babb326
2025-09-08 07:14:59 +00:00
skishor
4c3a085ade 8361215: Add AOT test case: verification constraint classes are excluded
Backport-of: 055d2ffa69
2025-09-05 22:35:37 +00:00
skishor
6b1067d6f6 8358685: [TEST] AOTLoggingTag.java failed with missing log message
Backport-of: 9658cecde3
2025-09-05 22:35:07 +00:00
Rui Li
cadbc36a54 8364257: JFR: User-defined events and settings with a one-letter name cannot be configured
Backport-of: ea7e943874
2025-09-05 17:23:29 +00:00
Matthias Baesken
b1cdae022f 8362889: [GCC static analyzer] leak in libstringPlatformChars.c
Reviewed-by: rriggs
Backport-of: 5160cfb496
2025-09-05 07:06:27 +00:00
Sergey Bylokhov
81bf878783 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout
Backport-of: 12e6a0b6d0
2025-09-05 02:15:55 +00:00
Vanitha B P
3e4dff3387 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected
Reviewed-by: naoto
Backport-of: a40afdd08f
2025-09-04 16:13:23 +00:00
Prajwal Kumaraswamy
666371e099 8265429: Improve GCM encryption
Backport-of: 1315d641edc5fd7619fed0998cb130cfc8162804
2025-09-04 13:28:42 +00:00
Matthias Baesken
3154d1e3b0 8365240: [asan] exclude some tests when using asan enabled binaries
Backport-of: d78fa5a9f6
2025-09-04 11:54:06 +00:00
Shyam Kishor
61e472e7db 8361494: [IR Framework] Escape too much in replacement of placeholder
Backport-of: 76442f39b9
2025-09-03 20:15:42 +00:00
Alexey Ivanov
e05c7c4c9a 8366800: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: dmarkov
2025-09-03 12:18:53 +00:00
Lei Zhu
1041bd35a5 8362532: Test gc/g1/plab/* duplicate command-line options
Backport-of: 13bab09bff
2025-09-03 09:54:10 +00:00
Kevin Walls
8afed87fad 8305567: serviceability/tmtools/jstat/GcTest01.java failed utils.JstatGcResults.assertConsistency
Backport-of: 310ef85667
2025-09-03 09:29:02 +00:00
John Jiang
e7dafa726b 8364597: Replace THL A29 Limited with Tencent
Backport-of: 4c9eaddaef
2025-09-03 07:36:18 +00:00
Sean Coffey
fde6906e81 8365168: Use 64-bit aligned addresses for CK_ULONG access in PKCS11 native key code
Backport-of: 640b71da48
2025-09-02 20:01:55 +00:00
Rui Li
b32786a434 8361497: Scoped Values: orElse and orElseThrow do not access the cache
Backport-of: 9dd93c6a2c
2025-09-02 17:13:26 +00:00
Alexey Ivanov
747ad8bdf1 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java
Reviewed-by: dmarkov
Backport-of: 7576064a10
2025-09-02 13:23:37 +00:00
Nibedita Jena
415f2adffb 8366223: ZGC: ZPageAllocator::cleanup_failed_commit_multi_partition is broken
Backport-of: 009612805f
2025-09-02 11:16:22 +00:00
Zhaokun Xie
23d79fea1c 8361892: AArch64: Incorrect matching rule leading to improper oop instruction encoding
Backport-of: dccb1782ec
2025-09-02 10:48:29 +00:00
Nibedita Jena
ab9bce387a Merge 2025-09-02 10:06:50 +00:00
Alexey Ivanov
cdf8da6bf7 8365615: Improve JMenuBar/RightLeftOrientation.java
Backport-of: afa8e79ba1
2025-09-01 19:37:24 +00:00
Axel Boldt-Christmas
009612805f 8366223: ZGC: ZPageAllocator::cleanup_failed_commit_multi_partition is broken
Reviewed-by: stefank
Backport-of: 501e6aed44
2025-09-01 14:03:51 +00:00
Matthias Baesken
f9713d1587 8363676: [GCC static analyzer] missing return value check of malloc in OGLContext_SetTransform
Backport-of: d25ad881eb
2025-09-01 07:05:12 +00:00
Chen Liang
06c3858070 8366028: MethodType::fromMethodDescriptorString should not throw UnsupportedOperationException for invalid descriptors
Backport-of: 1d53ac30f1
2025-09-01 06:31:53 +00:00
Dmitry Markov
e5762b1442 8361748: Enforce limits on the size of an XBM image
Backport-of: c71be802b5
2025-08-31 12:52:02 +00:00
Hamlin Li
a7c57e14fd 8365772: RISC-V: correctly prereserve NaN payload when converting from float to float16 in vector way
Backport-of: 32df2d17f3
2025-08-30 17:59:30 +00:00
Hamlin Li
2f5486f387 8365206: RISC-V: compiler/c2/irTests/TestFloat16ScalarOperations.java is failing on riscv64
Backport-of: 28602f3d3e
2025-08-30 17:58:23 +00:00
Alexey Ivanov
40c7660954 8365271: Improve Swing supports
Backport-of: 3a925dcd8a7628ea9ad9092a9019198fa7a6f00d
2025-08-29 16:17:42 +00:00
abhishek.n
5e07074d9d 8361112: Use exact float -> Float16 conversion method in Float16 tests
Backport-of: 549b875866
2025-08-28 11:49:50 +00:00
Alexey Ivanov
88901d4998 8366340: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: robm
2025-08-28 11:26:09 +00:00
Alexey Ivanov
7a1e7b2430 8366250: Problemlist 3 tests due to failures in the CI pipeline
Reviewed-by: robm
2025-08-27 15:18:36 +00:00
Matthias Baesken
f672a4c4e1 8361871: [GCC static analyzer] complains about use of uninitialized value ckpObject in p11_util.c
Backport-of: 518d5f4bbb
2025-08-27 13:43:28 +00:00
Matthias Baesken
e32595782b 8361868: [GCC static analyzer] complains about missing calloc - NULL checks in p11_util.c
Backport-of: 1cde536b98
2025-08-27 13:41:57 +00:00
Matthias Baesken
eead543b1f 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX
Backport-of: 166ea12d73
2025-08-27 08:11:01 +00:00
Aleksey Shipilev
7fe11cf1e9 8361211: C2: Final graph reshaping generates unencodeable klass constants
Backport-of: e304d37996
2025-08-27 05:00:07 +00:00
Aleksey Shipilev
d46096a441 8356324: JVM crash (SIGSEGV at ClassListParser::resolve_indy_impl) during -Xshare:dump starting from 21.0.5
Backport-of: 506625b768
2025-08-27 04:59:40 +00:00
Oli Gillespie
111fcc3115 8357959: (bf) ByteBuffer.allocateDirect initialization can result in large TTSP spikes
Backport-of: e5ce5c57c8
2025-08-26 13:05:08 +00:00
Alexey Ivanov
78972ee859 8349188: LineBorder does not scale correctly
Backport-of: 24117c6e9a
2025-08-26 11:57:13 +00:00
Alexey Ivanov
a93fadb156 8358813: JPasswordField identifies spaces in password via delete shortcuts
Backport-of: 8d73fe91bc
2025-08-26 11:56:45 +00:00
Alexey Ivanov
4d68cf0596 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text
Backport-of: 8d33ea7395
2025-08-26 11:54:55 +00:00
abhishek.n
0e1897591c 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java
Backport-of: 1926aeb1a3
2025-08-26 11:53:22 +00:00
William Kemper
ff97b1f1a5 8365571: GenShen: PLAB promotions may remain disabled for evacuation threads
Backport-of: 08db4b9962
2025-08-26 11:44:26 +00:00
abhishek.n
a7b977cd41 8362207: Add more test cases for possible double-rounding in fma
Backport-of: 6e368e0c69
2025-08-26 11:42:59 +00:00
Nibedita Jena
b854a1a808 Merge 2025-08-26 10:58:51 +00:00
Doug Simon
5fc2f1b3d6 8365468: EagerJVMCI should only apply to the CompilerBroker JVMCI runtime
Backport-of: e3aeebec17
2025-08-26 06:48:59 +00:00
Thomas Schatzl
6b3a2fdda7 8364503: gc/g1/TestCodeCacheUnloadDuringConcCycle.java fails because of race printing to stdout
Reviewed-by: shade
Backport-of: c56fb0b6ef
2025-08-26 06:32:58 +00:00
Dingli Zhang
ae9371f0bd 8365844: RISC-V: TestBadFormat.java fails when running without RVV
Backport-of: 584137cf96
2025-08-26 01:12:38 +00:00
Dingli Zhang
36d05a3773 8365841: RISC-V: Several IR verification tests fail after JDK-8350960 without Zvfh
Backport-of: 2e06a91765
2025-08-26 01:11:47 +00:00
Paul Hohensee
c4f45dd4c8 8279005: sun/tools/jstat tests do not check for test case exit codes after JDK-8245129
Backport-of: c90c31b07e
2025-08-25 18:07:24 +00:00
Jorn Vernee
1a0507d1c0 8362169: Pointer passed to upcall may get wrong scope
Backport-of: 9dc62825b5
2025-08-25 17:31:35 +00:00
Matthias Baesken
f1d867d361 8364996: java/awt/font/FontNames/LocaleFamilyNames.java times out on Windows
Backport-of: 15e8609a2c
2025-08-25 13:07:30 +00:00
Alexey Ivanov
339b122ad3 8366075: Problemlist 2 tests due to failures in the CI pipeline
Reviewed-by: robm
2025-08-25 13:04:54 +00:00
Matthias Baesken
7fad923582 8364199: Enhance list of environment variables printed in hserr/hsinfo file
Backport-of: 812bd8e94d
2025-08-25 13:02:57 +00:00
Matthias Baesken
e7e888b20e 8363910: Avoid tuning for Power10 CPUs on Linux ppc64le when gcc < 10 is used
Backport-of: 41c94eed37
2025-08-25 13:00:14 +00:00
Shyam Kishor
4b37d9787b 8362602: Add test.timeout.factor to CompileFactory to avoid test timeouts
Backport-of: f8c8bcf4fd
2025-08-25 08:37:15 +00:00
Thomas Schatzl
28ed52da54 8350621: Code cache stops scheduling GC
Reviewed-by: shade
Backport-of: 2292246f8c
2025-08-25 08:35:59 +00:00
Thomas Stuefe
a61a8523b3 8365307: AIX make fails after JDK-8364611
Backport-of: 391ea15118
2025-08-25 05:56:10 +00:00
Boris Ulasevich
a92ac4e372 8365071: ARM32: JFR intrinsic jvm_commit triggers C2 regalloc assert
Backport-of: f2f7a490c0
2025-08-22 18:10:13 +00:00
Boris Ulasevich
99538433bb 8365166: ARM32: missing os::fetch_bcp_from_context implementation
Reviewed-by: shade
Backport-of: 001aaa1e49
2025-08-22 18:08:46 +00:00
Francesco Andreuzzi
2ca492dd0e 8357822: C2: Multiple string optimization tests are no longer testing string concatenation optimizations
Backport-of: 6c616c71ec
2025-08-22 15:44:06 +00:00
Renjith Kannath Pariyangad
3f8642cc31 8364214: Enhance polygon data support
Backport-of: bc74f4a552f4bec37ee3cd870bacef4a0b186c53
2025-08-22 14:54:46 +00:00
Renjith Kannath Pariyangad
3ddbd5f479 8362308: Enhance Bitmap operations
Backport-of: d8ea3bcf8597c7277d6b4bbe23afd33cc41d48fa
2025-08-22 14:52:32 +00:00
Trupti Patil
885510d3c2 8335986: Test javax/swing/JCheckBox/4449413/bug4449413.java fails on Windows 11 x64 because RBMenuItem's and CBMenuItem's checkmark on the left side are not visible
Backport-of: c51bed739d
2025-08-21 18:55:23 +00:00
Hari Prasad Kummari
1c0632e6c5 8358048: java/net/httpclient/HttpsTunnelAuthTest.java incorrectly calls Thread::stop
Backport-of: d288ca28be
2025-08-21 18:47:42 +00:00
Hari Prasad Kummari
e7fcc3679c 8360408: [TEST] Use @requires tag instead of exiting based on "os.name" property value for sun/net/www/protocol/file/FileURLTest.java
Backport-of: d4705947d8
2025-08-21 18:46:37 +00:00
Hari Prasad Kummari
67faaf1ed0 8360981: Remove use of Thread.stop in test/jdk/java/net/Socket/DeadlockTest.java
Backport-of: 3263361a28
2025-08-21 18:46:14 +00:00
Coleen Phillimore
56a40f3252 8343218: Add option to disable allocating interface and abstract classes in non-class metaspace
Backport-of: da3a5da81b
2025-08-21 16:44:52 +00:00
Martin Doerr
76a5c2dfb5 8361599: [PPC64] enable missing tests via jtreg requires
Backport-of: 83feb7a238
2025-08-21 08:22:02 +00:00
SendaoYan
e0fd1f9ad6 8365811: test/jdk/java/net/CookieHandler/B6644726.java failure - "Should have 5 cookies. Got only 4, expires probably didn't parse correctly"
Backport-of: b453eb63c6
2025-08-21 01:49:22 +00:00
Ramesh Bhagavatam Gangadhar
25273338a9 8356897: Update NSS library to 3.111
Reviewed-by: rhalade
Backport-of: cabd7c1f7a
2025-08-20 16:03:19 +00:00
Aleksey Shipilev
8f9e740b8a 8357382: runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java#aot fails with Xcomp and C1
Backport-of: 429158218b
2025-08-19 15:51:23 +00:00
Nibedita Jena
f92ad752ab Merge 2025-08-19 10:27:06 +00:00
Nibedita Jena
7d9d81e6f0 Merge 2025-08-19 06:11:10 +00:00
Thomas Stuefe
dd748358b8 8364611: (process) Child process SIGPIPE signal disposition should be default
Reviewed-by: adinn
Backport-of: bdb1646a1e
2025-08-18 16:56:19 +00:00
abhishek.n
c8ae169a86 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test
Backport-of: 49a82d8806
2025-08-18 16:46:21 +00:00
Aleksey Shipilev
f9d3489ec7 8363928: Specifying AOTCacheOutput with a blank path causes the JVM to crash
Backport-of: ea754316fd
2025-08-18 16:18:56 +00:00
Aleksey Shipilev
037133e83a 8360783: CTW: Skip deoptimization between tiers
Backport-of: cd6caedd0a
2025-08-18 16:15:36 +00:00
Rob McKenna
8ef7d6009e Merge 2025-08-18 15:14:11 +00:00
David Holmes
a7cdb534c7 8364235: Fix for JDK-8361447 breaks the alignment requirements for GuardedMemory
Backport-of: 078d0d4968
2025-08-17 22:48:57 +00:00
Dingli Zhang
7392e131e0 8365302: RISC-V: compiler/loopopts/superword/TestAlignVector.java fails when vlen=128
Backport-of: 636c61a386
2025-08-16 05:57:57 +00:00
Matias Saavedra Silva
4f265785a9 8352637: Enhance bytecode verification
Reviewed-by: dlong
Backport-of: d9bf0c2ca2d52d783a8122504cac9566d42b22df
2025-08-13 16:03:34 +00:00
Xiaolong Peng
5cdaaf3468 8361948: Shenandoah: region free capacity unit mismatch
Backport-of: 46988e1073
2025-08-13 15:51:16 +00:00
Dingli Zhang
b20f66fab9 8364120: RISC-V: unify the usage of MacroAssembler::instruction_size
Backport-of: 7bf4c608e7
2025-08-13 01:16:05 +00:00
Dingli Zhang
8e44725fba 8364150: RISC-V: Leftover for JDK-8343430 removing old trampoline call
Backport-of: 3488f53d2c
2025-08-13 01:14:23 +00:00
Dingli Zhang
89330eac4b 8365200: RISC-V: compiler/loopopts/superword/TestGeneralizedReductions.java fails with Zvbb and vlen=128
Backport-of: 6927fc3904
2025-08-13 01:13:34 +00:00
skishor
aba6feb46d 8359207: Remove runtime/signal/TestSigusr2.java since it is always skipped
Reviewed-by: syan
Backport-of: 51877f568b
2025-08-12 17:22:41 +00:00
Chen Liang
65eca342dd 8358535: Changes in ClassValue (JDK-8351996) caused a 1-9% regression in Renaissance-PageRank
Reviewed-by: shade
Backport-of: e13b4c8de9
2025-08-12 17:17:46 +00:00
Prasanta Sadhukhan
6c48f4ed70 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel
Reviewed-by: prr, aivanov
Backport-of: e29346dbd6
2025-08-12 17:15:36 +00:00
Alexander Zvegintsev
3f491ffa1a 8362390: AIX make fails in awt_GraphicsEnv.c
Backport-of: 18190519e7
2025-08-12 15:45:35 +00:00
Nibedita Jena
c5d85e09e1 8360647: [XWayland] [OL10] NumPad keys are not triggered
Backport-of: 4d5fb6eb8b
2025-08-12 11:47:25 +00:00
Nibedita Jena
3db8f08278 Merge 2025-08-12 10:10:43 +00:00
Ludvig Janiuk
49bed344a9 8365260: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: aivanov
2025-08-11 15:20:38 +00:00
Alexander Zvegintsev
60e9784ac7 8354415: [Ubuntu25.04] api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayMode - setDisplayMode_REFRESH_RATE_UNKNOWN fails: Height is different on vnc
Backport-of: 18c2e40de7
2025-08-11 14:28:53 +00:00
Ravi Reddy
408ae8637c 8356294: Enhance Path Factories
Backport-of: 5835cefe49
2025-08-11 12:57:00 +00:00
Renjith Kannath Pariyangad
4d5fb6eb8b 8360647: [XWayland] [OL10] NumPad keys are not triggered
Backport-of: 0029554d20
2025-08-11 08:24:20 +00:00
Ao Qi
3ee05cde63 8364177: JDK fails to build due to undefined symbol in libpng on LoongArch64
Backport-of: a9f3d3a290
2025-08-11 08:21:14 +00:00
Matthias Baesken
282e8e2ef6 8360518: Docker tests do not work when asan is configured
Backport-of: 01b15bc1f9
2025-08-11 07:05:44 +00:00
Aleksey Shipilev
999afedf1c 8360255: runtime/jni/checked/TestLargeUTF8Length.java fails with -XX:-CompactStrings
Backport-of: 1ca008fd02
2025-08-11 06:02:24 +00:00
Aleksey Shipilev
e477d8453b 8361180: Disable CompiledDirectCall verification with -VerifyInlineCaches
Backport-of: 1ac7489874
2025-08-11 06:02:05 +00:00
Aleksey Shipilev
cea147b1ae 8343546: GHA: Cache required dependencies in master-branch workflow
Backport-of: 1fa772e814
2025-08-11 06:01:27 +00:00
SendaoYan
f136138ba3 8362834: Several runtime/Thread tests should mark as /native
Backport-of: 699b8112f8
2025-08-10 09:41:32 +00:00
Dingli Zhang
4419ef29cb 8362515: RISC-V: cleanup NativeFarCall
Backport-of: 3e2d12d85a
2025-08-09 03:46:29 +00:00
SendaoYan
028b4baf13 8362482: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java: System.gc() does not provide full GC
Reviewed-by: rrich
Backport-of: b4028c91d5
2025-08-09 02:00:53 +00:00
Nibedita Jena
1962c746dc Merge
Reviewed-by: rreddy
2025-08-06 15:52:35 +00:00
SendaoYan
ece596aa97 8362379: Test serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java should mark as /native
Backport-of: ee0bcc5526
2025-08-06 11:45:35 +00:00
Trupti Patil
6d2b9c997a 8355478: DoubleActionESC.java fails intermittently
Backport-of: d1052c70cb
2025-08-06 09:18:44 +00:00
Srinivas Mandalika
3db9097a9f 8359428: Test 'javax/swing/JTabbedPane/bug4499556.java' failed because after selecting one of L&F items, the test case automatically failed when clicking on L&F Menu button again
Backport-of: 2b94b70ef5
2025-08-06 09:18:10 +00:00
Aleksey Shipilev
4f99224c80 8361478: GHA: Use MSYS2 from GHA runners
Backport-of: ed9066bdf4
2025-08-06 08:44:53 +00:00
Nibedita Jena
c02fce22ed 8361212: Remove AffirmTrust root CAs
Backport-of: e58859e8ac
2025-08-06 08:43:16 +00:00
Aleksey Shipilev
22183decf6 8361255: CTW: Tolerate more NCDFE problems
Backport-of: a201be8555
2025-08-06 08:35:01 +00:00
Aleksey Shipilev
2a68b5d007 8360867: CTW: Disable inline cache verification
Backport-of: aa1911191c
2025-08-06 08:34:34 +00:00
Nibedita Jena
caf8ab724a Merge 2025-08-06 07:46:10 +00:00
Yasumasa Suenaga
af32b94741 8364090: Dump JFR recording on CrashOnOutOfMemoryError
Backport-of: 8ed214f3b1
2025-08-06 02:57:14 +00:00
Dingli Zhang
326baa36bb 8361449: RISC-V: Code cleanup for native call
Backport-of: 5edd546585
2025-08-06 01:33:15 +00:00
Jesper Wilhelmsson
73c28c2e3d 8364038: Remove EA from the JDK 25 version string with first RC promotion
Reviewed-by: mikael, erikj, iris, cstein
2025-08-05 23:17:32 +00:00
Rob McKenna
b40eb304c4 Merge 2025-08-05 20:57:43 +00:00
Matias Saavedra Silva
76bdbfbec7 8352637: Enhance bytecode verification
Reviewed-by: dlong
Backport-of: d9bf0c2ca2d52d783a8122504cac9566d42b22df
2025-08-05 07:09:32 +00:00
Shruthi Acharya
5f2a45c3a6 8317801: java/net/Socket/asyncClose/Race.java fails intermittently (aix)
Backport-of: 8f121a173c
2025-08-04 16:13:27 +00:00
Markus Grönlund
1e2bf070f0 8364258: ThreadGroup constant pool serialization is not normalized
Reviewed-by: egahlin
Backport-of: 3bc449797e
2025-08-04 14:52:19 +00:00
Manuel Hässig
24936b9295 8364409: [BACKOUT] Consolidate Identity of self-inverse operations
Reviewed-by: chagedorn, bmaillard
Backport-of: ddb64836e5
2025-08-04 08:39:05 +00:00
SendaoYan
0f49f65af3 8362855: Test java/net/ipv6tests/TcpTest.java should report SkippedException when there no ia4addr or ia6addr
Backport-of: 8fcbb110e9
2025-08-03 12:31:15 +00:00
SendaoYan
00c9b2eb30 8364114: Test TestHugePageDecisionsAtVMStartup.java#LP_enabled fails when no free hugepage
Backport-of: 3b0da29879
2025-08-02 02:11:15 +00:00
Justin Lu
b5bec8db3f 8364370: java.text.DecimalFormat specification indentation correction
Reviewed-by: liach, naoto
Backport-of: 8e921aee5a
2025-08-01 21:25:52 +00:00
Justin Lu
9bdf9ebadd 8360416: Incorrect l10n test case in sun/security/tools/keytool/i18n.java
Reviewed-by: hchao
Backport-of: 5540a7859b
2025-08-01 16:09:52 +00:00
Maheshkumar Bollapragada
71806ba764 8359687: Use PassFailJFrame for java/awt/print/Dialog/DialogType.java
Backport-of: de34bb8e66
2025-08-01 14:44:22 +00:00
SendaoYan
0c02f7ace7 8362501: Update test/hotspot/jtreg/applications/jcstress/README
Backport-of: 559795b0eb
2025-08-01 01:59:04 +00:00
Dingli Zhang
869879b9a1 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls
Backport-of: 1a01839f8c
2025-08-01 01:06:36 +00:00
Dingli Zhang
cc08a510bc 8362596: RISC-V: Improve _vectorizedHashCode intrinsic
Backport-of: 4189fcbac4
2025-08-01 01:01:01 +00:00
Rajan Halade
e58859e8ac 8361212: Remove AffirmTrust root CAs
Backport-of: 3bdac53178
2025-07-31 17:51:49 +00:00
Ao Qi
fe3bef3e80 8363895: Minimal build fails with slowdebug builds after JDK-8354887
Reviewed-by: kvn
Backport-of: 2da0cdadb8
2025-07-31 16:37:58 +00:00
Fei Yang
cf59787370 8360520: RISC-V: C1: Fix primitive array clone intrinsic regression after JDK-8333154
Backport-of: e6ac956a7a
2025-07-31 16:27:10 +00:00
Sarvesh KumarJain
cc99a7bfe5 8357799: Improve instructions for JFileChooser/HTMLFileName.java
Backport-of: 53a83d15a1
2025-07-31 16:08:30 +00:00
Aleksey Shipilev
bc2c70969b 8363965: GHA: Switch cross-compiling sysroots to Debian bookworm
Backport-of: 3fe0d29ec3
2025-07-31 14:45:10 +00:00
Matthias Baesken
aab1c79382 8351487: [ubsan] jvmti.h runtime error: load of value which is not a valid value
Backport-of: bf3cfbeff4
2025-07-31 14:34:12 +00:00
Matthias Baesken
59f3ef7fe0 8360791: [ubsan] Adjust signal handling
Backport-of: aeca49e43f
2025-07-31 14:21:30 +00:00
Matthias Baesken
8a80f6b748 8361959: [GCC static analyzer] java_props_md.c leak of 'temp' variable is reported
Backport-of: bf225c201f
2025-07-31 14:11:39 +00:00
Matthias Baesken
4dc76843d6 8361888: [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode
Backport-of: b85440d085
2025-07-31 14:00:08 +00:00
Nibedita Jena
99f80700d7 8356587: Missing object ID X in pool jdk.types.Method
Backport-of: 9fe2aa59ff
2025-07-31 11:24:44 +00:00
Nibedita Jena
d30e89c381 8360679: Shenandoah: AOT saved adapter calls into broken GC barrier stub
Backport-of: 033a121c96
2025-07-31 11:05:30 +00:00
Nibedita Jena
1d92cd3517 8362882: Update SubmissionPublisher() specification to reflect use of ForkJoinPool.asyncCommonPool()
Backport-of: 3db8262445
2025-07-31 11:05:12 +00:00
Nibedita Jena
6fcaf66539 8315131: Clarify VarHandle set/get access on 32-bit platforms
Backport-of: 1867effcc0
2025-07-31 11:00:02 +00:00
Jiangli Zhou
7b69679175 8362564: hotspot/jtreg/compiler/c2/TestLWLockingCodeGen.java fails on static JDK on x86_64 with AVX instruction extensions
Reviewed-by: kvn
Backport-of: c239c0ab00
2025-07-30 23:19:40 +00:00
Alisen Chung
bf31e50754 8364089: JDK 25 RDP2 L10n resource files update
Reviewed-by: jlu, naoto
Backport-of: c671089d6e
2025-07-30 22:52:03 +00:00
Hari Prasad Kummari
f730110051 8354447: Missing test for retroactive @SuppressWarnings("dangling-doc-comments") behavior
Backport-of: 0e725c6fb1
2025-07-29 18:33:00 +00:00
Hari Prasad Kummari
91b33c3da4 8360022: ClassRefDupInConstantPoolTest.java fails when running in repeat
Backport-of: 566279af49
2025-07-29 18:32:34 +00:00
Nibedita Jena
6206d77f0c Merge 2025-07-29 16:51:44 +00:00
Rob McKenna
e430581570 Merge 2025-07-29 14:17:50 +00:00
Markus Grönlund
9fe2aa59ff 8356587: Missing object ID X in pool jdk.types.Method
Reviewed-by: egahlin
Backport-of: a34994476e
2025-07-29 11:40:55 +00:00
Matthias Baesken
6f74302056 8361198: [AIX] fix misleading error output in thread_cpu_time_unchecked
Backport-of: 2528c620a6
2025-07-28 07:08:37 +00:00
Dingli Zhang
12d7b2e458 8363898: RISC-V: TestRangeCheckHoistingScaledIV.java fails after JDK-8355293 when running without RVV
Backport-of: b746701e57
2025-07-26 03:34:06 +00:00
SendaoYan
e7d4fc08dd 8359827: Test runtime/Thread/ThreadCountLimit.java need loop increasing the limit
Backport-of: fc8038441d
2025-07-26 03:21:06 +00:00
Feilong Jiang
2c7becc21b 8362838: RISC-V: Incorrect matching rule leading to improper oop instruction encoding
Backport-of: 0ba2942c6e
2025-07-26 02:12:35 +00:00
Fei Yang
7f34855108 8361504: RISC-V: Make C1 clone intrinsic platform guard more specific
Backport-of: 54e37629f6
2025-07-26 02:07:03 +00:00
Alan Bateman
3db8262445 8362882: Update SubmissionPublisher() specification to reflect use of ForkJoinPool.asyncCommonPool()
Reviewed-by: jpai
Backport-of: f79bd54bbb
2025-07-25 11:21:52 +00:00
Aleksey Shipilev
033a121c96 8360679: Shenandoah: AOT saved adapter calls into broken GC barrier stub
Reviewed-by: kvn
Backport-of: 8477630970
2025-07-25 08:09:02 +00:00
Chen Liang
1867effcc0 8315131: Clarify VarHandle set/get access on 32-bit platforms
Reviewed-by: rriggs, iris
Backport-of: ea6674fec8
2025-07-24 17:49:18 +00:00
Ravi Reddy
5835cefe49 8356294: Enhance Path Factories
Backport-of: 65fb43fdae221be75f2657697b96ddf996ebca44
2025-07-24 14:56:51 +00:00
Manukumar V S
c168d3b210 8358697: TextLayout/MyanmarTextTest.java passes if no Myanmar font is found
Backport-of: bcad87eacb
2025-07-23 16:59:29 +00:00
Dingli Zhang
b56774e0d2 8357694: RISC-V: Several IR verification tests fail when vlen=128
Backport-of: 15b5b54ac7
2025-07-23 16:59:02 +00:00
Aleksey Shipilev
e80d51e9b6 8362582: GHA: Increase bundle retention time to deal with infra overload better
Backport-of: 1bd683b588
2025-07-23 15:56:30 +00:00
nibjen
f404d59e1d 8363696: Update the release version and date for OpenJDK 25u
Reviewed-by: robm
2025-07-22 15:57:12 +00:00
Hari Prasad Kummari
79d447ed78 8359127: Amend java/nio/channels/DatagramChannel/PromiscuousIPv6.java to use @requires for OS platform selection
Backport-of: 78b1360e7d
2025-07-22 15:56:06 +00:00
Artem Semenov
7145ba15a9 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object()
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Semenov <savoptik@altlinux.org>.

Backport-of: e9a434165a
2025-07-22 12:40:49 +00:00
pavel_kharskii
3eee56e456 8362109: Change milestone to fcs for all releases
Reviewed-by: coffeys, mvs
2025-07-22 12:14:38 +00:00
Nibedita Jena
d0ae812782 8362107: Update the Jan CPU26_01 release date in master branch after forking Oct CPU25_10
Reviewed-by: coffeys, rreddy
2025-07-22 07:20:31 +00:00
Nibedita Jena
5dab0808b1 Merge 2025-07-22 05:13:25 +00:00
Rob McKenna
987af5af16 Merge 2025-07-21 17:45:35 +00:00
Thomas Schatzl
e8f2cd8f3d 8347052: Update java man page documentation to reflect current state of the UseNUMA flag
Reviewed-by: ayang
Backport-of: ea774b74e8
2025-07-18 11:36:08 +00:00
SendaoYan
e599ee4a88 8361827: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java throws OutOfMemoryError
Reviewed-by: rrich, lmesnik
Backport-of: cbb3d23e19
2025-07-18 06:08:46 +00:00
David Holmes
3a8e9dfe85 8362565: ProblemList jdk/jfr/event/io/TestIOTopFrame.java
Reviewed-by: egahlin
Backport-of: 04c0b130f0
2025-07-18 02:39:10 +00:00
William Kemper
347084bfbd 8360288: Shenandoah crash at size_given_klass in op_degenerated
Reviewed-by: shade
Backport-of: 3b44d7bfa4
2025-07-17 16:50:07 +00:00
SendaoYan
5cc7a31b3f 8361869: Tests which call ThreadController should mark as /native
Reviewed-by: jpai
Backport-of: 3bacf7ea85
2025-07-17 12:50:53 +00:00
SendaoYan
f1f6452e01 8358004: Delete applications/scimark/Scimark.java test
Reviewed-by: coleenp
Backport-of: a5c9bc7032
2025-07-17 12:41:34 +00:00
Erik Gahlin
331adac38e 8361639: JFR: Incorrect top frame for I/O events
Reviewed-by: mgronlun
Backport-of: 1a6cbe421f
2025-07-17 12:20:22 +00:00
Brian Burkhalter
e989c1d138 8362429: AssertionError in File.listFiles(FileFilter | FilenameFilter)
Reviewed-by: alanb
Backport-of: be0161a8e6
2025-07-17 06:57:58 +00:00
Boris Ulasevich
5129887dfe 8362250: ARM32: forward_exception_entry missing return address
Reviewed-by: shade
Backport-of: 6ed81641b1
2025-07-17 01:29:57 +00:00
Brian Burkhalter
69ea85ee12 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled
Reviewed-by: alanb
Backport-of: eefbfdce31
2025-07-16 15:35:50 +00:00
Erik Gahlin
93260d639e 8361640: JFR: RandomAccessFile::readLine emits events for each character
Reviewed-by: mgronlun, alanb
Backport-of: 9bef2d1610
2025-07-16 15:35:30 +00:00
Tobias Hartmann
b67fb82a03 8362171: C2 fails with unexpected node in SuperWord truncation: ModI
Reviewed-by: chagedorn
Backport-of: 70c1ff7e15
2025-07-16 14:51:08 +00:00
Johannes Bechberger
a626c1d92c 8358619: Fix interval recomputation in CPU Time Profiler
Reviewed-by: jbachorik
Backport-of: c70258ca1c
2025-07-16 10:13:57 +00:00
Johannes Bechberger
533211af73 8358621: Reduce busy waiting in worse case at the synchronization point returning from native in CPU Time Profiler
Reviewed-by: shade
Backport-of: d2082c58ff
2025-07-16 07:31:23 +00:00
Erik Gahlin
07bb0e3e2f 8362097: JFR: Active Settings view broken
Reviewed-by: mgronlun
Backport-of: 25e509b0db
2025-07-16 06:56:09 +00:00
Tobias Hartmann
60196a6b6f 8361952: Installation of MethodData::extra_data_lock() misses synchronization on reader side
Reviewed-by: chagedorn
Backport-of: 272e66d017
2025-07-16 06:33:47 +00:00
Brent Christian
0e6bf00550 Merge
Reviewed-by: jpai
2025-07-16 03:57:34 +00:00
Calvin Cheung
e1926a6d0e 8361328: cds/appcds/dynamicArchive/TestAutoCreateSharedArchive.java archive timestamps comparison failed
Reviewed-by: matsaave, iklam
Backport-of: 4a351e3e57
2025-07-15 21:46:00 +00:00
David Holmes
03a67a969b 8356942: invokeinterface Throws AbstractMethodError Instead of IncompatibleClassChangeError
Reviewed-by: iklam, coleenp
Backport-of: f36147b326
2025-07-15 20:56:47 +00:00
Chris Plummer
cf92877aa5 8361905: Problem list serviceability/sa/ClhsdbThreadContext.java on Windows due to JDK-8356704
Reviewed-by: sspitsyn
Backport-of: f7e8d255cc
2025-07-15 18:29:32 +00:00
Nibedita Jena
05bf5e3a50 Merge 2025-07-15 13:44:52 +00:00
Nibedita Jena
cc2cf97834 8360937: Enhance certificate handling
Reviewed-by: mullan
Backport-of: f2fba5a55176ca82985ca42996cef36be7b7500a
2025-07-15 13:39:47 +00:00
Phil Race
121f5a72e4 8360147: Better Glyph drawing redux
Reviewed-by: rhalade, ahgross, psadhukhan, jdv
2025-07-15 19:00:48 +05:30
Phil Race
52e1e739af 8355884: [macos] java/awt/Frame/I18NTitle.java fails on MacOS
Reviewed-by: kcr, dmarkov, aivanov, honkar, kizune
2025-07-15 19:00:48 +05:30
Darragh Clarke
5ae719c8fc 8350991: Improve HTTP client header handling
Reviewed-by: rhalade, dfuchs, michaelm
2025-07-15 19:00:47 +05:30
Kevin Driver
3ec6eb6482 8349594: Enhance TLS protocol support
Reviewed-by: rhalade, ahgross, wetmore, jnimeh
2025-07-15 19:00:47 +05:30
Christian Hagedorn
fae2345971 8349584: Improve compiler processing
Reviewed-by: rhalade, ahgross, epeter, thartmann
2025-07-15 19:00:47 +05:30
Prasanta Sadhukhan
6e490a465a 8349111: Enhance Swing supports
Reviewed-by: rhalade, jdv, prr
2025-07-15 19:00:47 +05:30
Phil Race
2555b5a632 8348989: Better Glyph drawing
Reviewed-by: mschoene, psadhukhan, jdv, rhalade
2025-07-15 19:00:47 +05:30
Volkan Yazici
caac8172ad 8349551: Failures in tests after JDK-8345625
Reviewed-by: jpai, dfuchs
2025-07-15 19:00:47 +05:30
Volkan Yazici
d1ea951d39 8345625: Better HTTP connections
Reviewed-by: skoivu, rhalade, ahgross, dfuchs, jpai, aefimov
2025-07-15 19:00:47 +05:30
Tobias Hartmann
7aa3f31724 8359678: C2: assert(static_cast<T1>(result) == thing) caused by ReverseBytesNode::Value()
Reviewed-by: chagedorn
Backport-of: e5ab210713
2025-07-15 11:35:53 +00:00
Richard Reingruber
ce85123f3a 8361602: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java deadlocks on exception
Reviewed-by: clanger, cjplummer
Backport-of: 917d0182cb
2025-07-15 08:02:44 +00:00
William Kemper
20fc8f74d5 8361529: GenShen: Fix bad assert in swap card tables
Reviewed-by: shade
Backport-of: 1de2acea77
2025-07-14 16:50:47 +00:00
Taizo Kurashige
db6230991b 8358819: The first year is not displayed correctly in Japanese Calendar
Backport-of: 99829950f6
2025-07-14 15:26:25 +00:00
Tobias Hartmann
dd82a0922b 8350177: C2 SuperWord: Integer.numberOfLeadingZeros, numberOfTrailingZeros, reverse and bitCount have input types wrongly truncated for byte and short
Reviewed-by: chagedorn
Backport-of: 77bd417c99
2025-07-14 07:31:27 +00:00
Srinivas Vamsi Parasa
9f21845262 8360775: Fix Shenandoah GC test failures when APX is enabled
Reviewed-by: shade, sviswanathan, jbhateja
Backport-of: 1c560727b8
2025-07-14 02:55:02 +00:00
Srinivas Vamsi Parasa
c5d0f1bc5e 8360776: Disable Intel APX by default and enable it with -XX:+UnlockExperimentalVMOptions -XX:+UseAPX in all builds
Reviewed-by: kvn, sviswanathan
Backport-of: 26b002805a
2025-07-12 21:34:48 +00:00
Chen Liang
c374ac6df4 8361615: CodeBuilder::parameterSlot throws undocumented IOOBE
Reviewed-by: asotona
Backport-of: c9bea77342
2025-07-11 22:52:41 +00:00
Dingli Zhang
98bc22a969 8361829: [TESTBUG] RISC-V: compiler/vectorization/runner/BasicIntOpTest.java fails with RVV but not Zvbb
Backport-of: 2e7e272d7b
2025-07-11 20:59:26 +00:00
Dingli Zhang
05dab283f2 8361532: RISC-V: Several vector tests fail after JDK-8354383
Backport-of: e0245682c8
2025-07-11 20:59:07 +00:00
Rob McKenna
8229274b2d Merge 2025-07-11 19:16:38 +00:00
Boris Ulasevich
44f5dfef97 8358183: [JVMCI] crash accessing nmethod::jvmci_name in CodeCache::aggregate
Reviewed-by: thartmann
Backport-of: 74822ce12a
2025-07-11 11:59:32 +00:00
David Holmes
9adc480ec3 8361447: [REDO] Checked version of JNI Release<type>ArrayElements needs to filter out known wrapped arrays
8361754: New test runtime/jni/checked/TestCharArrayReleasing.java can cause disk full errors

Reviewed-by: coleenp
Backport-of: f67e435431
2025-07-11 00:21:36 +00:00
William Kemper
4d5211ccb0 8357976: GenShen crash in swap_card_tables: Should be clean
Reviewed-by: shade
Backport-of: 382f870cd5
2025-07-10 22:26:14 +00:00
Vladimir Kozlov
e92f387ab5 8360942: [ubsan] aotCache tests trigger runtime error: applying non-zero offset 16 to null pointer in CodeBlob::relocation_end()
Reviewed-by: shade, thartmann
Backport-of: dedcce0450
2025-07-10 17:04:29 +00:00
Chris Plummer
96380509b3 8360312: Serviceability Agent tests fail with JFR enabled due to unknown thread type JfrRecorderThread
Reviewed-by: kevinw, sspitsyn
Backport-of: 712d866b72
2025-07-10 15:43:11 +00:00
Brian Burkhalter
9b99ed8b39 8361299: (bf) CharBuffer.getChars(int,int,char[],int) violates pre-existing specification
Reviewed-by: liach, alanb
Backport-of: 6249259c80
2025-07-10 15:14:31 +00:00
Richard Reingruber
532b1c732e 8360599: [TESTBUG] DumpThreadsWithEliminatedLock.java fails because of unstable inlining
Reviewed-by: mdoerr, kevinw
Backport-of: fea73c1d40
2025-07-10 07:34:40 +00:00
Erik Gahlin
1de8943731 8361175: JFR: Document differences between method sample events
Reviewed-by: mgronlun
Backport-of: 63e08d4af7
2025-07-09 15:32:57 +00:00
Jan Lahoda
50751da562 8361570: Incorrect 'sealed is not allowed here' compile-time error
Reviewed-by: liach, vromero
Backport-of: 853319439e
2025-07-09 13:41:05 +00:00
Nibedita Jena
83d69cab8b Merge
Reviewed-by: rreddy
2025-07-09 05:29:11 +00:00
Jan Lahoda
21cb2acda0 8361445: javac crashes on unresolvable constant in @SuppressWarnings
Reviewed-by: liach, asotona
Backport-of: 0bd2f9cba2
2025-07-09 05:07:20 +00:00
Vicente Romero
0e4422b284 8361214: An anonymous class is erroneously being classify as an abstract class
Reviewed-by: liach
Backport-of: 05c9eec8d0
2025-07-08 21:13:43 +00:00
Ioi Lam
1e985168d6 8358680: AOT cache creation fails: no strings should have been added
Reviewed-by: shade, kvn
Backport-of: 3daa03c30f
2025-07-08 19:02:36 +00:00
Ioi Lam
b8965318c1 8360164: AOT cache creation crashes in ~ThreadTotalCPUTimeClosure()
Reviewed-by: shade, kvn
Backport-of: 7d7e60c8ae
2025-07-08 17:36:10 +00:00
Ioi Lam
afe6bd6910 8336147: Clarify CDS documentation about static vs dynamic archive
Reviewed-by: shade
Backport-of: 854de8c9c6
2025-07-08 17:34:39 +00:00
Matthias Baesken
5500a2d134 8357826: Avoid running some jtreg tests when asan is configured
Backport-of: d7aa349820
2025-07-08 15:12:25 +00:00
Erik Gahlin
b3b5595362 8361338: JFR: Min and max time in MethodTime event is confusing
Reviewed-by: shade
Backport-of: f3e0588d0b
2025-07-08 14:03:56 +00:00
Jan Lahoda
5e716fd7d1 8359596: Behavior change when both -Xlint:options and -Xlint:-options flags are given
Reviewed-by: liach
Backport-of: 3525a40f39
2025-07-08 07:16:25 +00:00
Roger Riggs
3e93b98baf 8354872: Clarify java.lang.Process resource cleanup
Reviewed-by: iris
Backport-of: afb4a1be9e
2025-07-07 22:18:03 +00:00
Kieran Farrell
1ce41821b5 8359454: Enhance String handling
Backport-of: 2f2665738a67aeed224b54870608a346eb627d2a
2025-07-07 18:46:07 +00:00
Ian Myers
829742bcb4 8358577: Test serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java failed: unexpexcted monitor object
Backport-of: 8f487d26c0
2025-07-07 16:24:14 +00:00
Manukumar V S
9a73987f9b 8359889: java/awt/MenuItem/SetLabelTest.java inadvertently triggers clicks on items pinned to the taskbar
Reviewed-by: abhiscxk, aivanov
Backport-of: b7fcd0b235
2025-07-07 13:14:30 +00:00
Matthias Baesken
622c743470 8360533: ContainerRuntimeVersionTestUtils fromVersionString fails with some docker versions
Backport-of: 97ec9d3e0a
2025-07-07 07:16:40 +00:00
Erik Gahlin
8707167ef3 8358750: JFR: EventInstrumentation MASK_THROTTLE* constants should be computed in longs
Reviewed-by: mgronlun
Backport-of: 77e69e02eb
2025-07-04 15:07:32 +00:00
Erik Gahlin
e3bd9c6e1c 8360287: JFR: PlatformTracer class should be loaded lazily
Reviewed-by: mgronlun
Backport-of: 8ea544c33f
2025-07-03 18:34:38 +00:00
Martin Doerr
993215f3dd 8361259: JDK25: Backout JDK-8258229
Reviewed-by: mhaessig, thartmann, dlong
2025-07-03 08:52:23 +00:00
Martin Doerr
8a98738f44 8361183: JDK-8360887 needs fixes to avoid cycles and better tests (aix)
Reviewed-by: mbaesken
Backport-of: c460f842bf
2025-07-03 08:46:22 +00:00
Ashutosh Mehra
ab01396209 8361101: AOTCodeAddressTable::_stubs_addr not initialized/freed properly
Reviewed-by: shade
Backport-of: 3066a67e62
2025-07-02 17:49:52 +00:00
Kevin Walls
92268e17be 8359870: JVM crashes in AccessInternal::PostRuntimeDispatch
Reviewed-by: alanb, sspitsyn
Backport-of: 13a3927855
2025-07-02 16:59:29 +00:00
Renjith Kannath Pariyangad
94b6b99ba4 8358452: JNI exception pending in Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKeyImpl of screencast_pipewire.c:1214 (ID: 51119)
Backport-of: 2103dc15cb
2025-07-02 16:44:01 +00:00
Martin Doerr
a98a5e54fc 8360887: (fs) Files.getFileAttributeView returns unusable FileAttributeView if UserDefinedFileAttributeView unavailable (aix)
Reviewed-by: mbaesken
Backport-of: 0572b6ece7
2025-07-02 15:34:12 +00:00
Aleksey Shipilev
b245c517e3 8359436: AOTCompileEagerly should not be diagnostic
Reviewed-by: kvn
Backport-of: e138297323
2025-07-02 11:52:28 +00:00
Tobias Hartmann
0a151c68d6 8358179: Performance regression in Math.cbrt
Reviewed-by: epeter
Backport-of: 38f59f84c9
2025-07-02 08:23:19 +00:00
Jaikiran Pai
554e38dd5a 8359337: XML/JAXP tests that make network connections should ensure that no proxy is selected
Reviewed-by: dfuchs, iris, joehw
Backport-of: 7583a7b857
2025-07-02 01:36:10 +00:00
Fei Yang
26d99e045a 8359270: C2: alignment check should consider base offset when emitting arraycopy runtime call
Backport-of: 6b4393917a
2025-07-01 00:49:45 +00:00
Archie Cobbs
16addb192b 8359596: Behavior change when both -Xlint:options and -Xlint:-options flags are given
Backport-of: 3525a40f39
2025-06-30 16:54:20 +00:00
Aleksey Shipilev
b5b0b3a33a 8360201: JFR: Initialize JfrThreadLocal::_sampling_critical_section
Reviewed-by: zgu
Backport-of: 5c1f77fab1
2025-06-30 13:28:03 +00:00
David Holmes
0dc9e8447b 8358645: Access violation in ThreadsSMRSupport::print_info_on during thread dump
Reviewed-by: shade, dcubed
Backport-of: 334683e634
2025-06-30 01:06:46 +00:00
Alisen Chung
12ffb0c131 8359761: JDK 25 RDP1 L10n resource files update
Reviewed-by: jlu, aivanov
Backport-of: da7080fffb
2025-06-27 19:28:15 +00:00
Roland Westrelin
eaaaae5be9 8356708: C2: loop strip mining expansion doesn't take sunk stores into account
Reviewed-by: thartmann, epeter
Backport-of: c11f36e620
2025-06-27 16:27:33 +00:00
Jaikiran Pai
926c900efa 8359830: Incorrect os.version reported on macOS Tahoe 26 (Beta)
Reviewed-by: rriggs
Backport-of: 8df6b2c4a3
2025-06-27 02:18:57 +00:00
Roman Kennke
658f80e392 8355319: Update Manpage for Compact Object Headers (Production)
Reviewed-by: coleenp
Backport-of: 75ce44aa84
2025-06-26 12:32:36 +00:00
Martin Doerr
274a2dd729 8360405: [PPC64] some environments don't support mfdscr instruction
Reviewed-by: haosun, rrich
Backport-of: f71d64fbeb
2025-06-26 09:14:18 +00:00
Michael McMahon
a84946dde4 8359268: 3 JNI exception pending defect groups in 2 files
Reviewed-by: dfuchs, djelinski
Backport-of: 1fa090524a
2025-06-25 16:17:18 +00:00
Igor Veresov
fdb3e37c71 8359788: Internal Error: assert(get_instanceKlass()->is_loaded()) failed: must be at least loaded
Reviewed-by: shade
Backport-of: 5c4f92ba9a
2025-06-25 16:12:45 +00:00
Fei Yang
e23c817521 8360179: RISC-V: Only enable BigInteger intrinsics when AvoidUnalignedAccess == false
Backport-of: 34412da52b
2025-06-25 11:16:01 +00:00
Ravi Reddy
0ad5402463 8359059: Bump version numbers for 25.0.1
Reviewed-by: erikj
Backport-of: bff98e7d4d
2025-06-25 09:59:47 +00:00
Hannes Wallnöfer
80cb773b7e 8328848: Inaccuracy in the documentation of the -group option
Reviewed-by: liach
Backport-of: f8de5bc582
2025-06-25 05:40:18 +00:00
Hannes Wallnöfer
a576952039 8359024: Accessibility bugs in API documentation
Reviewed-by: liach
Backport-of: 9a726df373
2025-06-25 05:36:31 +00:00
Anthony Scarpino
b89f364842 8358099: PEM spec updates
Reviewed-by: weijun
Backport-of: 78158f30ae
2025-06-24 19:32:07 +00:00
Coleen Phillimore
0694cc1d52 8352075: Perf regression accessing fields
Reviewed-by: shade, iklam
Backport-of: e18277b470
2025-06-24 17:10:28 +00:00
Markus Grönlund
a3abaadc15 8360403: Disable constant pool ID assert during troubleshooting
Reviewed-by: egahlin
Backport-of: cbcf401170
2025-06-24 16:49:43 +00:00
Aleksey Shipilev
7cc1f82b84 8360042: GHA: Bump MSVC to 14.44
Reviewed-by: serb
Backport-of: 72679c94ee
2025-06-24 05:48:20 +00:00
William Kemper
636b56374e 8357550: GenShen crashes during freeze: assert(!chunk->requires_barriers()) failed
Reviewed-by: shade
Backport-of: 17cf49746d
2025-06-23 21:03:04 +00:00
Phil Race
fe9efb75b0 8358526: Clarify behavior of java.awt.HeadlessException constructed with no-args
Reviewed-by: honkar, tr, azvegint
Backport-of: 81985d422d
2025-06-23 17:05:48 +00:00
Erik Gahlin
ca6b165003 8359895: JFR: method-timing view doesn't work
Reviewed-by: mgronlun
Backport-of: 984d7f9cdf
2025-06-23 13:09:03 +00:00
Erik Gahlin
d5aa225451 8359242: JFR: Missing help text for method trace and timing
Reviewed-by: mgronlun
Backport-of: e57a214e2a
2025-06-23 12:22:30 +00:00
Matthias Bläsing
79a85df074 8353950: Clipboard interaction on Windows is unstable
8332271: Reading data from the clipboard from multiple threads crashes the JVM

Reviewed-by: prr
Backport-of: 92be7821f5
2025-06-20 21:49:26 +00:00
Jaikiran Pai
41928aed7d 8359709: java.net.HttpURLConnection sends unexpected "Host" request header in some cases after JDK-8344190
Reviewed-by: dfuchs
Backport-of: 57266064a7
2025-06-20 09:47:26 +00:00
Tobias Hartmann
3f6b0c69c3 8359386: Fix incorrect value for max_size of C2CodeStub when APX is used
Reviewed-by: mhaessig, epeter
Backport-of: b52af182c4
2025-06-20 08:29:10 +00:00
SendaoYan
36b185a930 8359402: Test CloseDescriptors.java should throw SkippedException when there is no lsof/sctp
Reviewed-by: jpai
Backport-of: a16d23557b
2025-06-20 06:26:52 +00:00
Erik Gahlin
c832f001e4 8359593: JFR: Instrumentation of java.lang.String corrupts recording
Reviewed-by: mgronlun
Backport-of: 2f2acb2e3f
2025-06-19 14:19:16 +00:00
Vladimir Kozlov
e5ac75a35b 8359646: C1 crash in AOTCodeAddressTable::add_C_string
Reviewed-by: shade, thartmann
Backport-of: 96070212ad
2025-06-19 13:41:06 +00:00
Erik Gahlin
b79ca5f03b 8359248: JFR: Help text for-XX:StartFlightRecording:report-on-exit should explain option can be repeated
Reviewed-by: mgronlun
Backport-of: fedd0a0ee3
2025-06-19 12:56:19 +00:00
Fei Yang
ee45ba9138 8359218: RISC-V: Only enable CRC32 intrinsic when AvoidUnalignedAccess == false
Backport-of: 65e63b6ab4
2025-06-18 11:50:22 +00:00
Stuart Marks
5bcea92eaa 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs
Reviewed-by: naoto, bpb, liach
Backport-of: 06d804a0f0
2025-06-17 20:45:27 +00:00
Damon Fenacci
cc4e9716ac 8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406
Reviewed-by: shade
Backport-of: 534a8605e5
2025-06-17 13:10:06 +00:00
Roland Westrelin
46cfc1e194 8358334: C2/Shenandoah: incorrect execution with Unsafe
Reviewed-by: thartmann
Backport-of: 1fcede053c
2025-06-17 08:06:58 +00:00
Rajan Halade
ae71782e77 8359170: Add 2 TLS and 2 CS Sectigo roots
Reviewed-by: mullan
Backport-of: 9586817cea
2025-06-17 06:10:35 +00:00
Ioi Lam
753700182d 8355556: JVM crash because archived method handle intrinsics are not restored
Reviewed-by: shade
Backport-of: 366650a438
2025-06-17 04:36:41 +00:00
SendaoYan
eb727dcb51 8359272: Several vmTestbase/compact tests timed out on large memory machine
Reviewed-by: ayang
Backport-of: a0fb35c837
2025-06-17 00:43:52 +00:00
Johannes Bechberger
b6cacfcbc8 8359135: New test TestCPUTimeSampleThrottling fails intermittently
Reviewed-by: mdoerr
Backport-of: 3f0fef2c9c
2025-06-16 16:20:54 +00:00
Hamlin Li
d870a48880 8358892: RISC-V: jvm crash when running dacapo sunflow after JDK-8352504
8359045: RISC-V: construct test to verify invocation of C2_MacroAssembler::enc_cmove_cmp_fp => BoolTest::ge/gt

Reviewed-by: fyang
Backport-of: 9d060574e5
2025-06-16 11:18:32 +00:00
Fernando Guallini
2ea2f74f92 8358171: Additional code coverage for PEM API
Reviewed-by: rhalade, ascarpino
Backport-of: b2e7cda6a0
2025-06-16 09:54:18 +00:00
Alan Bateman
077ce2edc7 8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win)
Reviewed-by: iris, jpai
Backport-of: e5196fc24d
2025-06-16 09:19:56 +00:00
Tobias Hartmann
2a3294571a 8359327: Incorrect AVX3Threshold results into code buffer overflows on APX targets
Reviewed-by: chagedorn
Backport-of: e7f63ba310
2025-06-16 08:48:49 +00:00
SendaoYan
3877746eb9 8359181: Error messages generated by configure --help after 8301197
Reviewed-by: ihse
Backport-of: 7b7136b4ec
2025-06-15 12:25:17 +00:00
Tobias Hartmann
3bd80fe3ba 8357782: JVM JIT Causes Static Initialization Order Issue
Reviewed-by: shade
Backport-of: e8ef93ae9d
2025-06-15 09:05:56 +00:00
Tobias Hartmann
03232d4a5d 8359200: Memory corruption in MStack::push
Reviewed-by: epeter, shade
Backport-of: ed39e17e34
2025-06-15 09:04:55 +00:00
Daniel Fuchs
4111730845 8359364: java/net/URL/EarlyOrDelayedParsing test fails intermittently
Reviewed-by: alanb
Backport-of: 57cabc6d74
2025-06-13 16:54:40 +00:00
Kevin Walls
74ea38e406 8358701: Remove misleading javax.management.remote API doc wording about JMX spec, and historic link to JMXMP
Reviewed-by: alanb
Backport-of: 66535fe26d
2025-06-13 14:28:14 +00:00
Tobias Hartmann
839a91e14b 8357982: Fix several failing BMI tests with -XX:+UseAPX
Reviewed-by: chagedorn
Backport-of: c98dffa186
2025-06-12 11:11:41 +00:00
Daniel Fuchs
aa4f79eaec 8358617: java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fails with 403 due to system proxies
Reviewed-by: jpai
Backport-of: a377773fa7
2025-06-11 16:22:34 +00:00
Rob McKenna
bff98e7d4d 8359059: Bump version numbers for 25.0.1
Reviewed-by: iris
2025-06-09 23:01:41 +00:00
Stuart Marks
c7df72ff0f 8358809: Improve link to stdin.encoding from java.lang.IO
Reviewed-by: naoto
Backport-of: d024f58e61
2025-06-07 00:56:45 +00:00
Rajan Halade
80e066e733 8345414: Google CAInterop test failures
Reviewed-by: weijun
Backport-of: 8e9ba788ae
2025-06-06 21:31:33 +00:00
1149 changed files with 28226 additions and 14141 deletions

View File

@@ -65,4 +65,4 @@ runs:
with:
name: bundles-jtreg-${{ steps.version.outputs.value }}
path: jtreg/installed
retention-days: 1
retention-days: 5

View File

@@ -30,15 +30,15 @@ runs:
using: composite
steps:
- name: 'Install MSYS2'
uses: msys2/setup-msys2@v2.22.0
id: msys2
uses: msys2/setup-msys2@v2.28.0
with:
install: 'autoconf tar unzip zip make'
path-type: minimal
location: ${{ runner.tool_cache }}/msys2
release: false
# We can't run bash until this is completed, so stick with pwsh
- name: 'Set MSYS2 path'
run: |
# Prepend msys2/msys64/usr/bin to the PATH
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
echo "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
shell: pwsh

View File

@@ -91,5 +91,5 @@ runs:
with:
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
path: bundles
retention-days: 1
retention-days: 5
if: steps.bundles.outputs.bundles-found == 'true'

View File

@@ -51,6 +51,10 @@ on:
make-arguments:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
jobs:
build-linux:
@@ -104,9 +108,11 @@ jobs:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}

View File

@@ -40,6 +40,10 @@ on:
make-arguments:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
jobs:
build-cross-compile:
@@ -60,33 +64,33 @@ jobs:
gnu-arch: aarch64
debian-arch: arm64
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
debian-version: trixie
tolerate-sysroot-errors: false
- target-cpu: arm
gnu-arch: arm
debian-arch: armhf
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
debian-version: trixie
tolerate-sysroot-errors: false
gnu-abi: eabihf
- target-cpu: s390x
gnu-arch: s390x
debian-arch: s390x
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
debian-version: trixie
tolerate-sysroot-errors: false
- target-cpu: ppc64le
gnu-arch: powerpc64le
debian-arch: ppc64el
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
debian-version: trixie
tolerate-sysroot-errors: false
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://httpredir.debian.org/debian/
debian-version: sid
tolerate-sysroot-errors: true
debian-version: trixie
tolerate-sysroot-errors: false
steps:
- name: 'Checkout the JDK source'
@@ -189,4 +193,4 @@ jobs:
with:
make-target: 'hotspot ${{ inputs.make-arguments }}'
platform: linux-${{ matrix.target-cpu }}
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
if: ((steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true') && inputs.dry-run == false)

View File

@@ -61,6 +61,10 @@ on:
make-arguments:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
bundle-suffix:
required: false
type: string
@@ -139,6 +143,7 @@ jobs:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
if: ${{ inputs.dry-run == false }}
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
@@ -147,3 +152,4 @@ jobs:
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
bundle-suffix: ${{ inputs.bundle-suffix }}
static-suffix: ${{ inputs.static-suffix }}
if: ${{ inputs.dry-run == false }}

View File

@@ -54,6 +54,10 @@ on:
make-arguments:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
jobs:
build-macos:
@@ -118,9 +122,11 @@ jobs:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}

View File

@@ -54,6 +54,10 @@ on:
make-arguments:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
env:
# These are needed to make the MSYS2 bash work properly
@@ -139,6 +143,7 @@ jobs:
# Set PATH to "", so just GITHUB_PATH is included
PATH: ''
shell: env /usr/bin/bash --login -eo pipefail {0}
if: ${{ inputs.dry-run == false }}
- name: 'Build'
id: build
@@ -147,9 +152,11 @@ jobs:
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}
- name: 'Upload bundles'
uses: ./.github/actions/upload-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
if: ${{ inputs.dry-run == false }}

View File

@@ -28,9 +28,7 @@ name: 'OpenJDK GHA Sanity Checks'
on:
push:
branches-ignore:
- master
- pr/*
- jdk*
workflow_dispatch:
inputs:
platforms:
@@ -43,6 +41,9 @@ on:
make-arguments:
description: 'Additional make arguments'
required: false
dry-run:
description: 'Dry run: skip actual builds and tests'
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -70,6 +71,7 @@ jobs:
windows-x64: ${{ steps.include.outputs.windows-x64 }}
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
docs: ${{ steps.include.outputs.docs }}
dry-run: ${{ steps.include.outputs.dry-run }}
steps:
- name: 'Checkout the scripts'
@@ -143,6 +145,35 @@ jobs:
echo 'false'
}
function check_dry_run() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
# Take the user-specified one.
echo '${{ github.event.inputs.dry-run }}'
return
elif [[ $GITHUB_EVENT_NAME == push ]]; then
# Cut out the real branch name
BRANCH=${GITHUB_REF##*/}
# Dry run rebuilds the caches in current branch, so they can be reused
# for any child PR branches. Because of this, we want to trigger this
# workflow in master branch, so that actual PR branches can use the cache.
# This workflow would trigger every time contributors sync their master
# branches in their personal forks.
if [[ $BRANCH == "master" ]]; then
echo 'true'
return
fi
# ...same for stabilization branches
if [[ $BRANCH =~ "jdk(.*)" ]]; then
echo 'true'
return
fi
fi
echo 'false'
}
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
@@ -152,6 +183,7 @@ jobs:
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
###
### Build jobs
@@ -166,6 +198,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64 == 'true'
build-linux-x64-hs-nopch:
@@ -180,6 +213,7 @@ jobs:
extra-conf-options: '--disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-zero:
@@ -194,6 +228,7 @@ jobs:
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-minimal:
@@ -208,6 +243,7 @@ jobs:
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
build-linux-x64-hs-optimized:
@@ -223,6 +259,7 @@ jobs:
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-x64-variants == 'true'
build-linux-x64-static:
@@ -238,6 +275,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
static-suffix: "-static"
if: needs.prepare.outputs.linux-x64 == 'true'
@@ -254,6 +292,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
# This bundle is not used by testing jobs, but downstreams use it to check that
# dependent projects, e.g. libgraal, builds fine.
@@ -268,6 +307,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.linux-cross-compile == 'true'
build-alpine-linux-x64:
@@ -278,6 +318,7 @@ jobs:
platform: alpine-linux-x64
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
build-macos-x64:
@@ -286,10 +327,11 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
runs-on: 'macos-13'
xcode-toolset-version: '14.3.1'
runs-on: 'macos-15-intel'
xcode-toolset-version: '16.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.macos-x64 == 'true'
build-macos-aarch64:
@@ -298,10 +340,11 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '15.4'
runs-on: 'macos-15'
xcode-toolset-version: '16.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.macos-aarch64 == 'true'
build-windows-x64:
@@ -310,10 +353,11 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
msvc-toolset-version: '14.43'
msvc-toolset-version: '14.44'
msvc-toolset-architecture: 'x86.x64'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.windows-x64 == 'true'
build-windows-aarch64:
@@ -322,12 +366,13 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-aarch64
msvc-toolset-version: '14.43'
msvc-toolset-version: '14.44'
msvc-toolset-architecture: 'arm64'
make-target: 'hotspot'
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.windows-aarch64 == 'true'
build-docs:
@@ -344,6 +389,7 @@ jobs:
gcc-major-version: '10'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
if: needs.prepare.outputs.docs == 'true'
###
@@ -353,17 +399,20 @@ jobs:
test-linux-x64:
name: linux-x64
needs:
- prepare
- build-linux-x64
uses: ./.github/workflows/test.yml
with:
platform: linux-x64
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
debug-suffix: -debug
test-linux-x64-static:
name: linux-x64-static
needs:
- prepare
- build-linux-x64
- build-linux-x64-static
uses: ./.github/workflows/test.yml
@@ -371,27 +420,32 @@ jobs:
platform: linux-x64
bootjdk-platform: linux-x64
runs-on: ubuntu-22.04
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
static-suffix: "-static"
test-macos-aarch64:
name: macos-aarch64
needs:
- prepare
- build-macos-aarch64
uses: ./.github/workflows/test.yml
with:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'
runs-on: macos-15
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
xcode-toolset-version: '16.4'
debug-suffix: -debug
test-windows-x64:
name: windows-x64
needs:
- prepare
- build-windows-x64
uses: ./.github/workflows/test.yml
with:
platform: windows-x64
bootjdk-platform: windows-x64
runs-on: windows-2025
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
debug-suffix: -debug

View File

@@ -40,6 +40,10 @@ on:
xcode-toolset-version:
required: false
type: string
dry-run:
required: false
type: boolean
default: false
debug-suffix:
required: false
type: string
@@ -147,6 +151,7 @@ jobs:
platform: ${{ inputs.platform }}
debug-suffix: ${{ matrix.debug-suffix }}
static-suffix: ${{ inputs.static-suffix }}
if: ${{ inputs.dry-run == false }}
- name: 'Install dependencies'
run: |
@@ -199,6 +204,7 @@ jobs:
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
env:
PATH: ${{ steps.path.outputs.value }}
if: ${{ inputs.dry-run == false }}
# This is a separate step, since if the markdown from a step gets bigger than
# 1024 kB it is skipped, but then the short summary above is still generated

View File

@@ -1,7 +1,7 @@
[general]
project=jdk
project=jdk-updates
jbs=JDK
version=25
version=25.0.2
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright

View File

@@ -116,6 +116,9 @@ else ifeq ($(call isTargetOs, aix), true)
$(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
)
STATIC_LIBS := -Wl,-bexpfull $(STATIC_LIB_FILES) $(addprefix -Wl$(COMMA)-bE:, $(STATIC_LIB_EXPORT_FILES))
ifeq ($(DEBUG_LEVEL), slowdebug)
STATIC_LIBS += -Wl,-bbigtoc
endif
else
$(error Unsupported platform)
endif

View File

@@ -378,7 +378,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
# Check if it's a GNU date compatible version
AC_MSG_CHECKING([if date is a GNU compatible version])
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"`
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox\|uutils"`
if test "x$check_date" != x; then
AC_MSG_RESULT([yes])
IS_GNU_DATE=yes

View File

@@ -446,6 +446,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
# Force en-US environment
UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=off:stdout],boot_jdk_jvmargs,[$JAVA])
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=warning:stderr],boot_jdk_jvmargs,[$JAVA])
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
# Use our own CDS archive
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -366,7 +366,7 @@ EOT
# Print additional help, e.g. a list of toolchains and JVM features.
# This must be done by the autoconf script.
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )
cat <<EOT

View File

@@ -221,6 +221,9 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
# LeakSanitizer
JDKOPT_SETUP_LEAK_SANITIZER
# Setup static analyzer
JDKOPT_SETUP_STATIC_ANALYZER
# Fallback linker
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
JDKOPT_SETUP_FALLBACK_LINKER

View File

@@ -736,8 +736,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
elif test "x$FLAGS_CPU" = xppc64le; then
# Little endian machine uses ELFv2 ABI.
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
$1_CFLAGS_CPU="-mcpu=power8 -mtune=power10"
# Use Power8 for target cpu, this is the first CPU to support PPC64 LE with ELFv2 ABI.
# Use Power10 for tuning target, this is supported by gcc >= 10
POWER_TUNE_VERSION="-mtune=power10"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${POWER_TUNE_VERSION}],
IF_FALSE: [
POWER_TUNE_VERSION="-mtune=power8"
]
)
$1_CFLAGS_CPU="-mcpu=power8 ${POWER_TUNE_VERSION}"
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2"
fi
elif test "x$FLAGS_CPU" = xs390x; then
@@ -933,7 +940,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
# ACLE and this flag are required to build the aarch64 SVE related functions in
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
# that check.
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
@@ -947,6 +954,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
[
AC_MSG_RESULT([yes])
$2SVE_CFLAGS="-march=armv8-a+sve"
# Switching the initialization mode with gcc from 'pattern' to 'zero'
# avoids the use of unsupported `__builtin_clear_padding` for variable
# length aggregates
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
IF_TRUE: [
$2SVE_CFLAGS="${$2SVE_CFLAGS} $INIT_ZERO_FLAG"
]
)
fi
],
[
AC_MSG_RESULT([no])

View File

@@ -479,6 +479,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
AC_SUBST(ASAN_ENABLED)
])
################################################################################
#
# Static analyzer
#
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER],
[
UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED,
DESC: [enable the GCC static analyzer],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if static analyzer is available])
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AVAILABLE=false
fi
],
IF_ENABLED: [
STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak"
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS"
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS"
])
AC_SUBST(STATIC_ANALYZER_ENABLED)
])
################################################################################
#
# LeakSanitizer

View File

@@ -28,7 +28,7 @@
################################################################################
# Minimum supported versions
JTREG_MINIMUM_VERSION=7.5.1
JTREG_MINIMUM_VERSION=8
GTEST_MINIMUM_VERSION=1.14.0
################################################################################

View File

@@ -136,12 +136,8 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
fi
# librt for legacy clock_gettime
# librt - for timers (timer_* functions)
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Hotspot needs to link librt to get the clock_* functions.
# But once our supported minimum build and runtime platform
# has glibc 2.17, this can be removed as the functions are
# in libc.
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
fi

View File

@@ -26,7 +26,7 @@
# Versions and download locations for dependencies used by GitHub Actions (GHA)
GTEST_VERSION=1.14.0
JTREG_VERSION=7.5.1+1
JTREG_VERSION=8+2
LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz

View File

@@ -1174,9 +1174,9 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
version: "7.5.1",
build_number: "1",
file: "bundles/jtreg-7.5.1+1.zip",
version: "8",
build_number: "2",
file: "bundles/jtreg-8+2.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),

View File

@@ -28,15 +28,15 @@
DEFAULT_VERSION_FEATURE=25
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_UPDATE=2
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2025-09-16
DEFAULT_VERSION_DATE=2026-01-20
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25"
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=

View File

@@ -62,5 +62,8 @@
// thread so it is easier to track down. You can override these options by setting the environment
// variable UBSAN_OPTIONS.
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
return "halt_on_error=1,"
"handle_segv=0,"
"handle_sigbus=0,"
"print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
}

View File

@@ -84,6 +84,8 @@ define CreateFromTemplate
$(SED) -e 's!{{TOPDIR}}!$(call SedEscape,$(call FixPath,$(TOPDIR)))!g' \
-e 's!{{TOPDIR_RELATIVE}}!$(call SedEscape,$(call FixPath,$(strip \
$(call RelativePath,$(OUTPUTDIR),$(TOPDIR)))))!g' \
-e 's!{{TOPDIR_BASE}}!$(notdir $(TOPDIR))!g' \
-e 's!{{OUTPUT_BASE}}!$(notdir $(OUTPUTDIR))!g' \
-e 's!{{WORKSPACE_ROOT}}!$(call SedEscape,$(call FixPath,$(WORKSPACE_ROOT)))!g' \
-e 's!{{OUTPUTDIR}}!$(call SedEscape,$(call FixPath,$(OUTPUTDIR)))!g' \
-e 's!{{CONF_NAME}}!$(CONF_NAME)!g' \

View File

@@ -1,12 +1,12 @@
{
"folders": [
{
"name": "Source root",
"name": "Source root ({{TOPDIR_BASE}})",
"path": "{{TOPDIR}}"
},
// {{EXTRA_WORKSPACE_ROOT}}
{
"name": "Build artifacts",
"name": "Build artifacts ({{OUTPUT_BASE}})",
"path": "{{OUTPUTDIR}}"
}
],

View File

@@ -542,10 +542,10 @@ class Bundle {
if (pattern != null) {
// Perform date-time format pattern conversion which is
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter);
dateTimePatterns.add(i, transPattern);
// Additionally, perform SDF specific date-time format pattern conversion
sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter));
sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter));
} else {
dateTimePatterns.add(i, null);
sdfPatterns.add(i, null);
@@ -568,7 +568,7 @@ class Bundle {
}
}
private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) {
private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) {
String pattern = cldrFormat;
int length = pattern.length();
boolean inQuote = false;
@@ -587,7 +587,7 @@ class Bundle {
if (nextc == '\'') {
i++;
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -597,7 +597,7 @@ class Bundle {
}
if (!inQuote) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -614,7 +614,7 @@ class Bundle {
}
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -627,7 +627,7 @@ class Bundle {
count++;
continue;
}
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = c;
count = 1;
}
@@ -637,7 +637,7 @@ class Bundle {
}
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
}
if (cldrFormat.contentEquals(jrePattern)) {
return cldrFormat;
@@ -661,7 +661,7 @@ class Bundle {
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
* for date-time formatting.
*/
private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'u':
case 'U':
@@ -683,7 +683,7 @@ class Bundle {
* Perform a conversion of CLDR date-time format pattern letter which is
* specific to the SimpleDateFormat.
*/
private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'G':
if (calendarType != CalendarType.GREGORIAN) {
@@ -722,6 +722,17 @@ class Bundle {
appendN('z', count, sb);
break;
case 'y':
// If the style is FULL/LONG for a Japanese Calendar, make the
// count == 4 for Gan-nen
if (calendarType == CalendarType.JAPANESE &&
(patternKey.contains("full-") ||
patternKey.contains("long-"))) {
count = 4;
}
appendN(cldrLetter, count, sb);
break;
case 'Z':
if (count == 4 || count == 5) {
sb.append("XXX");
@@ -767,6 +778,7 @@ class Bundle {
.collect(Collectors.toMap(
e -> calendarPrefix + e.getKey(),
e -> translateDateFormatLetters(calendarType,
e.getKey(),
(String)e.getValue(),
this::convertDateTimePatternLetter)
))
@@ -775,7 +787,7 @@ class Bundle {
@FunctionalInterface
private interface ConvertDateTimeLetters {
void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb);
void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb);
}
/**

View File

@@ -177,7 +177,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
endif
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
-DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0
-DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0 \
-DPNG_LOONGARCH_LSX_OPT=0
ifeq ($(call isTargetOs, linux)+$(call isTargetCpuArch, ppc), true+true)
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0

View File

@@ -68,7 +68,7 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
-rpath @executable_path/../PlugIns/, \
LIBS_macosx := -framework Cocoa, \
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
LIBS_linux := $(LIBDL), \
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
MANIFEST := $(JAVA_MANIFEST), \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
))
@@ -97,7 +97,7 @@ ifeq ($(call isTargetOs, linux), true)
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
LD_SET_ORIGIN := false, \
LIBS_linux := $(LIBDL), \
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
))
TARGETS += $(BUILD_LIBJPACKAGEAPPLAUNCHERAUX)

View File

@@ -62,7 +62,8 @@ BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
libExplicitAttach.c libImplicitAttach.c \
exelauncher.c
exelauncher.c \
libChangeSignalDisposition.c exePrintSignalDisposition.c
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX)
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
@@ -137,6 +138,7 @@ ifneq ($(filter build-test-jdk-jtreg-native, $(MAKECMDGOALS)), )
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
EXTRA_FILES := $(BUILD_JDK_JTREG_EXTRA_FILES), \
LIBS := $(LIBPTHREAD), \
))
endif

View File

@@ -456,13 +456,13 @@ SliderDemo.horizontal=Horizontal
SliderDemo.vertical=Vertikal
SliderDemo.plain=Einfach
SliderDemo.a_plain_slider=Ein einfacher Schieberegler
SliderDemo.majorticks=Grobteilungen
SliderDemo.majorticksdescription=Ein Schieberegler mit Grobteilungsmarkierungen
SliderDemo.ticks=Feinteilungen, Teilungen zum Einrasten und Labels
SliderDemo.minorticks=Feinteilungen
SliderDemo.minorticksdescription=Ein Schieberegler mit Grob- und Feinteilungen, mit Teilungen, in die der Schieberegler einrastet, wobei einige Teilungen mit einem sichtbaren Label versehen sind
SliderDemo.majorticks=Hauptteilstriche
SliderDemo.majorticksdescription=Ein Schieberegler mit Hauptteilstrichen
SliderDemo.ticks=Hilfsteilstriche, zum Einrasten und Beschriften
SliderDemo.minorticks=Hilfsteilstriche
SliderDemo.minorticksdescription=Ein Schieberegler mit Haupt- und Hilfsteilstrichen, in die der Schieberegler einrastet, wobei einige Teilstriche mit einer sichtbaren Beschriftung versehen sind
SliderDemo.disabled=Deaktiviert
SliderDemo.disableddescription=Ein Schieberegler mit Grob- und Feinteilungen, der nicht aktiviert ist (kann nicht bearbeitet werden)
SliderDemo.disableddescription=Ein Schieberegler mit Haupt- und Hilfsteilstrichen, der nicht aktiviert ist (kann nicht bearbeitet werden)
### SplitPane Demo ###

View File

@@ -3454,10 +3454,6 @@ encode %{
__ mov(dst_reg, (uint64_t)1);
%}
enc_class aarch64_enc_mov_byte_map_base(iRegP dst, immByteMapBase src) %{
__ load_byte_map_base($dst$$Register);
%}
enc_class aarch64_enc_mov_n(iRegN dst, immN src) %{
Register dst_reg = as_Register($dst$$reg);
address con = (address)$src$$constant;
@@ -4554,20 +4550,6 @@ operand immP_1()
interface(CONST_INTER);
%}
// Card Table Byte Map Base
operand immByteMapBase()
%{
// Get base of card map
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&)
(CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
match(ConP);
op_cost(0);
format %{ %}
interface(CONST_INTER);
%}
// Float and Double operands
// Double Immediate
operand immD()
@@ -6854,20 +6836,6 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
ins_pipe(ialu_imm);
%}
// Load Byte Map Base Constant
instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con)
%{
match(Set dst con);
ins_cost(INSN_COST);
format %{ "adr $dst, $con\t# Byte Map Base" %}
ins_encode(aarch64_enc_mov_byte_map_base(dst, con));
ins_pipe(ialu_imm);
%}
// Load Narrow Pointer Constant
instruct loadConN(iRegNNoSp dst, immN con)

View File

@@ -292,7 +292,8 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
} else {
assert(is_phantom, "only remaining strength");
assert(!is_narrow, "phantom access cannot be narrow");
__ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom));
// AOT saved adapters need relocation for this call.
__ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom)));
}
__ blr(lr);
__ mov(rscratch1, r0);

View File

@@ -1824,3 +1824,14 @@ void InterpreterMacroAssembler::load_method_entry(Register cache, Register index
add(cache, cache, Array<ResolvedMethodEntry>::base_offset_in_bytes());
lea(cache, Address(cache, index));
}
#ifdef ASSERT
void InterpreterMacroAssembler::verify_field_offset(Register reg) {
// Verify the field offset is not in the header, implicitly checks for 0
Label L;
subs(zr, reg, oopDesc::base_offset_in_bytes());
br(Assembler::GE, L);
stop("bad field offset");
bind(L);
}
#endif

View File

@@ -319,6 +319,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
void load_resolved_indy_entry(Register cache, Register index);
void load_field_entry(Register cache, Register index, int bcp_offset = 1);
void load_method_entry(Register cache, Register index, int bcp_offset = 1);
void verify_field_offset(Register reg) NOT_DEBUG_RETURN;
};
#endif // CPU_AARCH64_INTERP_MASM_AARCH64_HPP

View File

@@ -39,24 +39,22 @@ public:
// 3 - restoring an old state (javaCalls)
void clear(void) {
// No hardware barriers are necessary. All members are volatile and the profiler
// is run from a signal handler and only observers the thread its running on.
// clearing _last_Java_sp must be first
_last_Java_sp = nullptr;
OrderAccess::release();
_last_Java_fp = nullptr;
_last_Java_pc = nullptr;
}
void copy(JavaFrameAnchor* src) {
// In order to make sure the transition state is valid for "this"
// No hardware barriers are necessary. All members are volatile and the profiler
// is run from a signal handler and only observers the thread its running on.
// We must clear _last_Java_sp before copying the rest of the new data
//
// Hack Alert: Temporary bugfix for 4717480/4721647
// To act like previous version (pd_cache_state) don't null _last_Java_sp
// unless the value is changing
//
if (_last_Java_sp != src->_last_Java_sp) {
_last_Java_sp = nullptr;
OrderAccess::release();
}
_last_Java_fp = src->_last_Java_fp;
_last_Java_pc = src->_last_Java_pc;

View File

@@ -639,12 +639,13 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
last_java_sp = esp;
}
str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset()));
// last_java_fp is optional
if (last_java_fp->is_valid()) {
str(last_java_fp, Address(rthread, JavaThread::last_Java_fp_offset()));
}
// We must set sp last.
str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset()));
}
void MacroAssembler::set_last_Java_frame(Register last_java_sp,

View File

@@ -168,6 +168,7 @@ void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
Register temp_reg, bool load_bc_into_bc_reg/*=true*/,
int byte_no)
{
assert_different_registers(bc_reg, temp_reg);
if (!RewriteBytecodes) return;
Label L_patch_done;
@@ -231,9 +232,12 @@ void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
__ stop("patching the wrong bytecode");
__ bind(L_okay);
#endif
// patch bytecode
__ strb(bc_reg, at_bcp(0));
// Patch bytecode with release store to coordinate with ResolvedFieldEntry loads
// in fast bytecode codelets. load_field_entry has a memory barrier that gains
// the needed ordering, together with control dependency on entering the fast codelet
// itself.
__ lea(temp_reg, at_bcp(0));
__ stlrb(bc_reg, temp_reg);
__ bind(L_patch_done);
}
@@ -3082,6 +3086,7 @@ void TemplateTable::fast_storefield(TosState state)
// R1: field offset, R2: field holder, R5: flags
load_resolved_field_entry(r2, r2, noreg, r1, r5);
__ verify_field_offset(r1);
{
Label notVolatile;
@@ -3171,6 +3176,8 @@ void TemplateTable::fast_accessfield(TosState state)
__ load_field_entry(r2, r1);
__ load_sized_value(r1, Address(r2, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/);
__ verify_field_offset(r1);
__ load_unsigned_byte(r3, Address(r2, in_bytes(ResolvedFieldEntry::flags_offset())));
// r0: object
@@ -3237,7 +3244,9 @@ void TemplateTable::fast_xaccess(TosState state)
__ ldr(r0, aaddress(0));
// access constant pool cache
__ load_field_entry(r2, r3, 2);
__ load_sized_value(r1, Address(r2, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/);
__ verify_field_offset(r1);
// 8179954: We need to make sure that the code generated for
// volatile accesses forms a sequentially-consistent set of

View File

@@ -8888,13 +8888,8 @@ instruct TailCalljmpInd(IPRegP jump_target, inline_cache_regP method_ptr) %{
match(TailCall jump_target method_ptr);
ins_cost(CALL_COST);
format %{ "MOV Rexception_pc, LR\n\t"
"jump $jump_target \t! $method_ptr holds method" %}
format %{ "jump $jump_target \t! $method_ptr holds method" %}
ins_encode %{
__ mov(Rexception_pc, LR); // this is used only to call
// StubRoutines::forward_exception_entry()
// which expects PC of exception in
// R5. FIXME?
__ jump($jump_target$$Register);
%}
ins_pipe(tail_call);
@@ -8939,8 +8934,10 @@ instruct ForwardExceptionjmp()
match(ForwardException);
ins_cost(CALL_COST);
format %{ "b forward_exception_stub" %}
format %{ "MOV Rexception_pc, LR\n\t"
"b forward_exception_entry" %}
ins_encode %{
__ mov(Rexception_pc, LR);
// OK to trash Rtemp, because Rtemp is used by stub
__ jump(StubRoutines::forward_exception_entry(), relocInfo::runtime_call_type, Rtemp);
%}

View File

@@ -100,7 +100,7 @@ int AbstractInterpreter::size_activation(int max_stack,
// It is also guaranteed to be walkable even though it is in a skeletal state
//
// is_top_frame == true:
// We're processing the *oldest* interpreter frame!
// We're processing the *youngest* interpreter frame on top of stack!
//
// pop_frame_extra_args:
// If this is != 0 we are returning to a deoptimized frame by popping
@@ -131,8 +131,9 @@ void AbstractInterpreter::layout_activation(Method* method,
#ifdef ASSERT
if (caller->is_interpreted_frame()) {
assert(locals_base <= caller->interpreter_frame_expression_stack(), "bad placement");
const int caller_abi_bytesize = (is_bottom_frame ? frame::top_ijava_frame_abi_size : frame::parent_ijava_frame_abi_size);
intptr_t* l2 = caller->sp() + method->max_locals() - 1 + (caller_abi_bytesize / Interpreter::stackElementSize);
// If the bottom frame's caller was thawed then it has frame::java_abi (aka parent_ijava_frame_abi).
// With an ordinary i2c call it would keep the larger frame::top_ijava_frame_abi
intptr_t* l2 = caller->sp() + method->max_locals() - 1 + (frame::parent_ijava_frame_abi_size / Interpreter::stackElementSize);
assert(locals_base >= l2, "bad placement");
}
#endif

View File

@@ -133,8 +133,13 @@ class InterpreterMacroAssembler: public MacroAssembler {
void get_cache_index_at_bcp(Register Rdst, int bcp_offset, size_t index_size);
void load_resolved_indy_entry(Register cache, Register index);
void load_field_entry(Register cache, Register index, int bcp_offset = 1);
void load_method_entry(Register cache, Register index, int bcp_offset = 1);
void load_field_or_method_entry(bool is_method, Register cache, Register index, int bcp_offset, bool for_fast_bytecode);
void load_field_entry(Register cache, Register index, int bcp_offset = 1, bool for_fast_bytecode = false) {
load_field_or_method_entry(false, cache, index, bcp_offset, for_fast_bytecode);
}
void load_method_entry(Register cache, Register index, int bcp_offset = 1, bool for_fast_bytecode = false) {
load_field_or_method_entry(true, cache, index, bcp_offset, for_fast_bytecode);
}
void get_u4(Register Rdst, Register Rsrc, int offset, signedOrNot is_signed);

View File

@@ -468,33 +468,33 @@ void InterpreterMacroAssembler::load_resolved_indy_entry(Register cache, Registe
add(cache, cache, index);
}
void InterpreterMacroAssembler::load_field_entry(Register cache, Register index, int bcp_offset) {
void InterpreterMacroAssembler::load_field_or_method_entry(bool is_method, Register cache, Register index, int bcp_offset, bool for_fast_bytecode) {
const int entry_size = is_method ? sizeof(ResolvedMethodEntry) : sizeof(ResolvedFieldEntry),
base_offset = is_method ? Array<ResolvedMethodEntry>::base_offset_in_bytes() : Array<ResolvedFieldEntry>::base_offset_in_bytes(),
entries_offset = is_method ? in_bytes(ConstantPoolCache::method_entries_offset()) : in_bytes(ConstantPoolCache::field_entries_offset());
// Get index out of bytecode pointer
get_cache_index_at_bcp(index, bcp_offset, sizeof(u2));
// Take shortcut if the size is a power of 2
if (is_power_of_2(sizeof(ResolvedFieldEntry))) {
if (is_power_of_2(entry_size)) {
// Scale index by power of 2
sldi(index, index, log2i_exact(sizeof(ResolvedFieldEntry)));
sldi(index, index, log2i_exact(entry_size));
} else {
// Scale the index to be the entry index * sizeof(ResolvedFieldEntry)
mulli(index, index, sizeof(ResolvedFieldEntry));
mulli(index, index, entry_size);
}
// Get address of field entries array
ld_ptr(cache, in_bytes(ConstantPoolCache::field_entries_offset()), R27_constPoolCache);
addi(cache, cache, Array<ResolvedFieldEntry>::base_offset_in_bytes());
ld_ptr(cache, entries_offset, R27_constPoolCache);
addi(cache, cache, base_offset);
add(cache, cache, index);
}
void InterpreterMacroAssembler::load_method_entry(Register cache, Register index, int bcp_offset) {
// Get index out of bytecode pointer
get_cache_index_at_bcp(index, bcp_offset, sizeof(u2));
// Scale the index to be the entry index * sizeof(ResolvedMethodEntry)
mulli(index, index, sizeof(ResolvedMethodEntry));
// Get address of field entries array
ld_ptr(cache, ConstantPoolCache::method_entries_offset(), R27_constPoolCache);
addi(cache, cache, Array<ResolvedMethodEntry>::base_offset_in_bytes());
add(cache, cache, index); // method_entries + base_offset + scaled index
if (for_fast_bytecode) {
// Prevent speculative loading from ResolvedFieldEntry/ResolvedMethodEntry as it can miss the info written by another thread.
// TemplateTable::patch_bytecode uses release-store.
// We reached here via control dependency (Bytecode dispatch has used the rewritten Bytecode).
// So, we can use control-isync based ordering.
isync();
}
}
// Load object from cpool->resolved_references(index).

View File

@@ -3928,8 +3928,10 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
Label L_outer_loop, L_inner_loop, L_last;
// Set DSCR pre-fetch to deepest.
load_const_optimized(t0, VM_Version::_dscr_val | 7);
mtdscr(t0);
if (VM_Version::has_mfdscr()) {
load_const_optimized(t0, VM_Version::_dscr_val | 7);
mtdscr(t0);
}
mtvrwz(VCRC, crc); // crc lives in VCRC, now
@@ -4073,8 +4075,10 @@ void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Reg
// ********** Main loop end **********
// Restore DSCR pre-fetch value.
load_const_optimized(t0, VM_Version::_dscr_val);
mtdscr(t0);
if (VM_Version::has_mfdscr()) {
load_const_optimized(t0, VM_Version::_dscr_val);
mtdscr(t0);
}
// ********** Simple loop for remaining 16 byte blocks **********
{

View File

@@ -952,8 +952,10 @@ class StubGenerator: public StubCodeGenerator {
address start_pc = __ pc();
Register tmp1 = R6_ARG4;
// probably copy stub would have changed value reset it.
__ load_const_optimized(tmp1, VM_Version::_dscr_val);
__ mtdscr(tmp1);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp1, VM_Version::_dscr_val);
__ mtdscr(tmp1);
}
__ li(R3_RET, 0); // return 0
__ blr();
return start_pc;
@@ -1070,9 +1072,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// If supported set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. Not 16-byte align as
@@ -1092,8 +1095,10 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_10); // Dec CTR and loop if not zero.
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
} // FasterArrayCopy
@@ -1344,8 +1349,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// If supported set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. It's not aligned 16-byte
@@ -1365,8 +1372,11 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_9); // Dec CTR and loop if not zero.
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
} // FasterArrayCopy
__ bind(l_6);
@@ -1527,9 +1537,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// Set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. Not 16-byte align as
@@ -1549,9 +1560,10 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_7); // Dec CTR and loop if not zero.
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
} // FasterArrayCopy
@@ -1672,9 +1684,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// Set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. Not 16-byte align as
@@ -1694,8 +1707,10 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_4);
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
__ cmpwi(CR0, R5_ARG3, 0);
__ beq(CR0, l_6);
@@ -1788,9 +1803,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// Set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. Not 16-byte align as
@@ -1810,8 +1826,10 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_5); // Dec CTR and loop if not zero.
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
} // FasterArrayCopy
@@ -1910,9 +1928,10 @@ class StubGenerator: public StubCodeGenerator {
__ dcbt(R3_ARG1, 0);
// Set DSCR pre-fetch to deepest.
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
__ mtdscr(tmp2);
}
__ li(tmp1, 16);
// Backbranch target aligned to 32-byte. Not 16-byte align as
@@ -1932,8 +1951,10 @@ class StubGenerator: public StubCodeGenerator {
__ bdnz(l_4);
// Restore DSCR pre-fetch value.
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
if (VM_Version::has_mfdscr()) {
__ load_const_optimized(tmp2, VM_Version::_dscr_val);
__ mtdscr(tmp2);
}
__ cmpwi(CR0, R5_ARG3, 0);
__ beq(CR0, l_1);

View File

@@ -148,7 +148,9 @@ void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Reg
__ bind(L_fast_patch);
}
// Patch bytecode.
// Patch bytecode with release store to coordinate with ResolvedFieldEntry
// and ResolvedMethodEntry loads in fast bytecode codelets.
__ release();
__ stb(Rnew_bc, 0, R14_bcp);
__ bind(L_patch_done);
@@ -312,6 +314,7 @@ void TemplateTable::fast_aldc(LdcType type) {
// We are resolved if the resolved reference cache entry contains a
// non-null object (CallSite, etc.)
__ get_cache_index_at_bcp(R31, 1, index_size); // Load index.
// Only rewritten during link time. So, no need for memory barriers for accessing resolved info.
__ load_resolved_reference_at_index(R17_tos, R31, R11_scratch1, R12_scratch2, &is_null);
// Convert null sentinel to null
@@ -3109,7 +3112,7 @@ void TemplateTable::fast_storefield(TosState state) {
const ConditionRegister CR_is_vol = CR2; // Non-volatile condition register (survives runtime call in do_oop_store).
// Constant pool already resolved => Load flags and offset of field.
__ load_field_entry(Rcache, Rscratch);
__ load_field_entry(Rcache, Rscratch, 1, /* for_fast_bytecode */ true);
jvmti_post_field_mod(Rcache, Rscratch, false /* not static */);
load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12
@@ -3190,7 +3193,7 @@ void TemplateTable::fast_accessfield(TosState state) {
// R12_scratch2 used by load_field_cp_cache_entry
// Constant pool already resolved. Get the field offset.
__ load_field_entry(Rcache, Rscratch);
__ load_field_entry(Rcache, Rscratch, 1, /* for_fast_bytecode */ true);
load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12
// JVMTI support
@@ -3329,7 +3332,7 @@ void TemplateTable::fast_xaccess(TosState state) {
__ ld(Rclass_or_obj, 0, R18_locals);
// Constant pool already resolved. Get the field offset.
__ load_field_entry(Rcache, Rscratch, 2);
__ load_field_entry(Rcache, Rscratch, 2, /* for_fast_bytecode */ true);
load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12
// JVMTI support not needed, since we switch back to single bytecode as soon as debugger attaches.
@@ -3490,7 +3493,7 @@ void TemplateTable::fast_invokevfinal(int byte_no) {
assert(byte_no == f2_byte, "use this argument");
Register Rcache = R31;
__ load_method_entry(Rcache, R11_scratch1);
__ load_method_entry(Rcache, R11_scratch1, 1, /* for_fast_bytecode */ true);
invokevfinal_helper(Rcache, R11_scratch1, R12_scratch2, R22_tmp2, R23_tmp3);
}

View File

@@ -80,7 +80,9 @@ void VM_Version::initialize() {
"%zu on this machine", PowerArchitecturePPC64);
// Power 8: Configure Data Stream Control Register.
config_dscr();
if (VM_Version::has_mfdscr()) {
config_dscr();
}
if (!UseSIGTRAP) {
MSG(TrapBasedICMissChecks);
@@ -95,6 +97,10 @@ void VM_Version::initialize() {
FLAG_SET_ERGO(TrapBasedRangeChecks, false);
}
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
FLAG_SET_ERGO(UsePopCountInstruction, true);
}
if (PowerArchitecturePPC64 >= 9) {
// Performance is good since Power9.
if (FLAG_IS_DEFAULT(SuperwordUseVSX)) {
@@ -170,7 +176,8 @@ void VM_Version::initialize() {
// Create and print feature-string.
char buf[(num_features+1) * 16]; // Max 16 chars per feature.
jio_snprintf(buf, sizeof(buf),
"ppc64 sha aes%s%s",
"ppc64 sha aes%s%s%s",
(has_mfdscr() ? " mfdscr" : ""),
(has_darn() ? " darn" : ""),
(has_brw() ? " brw" : "")
// Make sure number of %s matches num_features!
@@ -488,6 +495,7 @@ void VM_Version::determine_features() {
uint32_t *code = (uint32_t *)a->pc();
// Keep R3_ARG1 unmodified, it contains &field (see below).
// Keep R4_ARG2 unmodified, it contains offset = 0 (see below).
a->mfdscr(R0);
a->darn(R7);
a->brw(R5, R6);
a->blr();
@@ -524,6 +532,7 @@ void VM_Version::determine_features() {
// determine which instructions are legal.
int feature_cntr = 0;
if (code[feature_cntr++]) features |= mfdscr_m;
if (code[feature_cntr++]) features |= darn_m;
if (code[feature_cntr++]) features |= brw_m;

View File

@@ -32,12 +32,14 @@
class VM_Version: public Abstract_VM_Version {
protected:
enum Feature_Flag {
mfdscr,
darn,
brw,
num_features // last entry to count features
};
enum Feature_Flag_Set {
unknown_m = 0,
mfdscr_m = (1 << mfdscr ),
darn_m = (1 << darn ),
brw_m = (1 << brw ),
all_features_m = (unsigned long)-1
@@ -67,8 +69,9 @@ public:
static bool is_determine_features_test_running() { return _is_determine_features_test_running; }
// CPU instruction support
static bool has_darn() { return (_features & darn_m) != 0; }
static bool has_brw() { return (_features & brw_m) != 0; }
static bool has_mfdscr() { return (_features & mfdscr_m) != 0; } // Power8, but may be unavailable (QEMU)
static bool has_darn() { return (_features & darn_m) != 0; }
static bool has_brw() { return (_features & brw_m) != 0; }
// Assembler testing
static void allow_all();

View File

@@ -912,6 +912,43 @@ protected:
emit(insn);
}
public:
static uint32_t encode_csrrw(Register Rd, const uint32_t csr, Register Rs1) {
guarantee(is_uimm12(csr), "csr is invalid");
uint32_t insn = 0;
patch((address)&insn, 6, 0, 0b1110011);
patch((address)&insn, 14, 12, 0b001);
patch_reg((address)&insn, 7, Rd);
patch_reg((address)&insn, 15, Rs1);
patch((address)&insn, 31, 20, csr);
return insn;
}
static uint32_t encode_jal(Register Rd, const int32_t offset) {
guarantee(is_simm21(offset) && ((offset % 2) == 0), "offset is invalid.");
uint32_t insn = 0;
patch((address)&insn, 6, 0, 0b1101111);
patch_reg((address)&insn, 7, Rd);
patch((address)&insn, 19, 12, (uint32_t)((offset >> 12) & 0xff));
patch((address)&insn, 20, (uint32_t)((offset >> 11) & 0x1));
patch((address)&insn, 30, 21, (uint32_t)((offset >> 1) & 0x3ff));
patch((address)&insn, 31, (uint32_t)((offset >> 20) & 0x1));
return insn;
}
static uint32_t encode_jalr(Register Rd, Register Rs, const int32_t offset) {
guarantee(is_simm12(offset), "offset is invalid.");
uint32_t insn = 0;
patch((address)&insn, 6, 0, 0b1100111);
patch_reg((address)&insn, 7, Rd);
patch((address)&insn, 14, 12, 0b000);
patch_reg((address)&insn, 15, Rs);
int32_t val = offset & 0xfff;
patch((address)&insn, 31, 20, val);
return insn;
}
protected:
enum barrier {
@@ -1988,6 +2025,7 @@ enum VectorMask {
// Vector Narrowing Integer Right Shift Instructions
INSN(vnsra_wi, 0b1010111, 0b011, 0b101101);
INSN(vnsrl_wi, 0b1010111, 0b011, 0b101100);
#undef INSN
@@ -3666,19 +3704,15 @@ public:
// --------------------------
// Upper Immediate Instruction
// --------------------------
#define INSN(NAME) \
void NAME(Register Rd, int32_t imm) { \
/* lui -> c.lui */ \
if (do_compress() && (Rd != x0 && Rd != x2 && imm != 0 && is_simm18(imm))) { \
c_lui(Rd, imm); \
return; \
} \
_lui(Rd, imm); \
void lui(Register Rd, int32_t imm) {
/* lui -> c.lui */
if (do_compress() && (Rd != x0 && Rd != x2 && imm != 0 && is_simm18(imm))) {
c_lui(Rd, imm);
return;
}
_lui(Rd, imm);
}
INSN(lui);
#undef INSN
// Cache Management Operations
// These instruction may be turned off for user space.

View File

@@ -401,7 +401,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
code_stub->set_safepoint_offset(__ offset());
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */);
__ ret();
}
@@ -1354,6 +1354,7 @@ void LIR_Assembler::align_call(LIR_Code code) {
}
void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
Assembler::IncompressibleScope scope(_masm);
address call = __ reloc_call(Address(op->addr(), rtype));
if (call == nullptr) {
bailout("reloc call address stub overflow");
@@ -1364,6 +1365,7 @@ void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
}
void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
Assembler::IncompressibleScope scope(_masm);
address call = __ ic_call(op->addr());
if (call == nullptr) {
bailout("reloc call address stub overflow");
@@ -1856,6 +1858,10 @@ void LIR_Assembler::leal(LIR_Opr addr, LIR_Opr dest, LIR_PatchCode patch_code, C
void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info) {
assert(!tmp->is_valid(), "don't need temporary");
Assembler::IncompressibleScope scope(_masm);
// Post call nops must be natural aligned due to cmodx rules.
align_call(lir_rtcall);
__ rt_call(dest);
if (info != nullptr) {

View File

@@ -772,7 +772,7 @@ void LIRGenerator::do_ArrayCopy(Intrinsic* x) {
ciArrayKlass* expected_type = nullptr;
arraycopy_helper(x, &flags, &expected_type);
if (x->check_flag(Instruction::OmitChecksFlag)) {
flags = 0;
flags = (flags & LIR_OpArrayCopy::get_initial_copy_flags());
}
__ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp,

View File

@@ -1952,16 +1952,15 @@ void C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register res
mv(pow31_3, 29791); // [31^^3]
mv(pow31_2, 961); // [31^^2]
slli(chunks_end, chunks, chunks_end_shift);
add(chunks_end, ary, chunks_end);
shadd(chunks_end, chunks, ary, t0, chunks_end_shift);
andi(cnt, cnt, stride - 1); // don't forget about tail!
bind(WIDE_LOOP);
mulw(result, result, pow31_4); // 31^^4 * h
arrays_hashcode_elload(t0, Address(ary, 0 * elsize), eltype);
arrays_hashcode_elload(t1, Address(ary, 1 * elsize), eltype);
arrays_hashcode_elload(tmp5, Address(ary, 2 * elsize), eltype);
arrays_hashcode_elload(tmp6, Address(ary, 3 * elsize), eltype);
mulw(result, result, pow31_4); // 31^^4 * h
mulw(t0, t0, pow31_3); // 31^^3 * ary[i+0]
addw(result, result, t0);
mulw(t1, t1, pow31_2); // 31^^2 * ary[i+1]
@@ -1976,8 +1975,7 @@ void C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register res
beqz(cnt, DONE);
bind(TAIL);
slli(chunks_end, cnt, chunks_end_shift);
add(chunks_end, ary, chunks_end);
shadd(chunks_end, cnt, ary, t0, chunks_end_shift);
bind(TAIL_LOOP);
arrays_hashcode_elload(t0, Address(ary), eltype);
@@ -2170,15 +2168,13 @@ void C2_MacroAssembler::enc_cmove_cmp_fp(int cmpFlag, FloatRegister op1, FloatRe
cmov_cmp_fp_le(op1, op2, dst, src, is_single);
break;
case BoolTest::ge:
assert(false, "Should go to BoolTest::le case");
ShouldNotReachHere();
cmov_cmp_fp_ge(op1, op2, dst, src, is_single);
break;
case BoolTest::lt:
cmov_cmp_fp_lt(op1, op2, dst, src, is_single);
break;
case BoolTest::gt:
assert(false, "Should go to BoolTest::lt case");
ShouldNotReachHere();
cmov_cmp_fp_gt(op1, op2, dst, src, is_single);
break;
default:
assert(false, "unsupported compare condition");
@@ -2395,18 +2391,7 @@ static void float_to_float16_slow_path(C2_MacroAssembler& masm, C2GeneralStub<Re
Register tmp = stub.data<2>();
__ bind(stub.entry());
__ fmv_x_w(dst, src);
// preserve the payloads of non-canonical NaNs.
__ srai(dst, dst, 13);
// preserve the sign bit.
__ srai(tmp, dst, 13);
__ slli(tmp, tmp, 10);
__ mv(t0, 0x3ff);
__ orr(tmp, tmp, t0);
// get the result by merging sign bit and payloads of preserved non-canonical NaNs.
__ andr(dst, dst, tmp);
__ float_to_float16_NaN(dst, src, t0, tmp);
__ j(stub.continuation());
#undef __
@@ -2414,7 +2399,7 @@ static void float_to_float16_slow_path(C2_MacroAssembler& masm, C2GeneralStub<Re
// j.l.Float.floatToFloat16
void C2_MacroAssembler::float_to_float16(Register dst, FloatRegister src, FloatRegister ftmp, Register xtmp) {
auto stub = C2CodeStub::make<Register, FloatRegister, Register>(dst, src, xtmp, 130, float_to_float16_slow_path);
auto stub = C2CodeStub::make<Register, FloatRegister, Register>(dst, src, xtmp, 64, float_to_float16_slow_path);
// On riscv, NaN needs a special process as fcvt does not work in that case.
@@ -2493,41 +2478,80 @@ static void float_to_float16_v_slow_path(C2_MacroAssembler& masm,
#define __ masm.
VectorRegister dst = stub.data<0>();
VectorRegister src = stub.data<1>();
VectorRegister tmp = stub.data<2>();
VectorRegister vtmp = stub.data<2>();
assert_different_registers(dst, src, vtmp);
__ bind(stub.entry());
// Active elements (NaNs) are marked in v0 mask register.
// mul is already set to mf2 in float_to_float16_v.
// preserve the payloads of non-canonical NaNs.
__ vnsra_wi(dst, src, 13, Assembler::v0_t);
// Float (32 bits)
// Bit: 31 30 to 23 22 to 0
// +---+------------------+-----------------------------+
// | S | Exponent | Mantissa (Fraction) |
// +---+------------------+-----------------------------+
// 1 bit 8 bits 23 bits
//
// Float (16 bits)
// Bit: 15 14 to 10 9 to 0
// +---+----------------+------------------+
// | S | Exponent | Mantissa |
// +---+----------------+------------------+
// 1 bit 5 bits 10 bits
const int fp_sign_bits = 1;
const int fp32_bits = 32;
const int fp32_mantissa_2nd_part_bits = 9;
const int fp32_mantissa_3rd_part_bits = 4;
const int fp16_exponent_bits = 5;
const int fp16_mantissa_bits = 10;
// preserve the sign bit.
__ vnsra_wi(tmp, src, 26, Assembler::v0_t);
__ vsll_vi(tmp, tmp, 10, Assembler::v0_t);
__ mv(t0, 0x3ff);
__ vor_vx(tmp, tmp, t0, Assembler::v0_t);
// preserve the sign bit and exponent, clear mantissa.
__ vnsra_wi(dst, src, fp32_bits - fp_sign_bits - fp16_exponent_bits, Assembler::v0_t);
__ vsll_vi(dst, dst, fp16_mantissa_bits, Assembler::v0_t);
// get the result by merging sign bit and payloads of preserved non-canonical NaNs.
__ vand_vv(dst, dst, tmp, Assembler::v0_t);
// Preserve high order bit of float NaN in the
// binary16 result NaN (tenth bit); OR in remaining
// bits into lower 9 bits of binary 16 significand.
// | (doppel & 0x007f_e000) >> 13 // 10 bits
// | (doppel & 0x0000_1ff0) >> 4 // 9 bits
// | (doppel & 0x0000_000f)); // 4 bits
//
// Check j.l.Float.floatToFloat16 for more information.
// 10 bits
__ vnsrl_wi(vtmp, src, fp32_mantissa_2nd_part_bits + fp32_mantissa_3rd_part_bits, Assembler::v0_t);
__ mv(t0, 0x3ff); // retain first part of mantissa in a float 32
__ vand_vx(vtmp, vtmp, t0, Assembler::v0_t);
__ vor_vv(dst, dst, vtmp, Assembler::v0_t);
// 9 bits
__ vnsrl_wi(vtmp, src, fp32_mantissa_3rd_part_bits, Assembler::v0_t);
__ mv(t0, 0x1ff); // retain second part of mantissa in a float 32
__ vand_vx(vtmp, vtmp, t0, Assembler::v0_t);
__ vor_vv(dst, dst, vtmp, Assembler::v0_t);
// 4 bits
// Narrow shift is necessary to move data from 32 bits element to 16 bits element in vector register.
__ vnsrl_wi(vtmp, src, 0, Assembler::v0_t);
__ vand_vi(vtmp, vtmp, 0xf, Assembler::v0_t);
__ vor_vv(dst, dst, vtmp, Assembler::v0_t);
__ j(stub.continuation());
#undef __
}
// j.l.Float.float16ToFloat
void C2_MacroAssembler::float_to_float16_v(VectorRegister dst, VectorRegister src, VectorRegister vtmp,
Register tmp, uint vector_length) {
void C2_MacroAssembler::float_to_float16_v(VectorRegister dst, VectorRegister src,
VectorRegister vtmp, Register tmp, uint vector_length) {
assert_different_registers(dst, src, vtmp);
auto stub = C2CodeStub::make<VectorRegister, VectorRegister, VectorRegister>
(dst, src, vtmp, 28, float_to_float16_v_slow_path);
(dst, src, vtmp, 56, float_to_float16_v_slow_path);
// On riscv, NaN needs a special process as vfncvt_f_f_w does not work in that case.
vsetvli_helper(BasicType::T_FLOAT, vector_length, Assembler::m1);
// check whether there is a NaN.
// replace v_fclass with vmseq_vv as performance optimization.
// replace v_fclass with vmfne_vv as performance optimization.
vmfne_vv(v0, src, src);
vcpop_m(t0, v0);

View File

@@ -287,7 +287,7 @@ void DowncallLinker::StubGenerator::generate() {
__ membar(MacroAssembler::AnyAny);
}
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */);
__ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset()));
__ bnez(t0, L_safepoint_poll_slow_path);

View File

@@ -645,7 +645,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// the stack, will call InterpreterRuntime::at_unwind.
Label slow_path;
Label fast_path;
safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
j(fast_path);
bind(slow_path);
@@ -1937,6 +1937,15 @@ void InterpreterMacroAssembler::load_method_entry(Register cache, Register index
}
#ifdef ASSERT
void InterpreterMacroAssembler::verify_field_offset(Register reg) {
// Verify the field offset is not in the header, implicitly checks for 0
Label L;
mv(t0, oopDesc::base_offset_in_bytes());
bge(reg, t0, L);
stop("bad field offset");
bind(L);
}
void InterpreterMacroAssembler::verify_access_flags(Register access_flags, uint32_t flag,
const char* msg, bool stop_by_hit) {
Label L;

View File

@@ -300,6 +300,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
void load_field_entry(Register cache, Register index, int bcp_offset = 1);
void load_method_entry(Register cache, Register index, int bcp_offset = 1);
void verify_field_offset(Register reg) NOT_DEBUG_RETURN;
#ifdef ASSERT
void verify_access_flags(Register access_flags, uint32_t flag,
const char* msg, bool stop_by_hit = true);

View File

@@ -39,25 +39,23 @@ public:
// 3 - restoring an old state (javaCalls)
void clear(void) {
// No hardware barriers are necessary. All members are volatile and the profiler
// is run from a signal handler and the only observer is the thread its running on.
// clearing _last_Java_sp must be first
_last_Java_sp = nullptr;
OrderAccess::release();
_last_Java_fp = nullptr;
_last_Java_pc = nullptr;
}
void copy(JavaFrameAnchor* src) {
// In order to make sure the transition state is valid for "this"
// No hardware barriers are necessary. All members are volatile and the profiler
// is run from a signal handler and the only observer is the thread its running on.
// We must clear _last_Java_sp before copying the rest of the new data
//
// Hack Alert: Temporary bugfix for 4717480/4721647
// To act like previous version (pd_cache_state) don't null _last_Java_sp
// unless the value is changing
//
assert(src != nullptr, "Src should not be null.");
if (_last_Java_sp != src->_last_Java_sp) {
_last_Java_sp = nullptr;
OrderAccess::release();
}
_last_Java_fp = src->_last_Java_fp;
_last_Java_pc = src->_last_Java_pc;

View File

@@ -97,52 +97,52 @@ bool MacroAssembler::is_pc_relative_at(address instr) {
// auipc + load
// auipc + fload_load
return (is_auipc_at(instr)) &&
(is_addi_at(instr + instruction_size) ||
is_jalr_at(instr + instruction_size) ||
is_load_at(instr + instruction_size) ||
is_float_load_at(instr + instruction_size)) &&
(is_addi_at(instr + MacroAssembler::instruction_size) ||
is_jalr_at(instr + MacroAssembler::instruction_size) ||
is_load_at(instr + MacroAssembler::instruction_size) ||
is_float_load_at(instr + MacroAssembler::instruction_size)) &&
check_pc_relative_data_dependency(instr);
}
// ie:ld(Rd, Label)
bool MacroAssembler::is_load_pc_relative_at(address instr) {
return is_auipc_at(instr) && // auipc
is_ld_at(instr + instruction_size) && // ld
is_ld_at(instr + MacroAssembler::instruction_size) && // ld
check_load_pc_relative_data_dependency(instr);
}
bool MacroAssembler::is_movptr1_at(address instr) {
return is_lui_at(instr) && // Lui
is_addi_at(instr + instruction_size) && // Addi
is_slli_shift_at(instr + instruction_size * 2, 11) && // Slli Rd, Rs, 11
is_addi_at(instr + instruction_size * 3) && // Addi
is_slli_shift_at(instr + instruction_size * 4, 6) && // Slli Rd, Rs, 6
(is_addi_at(instr + instruction_size * 5) ||
is_jalr_at(instr + instruction_size * 5) ||
is_load_at(instr + instruction_size * 5)) && // Addi/Jalr/Load
is_addi_at(instr + MacroAssembler::instruction_size) && // Addi
is_slli_shift_at(instr + MacroAssembler::instruction_size * 2, 11) && // Slli Rd, Rs, 11
is_addi_at(instr + MacroAssembler::instruction_size * 3) && // Addi
is_slli_shift_at(instr + MacroAssembler::instruction_size * 4, 6) && // Slli Rd, Rs, 6
(is_addi_at(instr + MacroAssembler::instruction_size * 5) ||
is_jalr_at(instr + MacroAssembler::instruction_size * 5) ||
is_load_at(instr + MacroAssembler::instruction_size * 5)) && // Addi/Jalr/Load
check_movptr1_data_dependency(instr);
}
bool MacroAssembler::is_movptr2_at(address instr) {
return is_lui_at(instr) && // lui
is_lui_at(instr + instruction_size) && // lui
is_slli_shift_at(instr + instruction_size * 2, 18) && // slli Rd, Rs, 18
is_add_at(instr + instruction_size * 3) &&
(is_addi_at(instr + instruction_size * 4) ||
is_jalr_at(instr + instruction_size * 4) ||
is_load_at(instr + instruction_size * 4)) && // Addi/Jalr/Load
is_lui_at(instr + MacroAssembler::instruction_size) && // lui
is_slli_shift_at(instr + MacroAssembler::instruction_size * 2, 18) && // slli Rd, Rs, 18
is_add_at(instr + MacroAssembler::instruction_size * 3) &&
(is_addi_at(instr + MacroAssembler::instruction_size * 4) ||
is_jalr_at(instr + MacroAssembler::instruction_size * 4) ||
is_load_at(instr + MacroAssembler::instruction_size * 4)) && // Addi/Jalr/Load
check_movptr2_data_dependency(instr);
}
bool MacroAssembler::is_li16u_at(address instr) {
return is_lui_at(instr) && // lui
is_srli_at(instr + instruction_size) && // srli
is_srli_at(instr + MacroAssembler::instruction_size) && // srli
check_li16u_data_dependency(instr);
}
bool MacroAssembler::is_li32_at(address instr) {
return is_lui_at(instr) && // lui
is_addiw_at(instr + instruction_size) && // addiw
is_addiw_at(instr + MacroAssembler::instruction_size) && // addiw
check_li32_data_dependency(instr);
}
@@ -355,14 +355,15 @@ void MacroAssembler::call_VM(Register oop_result,
}
void MacroAssembler::post_call_nop() {
assert(!in_compressible_scope(), "Must be");
assert_alignment(pc());
if (!Continuations::enabled()) {
return;
}
relocate(post_call_nop_Relocation::spec(), [&] {
InlineSkippedInstructionsCounter skipCounter(this);
nop();
li32(zr, 0);
});
relocate(post_call_nop_Relocation::spec());
InlineSkippedInstructionsCounter skipCounter(this);
nop();
li32(zr, 0);
}
// these are no-ops overridden by InterpreterMacroAssembler
@@ -389,12 +390,14 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
last_java_sp = esp;
}
sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset()));
// last_java_fp is optional
if (last_java_fp->is_valid()) {
sd(last_java_fp, Address(xthread, JavaThread::last_Java_fp_offset()));
}
// We must set sp last.
sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset()));
}
void MacroAssembler::set_last_Java_frame(Register last_java_sp,
@@ -1268,12 +1271,19 @@ void MacroAssembler::cmov_gtu(Register cmp1, Register cmp2, Register dst, Regist
}
// ----------- cmove, compare float -----------
//
// For CmpF/D + CMoveI/L, ordered ones are quite straight and simple,
// so, just list behaviour of unordered ones as follow.
//
// Set dst (CMoveI (Binary cop (CmpF/D op1 op2)) (Binary dst src))
// (If one or both inputs to the compare are NaN, then)
// 1. (op1 lt op2) => true => CMove: dst = src
// 2. (op1 le op2) => true => CMove: dst = src
// 3. (op1 gt op2) => false => CMove: dst = dst
// 4. (op1 ge op2) => false => CMove: dst = dst
// 5. (op1 eq op2) => false => CMove: dst = dst
// 6. (op1 ne op2) => true => CMove: dst = src
// Move src to dst only if cmp1 == cmp2,
// otherwise leave dst unchanged, including the case where one of them is NaN.
// Clarification:
// java code : cmp1 != cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 eq cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1289,7 +1299,7 @@ void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 != cmp2, including the case of NaN
// not jump (i.e. move src to dst) if cmp1 == cmp2
// fallthrough (i.e. move src to dst) if cmp1 == cmp2
float_bne(cmp1, cmp2, no_set);
} else {
double_bne(cmp1, cmp2, no_set);
@@ -1298,11 +1308,6 @@ void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// Keep dst unchanged only if cmp1 == cmp2,
// otherwise move src to dst, including the case where one of them is NaN.
// Clarification:
// java code : cmp1 == cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 ne cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1318,7 +1323,7 @@ void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 == cmp2
// not jump (i.e. move src to dst) if cmp1 != cmp2, including the case of NaN
// fallthrough (i.e. move src to dst) if cmp1 != cmp2, including the case of NaN
float_beq(cmp1, cmp2, no_set);
} else {
double_beq(cmp1, cmp2, no_set);
@@ -1327,14 +1332,6 @@ void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// When cmp1 <= cmp2 or any of them is NaN then dst = src, otherwise, dst = dst
// Clarification
// scenario 1:
// java code : cmp2 < cmp1 ? dst : src
// transformed to : CMove dst, (cmp1 le cmp2), dst, src
// scenario 2:
// java code : cmp1 > cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 le cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1350,7 +1347,7 @@ void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 > cmp2
// not jump (i.e. move src to dst) if cmp1 <= cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 <= cmp2 or either is NaN
float_bgt(cmp1, cmp2, no_set);
} else {
double_bgt(cmp1, cmp2, no_set);
@@ -1359,14 +1356,30 @@ void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// When cmp1 < cmp2 or any of them is NaN then dst = src, otherwise, dst = dst
// Clarification
// scenario 1:
// java code : cmp2 <= cmp1 ? dst : src
// transformed to : CMove dst, (cmp1 lt cmp2), dst, src
// scenario 2:
// java code : cmp1 >= cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 lt cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_ge(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
fle_s(t0, cmp2, cmp1);
} else {
fle_d(t0, cmp2, cmp1);
}
czero_nez(dst, dst, t0);
czero_eqz(t0 , src, t0);
orr(dst, dst, t0);
return;
}
Label no_set;
if (is_single) {
// jump if cmp1 < cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 >= cmp2
float_blt(cmp1, cmp2, no_set, false, true);
} else {
double_blt(cmp1, cmp2, no_set, false, true);
}
mv(dst, src);
bind(no_set);
}
void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1382,7 +1395,7 @@ void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 >= cmp2
// not jump (i.e. move src to dst) if cmp1 < cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 < cmp2 or either is NaN
float_bge(cmp1, cmp2, no_set);
} else {
double_bge(cmp1, cmp2, no_set);
@@ -1391,6 +1404,30 @@ void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
void MacroAssembler::cmov_cmp_fp_gt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
flt_s(t0, cmp2, cmp1);
} else {
flt_d(t0, cmp2, cmp1);
}
czero_nez(dst, dst, t0);
czero_eqz(t0 , src, t0);
orr(dst, dst, t0);
return;
}
Label no_set;
if (is_single) {
// jump if cmp1 <= cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 > cmp2
float_ble(cmp1, cmp2, no_set, false, true);
} else {
double_ble(cmp1, cmp2, no_set, false, true);
}
mv(dst, src);
bind(no_set);
}
// Float compare branch instructions
#define INSN(NAME, FLOATCMP, BRANCH) \
@@ -3368,6 +3405,8 @@ void MacroAssembler::decode_klass_not_null(Register r, Register tmp) {
void MacroAssembler::decode_klass_not_null(Register dst, Register src, Register tmp) {
assert(UseCompressedClassPointers, "should only be used for compressed headers");
assert_different_registers(dst, tmp);
assert_different_registers(src, tmp);
if (CompressedKlassPointers::base() == nullptr) {
if (CompressedKlassPointers::shift() != 0) {
@@ -3378,18 +3417,13 @@ void MacroAssembler::decode_klass_not_null(Register dst, Register src, Register
return;
}
Register xbase = dst;
if (dst == src) {
xbase = tmp;
}
Register xbase = tmp;
assert_different_registers(src, xbase);
mv(xbase, (uintptr_t)CompressedKlassPointers::base());
if (CompressedKlassPointers::shift() != 0) {
Register t = src == dst ? dst : t0;
assert_different_registers(t, xbase);
shadd(dst, src, xbase, t, CompressedKlassPointers::shift());
// dst = (src << shift) + xbase
shadd(dst, src, xbase, dst /* temporary, dst != xbase */, CompressedKlassPointers::shift());
} else {
add(dst, xbase, src);
}
@@ -3739,11 +3773,8 @@ void MacroAssembler::check_klass_subtype(Register sub_klass,
bind(L_failure);
}
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg) {
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg) {
ld(tmp_reg, Address(xthread, JavaThread::polling_word_offset()));
if (acquire) {
membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore);
}
if (at_return) {
bgtu(in_nmethod ? sp : fp, tmp_reg, slow_path, /* is_far */ true);
} else {
@@ -4985,7 +5016,7 @@ address MacroAssembler::reloc_call(Address entry, Register tmp) {
address MacroAssembler::ic_call(address entry, jint method_index) {
RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index);
IncompressibleScope scope(this); // relocations
assert(!in_compressible_scope(), "Must be");
movptr(t0, (address)Universe::non_oop_word(), t1);
assert_cond(entry != nullptr);
return reloc_call(Address(entry, rh));
@@ -5079,7 +5110,7 @@ address MacroAssembler::emit_reloc_call_address_stub(int insts_call_instruction_
int MacroAssembler::max_reloc_call_address_stub_size() {
// Max stub size: alignment nop, target address.
return 1 * instruction_size + wordSize;
return 1 * MacroAssembler::instruction_size + wordSize;
}
int MacroAssembler::static_call_stub_size() {
@@ -5310,42 +5341,6 @@ void MacroAssembler::add2_with_carry(Register final_dest_hi, Register dest_hi, R
add(final_dest_hi, dest_hi, carry);
}
/**
* Multiply 32 bit by 32 bit first loop.
*/
void MacroAssembler::multiply_32_x_32_loop(Register x, Register xstart, Register x_xstart,
Register y, Register y_idx, Register z,
Register carry, Register product,
Register idx, Register kdx) {
// jlong carry, x[], y[], z[];
// for (int idx=ystart, kdx=ystart+1+xstart; idx >= 0; idx--, kdx--) {
// long product = y[idx] * x[xstart] + carry;
// z[kdx] = (int)product;
// carry = product >>> 32;
// }
// z[xstart] = (int)carry;
Label L_first_loop, L_first_loop_exit;
blez(idx, L_first_loop_exit);
shadd(t0, xstart, x, t0, LogBytesPerInt);
lwu(x_xstart, Address(t0, 0));
bind(L_first_loop);
subiw(idx, idx, 1);
shadd(t0, idx, y, t0, LogBytesPerInt);
lwu(y_idx, Address(t0, 0));
mul(product, x_xstart, y_idx);
add(product, product, carry);
srli(carry, product, 32);
subiw(kdx, kdx, 1);
shadd(t0, kdx, z, t0, LogBytesPerInt);
sw(product, Address(t0, 0));
bgtz(idx, L_first_loop);
bind(L_first_loop_exit);
}
/**
* Multiply 64 bit by 64 bit first loop.
*/
@@ -5562,77 +5557,16 @@ void MacroAssembler::multiply_to_len(Register x, Register xlen, Register y, Regi
const Register carry = tmp5;
const Register product = xlen;
const Register x_xstart = tmp0;
const Register jdx = tmp1;
mv(idx, ylen); // idx = ylen;
addw(kdx, xlen, ylen); // kdx = xlen+ylen;
mv(carry, zr); // carry = 0;
Label L_multiply_64_x_64_loop, L_done;
Label L_done;
subiw(xstart, xlen, 1);
bltz(xstart, L_done);
const Register jdx = tmp1;
if (AvoidUnalignedAccesses) {
int base_offset = arrayOopDesc::base_offset_in_bytes(T_INT);
assert((base_offset % (UseCompactObjectHeaders ? 4 :
(UseCompressedClassPointers ? 8 : 4))) == 0, "Must be");
if ((base_offset % 8) == 0) {
// multiply_64_x_64_loop emits 8-byte load/store to access two elements
// at a time from int arrays x and y. When base_offset is 8 bytes, these
// accesses are naturally aligned if both xlen and ylen are even numbers.
orr(t0, xlen, ylen);
test_bit(t0, t0, 0);
beqz(t0, L_multiply_64_x_64_loop);
}
Label L_second_loop_unaligned, L_third_loop, L_third_loop_exit;
multiply_32_x_32_loop(x, xstart, x_xstart, y, y_idx, z, carry, product, idx, kdx);
shadd(t0, xstart, z, t0, LogBytesPerInt);
sw(carry, Address(t0, 0));
bind(L_second_loop_unaligned);
mv(carry, zr);
mv(jdx, ylen);
subiw(xstart, xstart, 1);
bltz(xstart, L_done);
subi(sp, sp, 2 * wordSize);
sd(z, Address(sp, 0));
sd(zr, Address(sp, wordSize));
shadd(t0, xstart, z, t0, LogBytesPerInt);
addi(z, t0, 4);
shadd(t0, xstart, x, t0, LogBytesPerInt);
lwu(product, Address(t0, 0));
blez(jdx, L_third_loop_exit);
bind(L_third_loop);
subiw(jdx, jdx, 1);
shadd(t0, jdx, y, t0, LogBytesPerInt);
lwu(t0, Address(t0, 0));
mul(t1, t0, product);
add(t0, t1, carry);
shadd(tmp6, jdx, z, t1, LogBytesPerInt);
lwu(t1, Address(tmp6, 0));
add(t0, t0, t1);
sw(t0, Address(tmp6, 0));
srli(carry, t0, 32);
bgtz(jdx, L_third_loop);
bind(L_third_loop_exit);
ld(z, Address(sp, 0));
addi(sp, sp, 2 * wordSize);
shadd(t0, xstart, z, t0, LogBytesPerInt);
sw(carry, Address(t0, 0));
j(L_second_loop_unaligned);
}
bind(L_multiply_64_x_64_loop);
multiply_64_x_64_loop(x, xstart, x_xstart, y, y_idx, z, carry, product, idx, kdx);
Label L_second_loop_aligned;
@@ -5940,13 +5874,14 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value) {
// in cnt.
//
// NOTE: This is intended to be used in the zero_blocks() stub. If
// you want to use it elsewhere, note that cnt must be >= CacheLineSize.
// you want to use it elsewhere, note that cnt must be >= zicboz_block_size.
void MacroAssembler::zero_dcache_blocks(Register base, Register cnt, Register tmp1, Register tmp2) {
int zicboz_block_size = VM_Version::zicboz_block_size.value();
Label initial_table_end, loop;
// Align base with cache line size.
neg(tmp1, base);
andi(tmp1, tmp1, CacheLineSize - 1);
andi(tmp1, tmp1, zicboz_block_size - 1);
// tmp1: the number of bytes to be filled to align the base with cache line size.
add(base, base, tmp1);
@@ -5956,16 +5891,16 @@ void MacroAssembler::zero_dcache_blocks(Register base, Register cnt, Register tm
la(tmp1, initial_table_end);
sub(tmp2, tmp1, tmp2);
jr(tmp2);
for (int i = -CacheLineSize + wordSize; i < 0; i += wordSize) {
for (int i = -zicboz_block_size + wordSize; i < 0; i += wordSize) {
sd(zr, Address(base, i));
}
bind(initial_table_end);
mv(tmp1, CacheLineSize / wordSize);
mv(tmp1, zicboz_block_size / wordSize);
bind(loop);
cbo_zero(base);
sub(cnt, cnt, tmp1);
addi(base, base, CacheLineSize);
addi(base, base, zicboz_block_size);
bge(cnt, tmp1, loop);
}
@@ -6020,6 +5955,62 @@ void MacroAssembler::java_round_double(Register dst, FloatRegister src, FloatReg
bind(done);
}
// Helper routine processing the slow path of NaN when converting float to float16
void MacroAssembler::float_to_float16_NaN(Register dst, FloatRegister src,
Register tmp1, Register tmp2) {
fmv_x_w(dst, src);
// Float (32 bits)
// Bit: 31 30 to 23 22 to 0
// +---+------------------+-----------------------------+
// | S | Exponent | Mantissa (Fraction) |
// +---+------------------+-----------------------------+
// 1 bit 8 bits 23 bits
//
// Float (16 bits)
// Bit: 15 14 to 10 9 to 0
// +---+----------------+------------------+
// | S | Exponent | Mantissa |
// +---+----------------+------------------+
// 1 bit 5 bits 10 bits
const int fp_sign_bits = 1;
const int fp32_bits = 32;
const int fp32_exponent_bits = 8;
const int fp32_mantissa_1st_part_bits = 10;
const int fp32_mantissa_2nd_part_bits = 9;
const int fp32_mantissa_3rd_part_bits = 4;
const int fp16_exponent_bits = 5;
const int fp16_mantissa_bits = 10;
// preserve the sign bit and exponent, clear mantissa.
srai(tmp2, dst, fp32_bits - fp_sign_bits - fp16_exponent_bits);
slli(tmp2, tmp2, fp16_mantissa_bits);
// Preserve high order bit of float NaN in the
// binary16 result NaN (tenth bit); OR in remaining
// bits into lower 9 bits of binary 16 significand.
// | (doppel & 0x007f_e000) >> 13 // 10 bits
// | (doppel & 0x0000_1ff0) >> 4 // 9 bits
// | (doppel & 0x0000_000f)); // 4 bits
//
// Check j.l.Float.floatToFloat16 for more information.
// 10 bits
int left_shift = fp_sign_bits + fp32_exponent_bits + 32;
int right_shift = left_shift + fp32_mantissa_2nd_part_bits + fp32_mantissa_3rd_part_bits;
slli(tmp1, dst, left_shift);
srli(tmp1, tmp1, right_shift);
orr(tmp2, tmp2, tmp1);
// 9 bits
left_shift += fp32_mantissa_1st_part_bits;
right_shift = left_shift + fp32_mantissa_3rd_part_bits;
slli(tmp1, dst, left_shift);
srli(tmp1, tmp1, right_shift);
orr(tmp2, tmp2, tmp1);
// 4 bits
andi(tmp1, dst, 0xf);
orr(dst, tmp2, tmp1);
}
#define FCVT_SAFE(FLOATCVT, FLOATSIG) \
void MacroAssembler::FLOATCVT##_safe(Register dst, FloatRegister src, Register tmp) { \
Label done; \

View File

@@ -44,7 +44,7 @@ class MacroAssembler: public Assembler {
MacroAssembler(CodeBuffer* code) : Assembler(code) {}
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg = t0);
void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg = t0);
// Alignment
int align(int modulus, int extra_offset = 0);
@@ -660,7 +660,9 @@ class MacroAssembler: public Assembler {
void cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_ge(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_gt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
public:
// We try to follow risc-v asm menomics.
@@ -1238,7 +1240,7 @@ public:
void far_jump(const Address &entry, Register tmp = t1);
static int far_branch_size() {
return 2 * 4; // auipc + jalr, see far_call() & far_jump()
return 2 * MacroAssembler::instruction_size; // auipc + jalr, see far_call() & far_jump()
}
void load_byte_map_base(Register reg);
@@ -1382,10 +1384,6 @@ public:
void adc(Register dst, Register src1, Register src2, Register carry);
void add2_with_carry(Register final_dest_hi, Register dest_hi, Register dest_lo,
Register src1, Register src2, Register carry);
void multiply_32_x_32_loop(Register x, Register xstart, Register x_xstart,
Register y, Register y_idx, Register z,
Register carry, Register product,
Register idx, Register kdx);
void multiply_64_x_64_loop(Register x, Register xstart, Register x_xstart,
Register y, Register y_idx, Register z,
Register carry, Register product,
@@ -1433,6 +1431,9 @@ public:
void java_round_float(Register dst, FloatRegister src, FloatRegister ftmp);
void java_round_double(Register dst, FloatRegister src, FloatRegister ftmp);
// Helper routine processing the slow path of NaN when converting float to float16
void float_to_float16_NaN(Register dst, FloatRegister src, Register tmp1, Register tmp2);
// vector load/store unit-stride instructions
void vlex_v(VectorRegister vd, Register base, Assembler::SEW sew, VectorMask vm = unmasked) {
switch (sew) {
@@ -1646,9 +1647,9 @@ public:
public:
enum {
// movptr
movptr1_instruction_size = 6 * instruction_size, // lui, addi, slli, addi, slli, addi. See movptr1().
movptr2_instruction_size = 5 * instruction_size, // lui, lui, slli, add, addi. See movptr2().
load_pc_relative_instruction_size = 2 * instruction_size // auipc, ld
movptr1_instruction_size = 6 * MacroAssembler::instruction_size, // lui, addi, slli, addi, slli, addi. See movptr1().
movptr2_instruction_size = 5 * MacroAssembler::instruction_size, // lui, lui, slli, add, addi. See movptr2().
load_pc_relative_instruction_size = 2 * MacroAssembler::instruction_size // auipc, ld
};
static bool is_load_pc_relative_at(address branch);
@@ -1703,11 +1704,11 @@ public:
// addi/jalr/load
static bool check_movptr1_data_dependency(address instr) {
address lui = instr;
address addi1 = lui + instruction_size;
address slli1 = addi1 + instruction_size;
address addi2 = slli1 + instruction_size;
address slli2 = addi2 + instruction_size;
address last_instr = slli2 + instruction_size;
address addi1 = lui + MacroAssembler::instruction_size;
address slli1 = addi1 + MacroAssembler::instruction_size;
address addi2 = slli1 + MacroAssembler::instruction_size;
address slli2 = addi2 + MacroAssembler::instruction_size;
address last_instr = slli2 + MacroAssembler::instruction_size;
return extract_rs1(addi1) == extract_rd(lui) &&
extract_rs1(addi1) == extract_rd(addi1) &&
extract_rs1(slli1) == extract_rd(addi1) &&
@@ -1727,10 +1728,10 @@ public:
// addi/jalr/load
static bool check_movptr2_data_dependency(address instr) {
address lui1 = instr;
address lui2 = lui1 + instruction_size;
address slli = lui2 + instruction_size;
address add = slli + instruction_size;
address last_instr = add + instruction_size;
address lui2 = lui1 + MacroAssembler::instruction_size;
address slli = lui2 + MacroAssembler::instruction_size;
address add = slli + MacroAssembler::instruction_size;
address last_instr = add + MacroAssembler::instruction_size;
return extract_rd(add) == extract_rd(lui2) &&
extract_rs1(add) == extract_rd(lui2) &&
extract_rs2(add) == extract_rd(slli) &&
@@ -1744,7 +1745,7 @@ public:
// srli
static bool check_li16u_data_dependency(address instr) {
address lui = instr;
address srli = lui + instruction_size;
address srli = lui + MacroAssembler::instruction_size;
return extract_rs1(srli) == extract_rd(lui) &&
extract_rs1(srli) == extract_rd(srli);
@@ -1755,7 +1756,7 @@ public:
// addiw
static bool check_li32_data_dependency(address instr) {
address lui = instr;
address addiw = lui + instruction_size;
address addiw = lui + MacroAssembler::instruction_size;
return extract_rs1(addiw) == extract_rd(lui) &&
extract_rs1(addiw) == extract_rd(addiw);
@@ -1766,7 +1767,7 @@ public:
// jalr/addi/load/float_load
static bool check_pc_relative_data_dependency(address instr) {
address auipc = instr;
address last_instr = auipc + instruction_size;
address last_instr = auipc + MacroAssembler::instruction_size;
return extract_rs1(last_instr) == extract_rd(auipc);
}
@@ -1776,7 +1777,7 @@ public:
// load
static bool check_load_pc_relative_data_dependency(address instr) {
address auipc = instr;
address load = auipc + instruction_size;
address load = auipc + MacroAssembler::instruction_size;
return extract_rd(load) == extract_rd(auipc) &&
extract_rs1(load) == extract_rd(load);

View File

@@ -33,6 +33,7 @@
#include "runtime/safepoint.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/align.hpp"
#include "utilities/ostream.hpp"
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
@@ -46,128 +47,111 @@ bool NativeInstruction::is_call_at(address addr) {
}
//-----------------------------------------------------------------------------
// NativeFarCall
//
// Implements direct far calling loading an address from the stub section version of reloc call.
// NativeCall
class NativeFarCall: public NativeInstruction {
public:
enum RISCV_specific_constants {
return_address_offset = 3 * NativeInstruction::instruction_size, // auipc + ld + jalr
};
address instruction_address() const { return addr_at(0); }
address next_instruction_address() const { return addr_at(return_address_offset); }
address return_address() const { return addr_at(return_address_offset); }
address destination() const;
address reloc_destination(address orig_address);
void set_destination(address dest);
void verify();
void print();
bool set_destination_mt_safe(address dest, bool assert_lock = true);
bool reloc_set_destination(address dest);
private:
address stub_address();
static void set_stub_address_destination_at(address dest, address value);
static address stub_address_destination_at(address src);
public:
static NativeFarCall* at(address addr);
static bool is_at(address addr);
static bool is_call_before(address return_address);
};
address NativeFarCall::destination() const {
address NativeCall::destination() const {
address addr = instruction_address();
assert(NativeFarCall::is_at(addr), "unexpected code at call site");
assert(NativeCall::is_at(addr), "unexpected code at call site");
address destination = MacroAssembler::target_addr_for_insn(addr);
address stub_addr = MacroAssembler::target_addr_for_insn(addr);
CodeBlob* cb = CodeCache::find_blob(addr);
assert(cb && cb->is_nmethod(), "sanity");
assert(cb != nullptr && cb->is_nmethod(), "nmethod expected");
nmethod *nm = (nmethod *)cb;
assert(nm != nullptr, "Sanity");
assert(nm->stub_contains(destination), "Sanity");
assert(destination != nullptr, "Sanity");
return stub_address_destination_at(destination);
assert(nm->stub_contains(stub_addr), "Sanity");
assert(stub_addr != nullptr, "Sanity");
return stub_address_destination_at(stub_addr);
}
address NativeFarCall::reloc_destination(address orig_address) {
address NativeCall::reloc_destination() {
address call_addr = instruction_address();
assert(NativeCall::is_at(call_addr), "unexpected code at call site");
CodeBlob *code = CodeCache::find_blob(call_addr);
assert(code != nullptr, "Could not find the containing code blob");
address stub_addr = nullptr;
if (code != nullptr && code->is_nmethod()) {
stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
if (code->is_nmethod()) {
// TODO: Need to revisit this when porting the AOT features.
stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, code->as_nmethod());
assert(stub_addr != nullptr, "Sanity");
}
if (stub_addr != nullptr) {
stub_addr = MacroAssembler::target_addr_for_insn(call_addr);
}
return stub_addr;
}
void NativeFarCall::set_destination(address dest) {
address addr = instruction_address();
assert(NativeFarCall::is_at(addr), "unexpected code at call site");
Unimplemented();
void NativeCall::verify() {
assert(NativeCall::is_at(instruction_address()), "unexpected code at call site");
}
void NativeFarCall::verify() {
assert(NativeFarCall::is_at(instruction_address()), "unexpected code at call site");
void NativeCall::print() {
assert(NativeCall::is_at(instruction_address()), "unexpected code at call site");
tty->print_cr(PTR_FORMAT ": auipc,ld,jalr x1, offset/reg, ", p2i(instruction_address()));
}
void NativeFarCall::print() {
assert(NativeFarCall::is_at(instruction_address()), "unexpected code at call site");
tty->print_cr(PTR_FORMAT ": auipc,ld,jalr x1, offset/reg, ", p2i(addr_at(0)));
void NativeCall::optimize_call(address dest, bool mt_safe) {
// Skip over auipc + ld
address jmp_ins_pc = instruction_address() + 2 * NativeInstruction::instruction_size;
// Rutime calls may be unaligned, but they are never changed after relocation.
assert(!mt_safe || is_aligned(jmp_ins_pc, NativeInstruction::instruction_size), "Must be naturally aligned: %p", jmp_ins_pc);
// If reachable use JAL
if (Assembler::reachable_from_branch_at(jmp_ins_pc, dest)) {
int64_t distance = dest - jmp_ins_pc;
uint32_t new_jal = Assembler::encode_jal(ra, distance);
Atomic::store((uint32_t *)jmp_ins_pc, new_jal);
} else if (!MacroAssembler::is_jalr_at(jmp_ins_pc)) { // The jalr is always identical: jalr ra, 0(t1)
uint32_t new_jalr = Assembler::encode_jalr(ra, t1, 0);
Atomic::store((uint32_t *)jmp_ins_pc, new_jalr);
} else {
// No change to instruction stream
return;
}
// We changed instruction stream
if (mt_safe) {
// IC invalidate provides a leading full fence, it thus happens after we changed the instruction stream.
ICache::invalidate_range(jmp_ins_pc, NativeInstruction::instruction_size);
}
}
bool NativeFarCall::set_destination_mt_safe(address dest, bool assert_lock) {
assert(NativeFarCall::is_at(addr_at(0)), "unexpected code at call site");
assert(!assert_lock ||
(CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
CompiledICLocker::is_safe(addr_at(0)),
bool NativeCall::set_destination_mt_safe(address dest) {
assert(NativeCall::is_at(instruction_address()), "unexpected code at call site");
assert((CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
CompiledICLocker::is_safe(instruction_address()),
"concurrent code patching");
address call_addr = addr_at(0);
assert(NativeFarCall::is_at(call_addr), "unexpected code at call site");
address stub_addr = stub_address();
assert(stub_addr != nullptr, "No stub?");
set_stub_address_destination_at(stub_addr, dest); // release
// optimize_call happens after we stored new address in addr stub.
// patches jalr -> jal/jal -> jalr depending on dest
optimize_call(dest, true);
if (stub_addr != nullptr) {
set_stub_address_destination_at(stub_addr, dest);
return true;
}
return false;
return true;
}
bool NativeFarCall::reloc_set_destination(address dest) {
address call_addr = addr_at(0);
assert(NativeFarCall::is_at(call_addr), "unexpected code at call site");
// The argument passed in is the address to the stub containing the destination
bool NativeCall::reloc_set_destination(address stub_addr) {
address call_addr = instruction_address();
assert(NativeCall::is_at(call_addr), "unexpected code at call site");
CodeBlob *code = CodeCache::find_blob(call_addr);
assert(code != nullptr, "Could not find the containing code blob");
address stub_addr = nullptr;
if (code != nullptr && code->is_nmethod()) {
stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
}
if (code->is_nmethod()) {
// TODO: Need to revisit this when porting the AOT features.
assert(stub_addr != nullptr, "Sanity");
assert(stub_addr == trampoline_stub_Relocation::get_trampoline_for(call_addr, code->as_nmethod()), "Sanity");
MacroAssembler::pd_patch_instruction_size(call_addr, stub_addr); // patches auipc + ld to stub_addr
if (stub_addr != nullptr) {
MacroAssembler::pd_patch_instruction_size(call_addr, stub_addr);
address dest = stub_address_destination_at(stub_addr);
optimize_call(dest, false); // patches jalr -> jal/jal -> jalr depending on dest
}
return true;
}
void NativeFarCall::set_stub_address_destination_at(address dest, address value) {
void NativeCall::set_stub_address_destination_at(address dest, address value) {
assert_cond(dest != nullptr);
assert_cond(value != nullptr);
@@ -175,31 +159,24 @@ void NativeFarCall::set_stub_address_destination_at(address dest, address value)
OrderAccess::release();
}
address NativeFarCall::stub_address_destination_at(address src) {
address NativeCall::stub_address_destination_at(address src) {
assert_cond(src != nullptr);
address dest = (address)get_data64_at(src);
return dest;
}
address NativeFarCall::stub_address() {
address call_addr = addr_at(0);
address NativeCall::stub_address() {
address call_addr = instruction_address();
CodeBlob *code = CodeCache::find_blob(call_addr);
assert(code != nullptr, "Could not find the containing code blob");
address dest = MacroAssembler::pd_call_destination(call_addr);
assert(code->contains(dest), "Sanity");
return dest;
address stub_addr = MacroAssembler::target_addr_for_insn(call_addr);
assert(code->contains(stub_addr), "Sanity");
return stub_addr;
}
NativeFarCall* NativeFarCall::at(address addr) {
assert_cond(addr != nullptr);
assert(NativeFarCall::is_at(addr), "unexpected code at call site: %p", addr);
NativeFarCall* call = (NativeFarCall*)(addr);
return call;
}
bool NativeFarCall::is_at(address addr) {
bool NativeCall::is_at(address addr) {
assert_cond(addr != nullptr);
const int instr_size = NativeInstruction::instruction_size;
if (MacroAssembler::is_auipc_at(addr) &&
@@ -209,65 +186,23 @@ bool NativeFarCall::is_at(address addr) {
(MacroAssembler::extract_rd(addr + instr_size) == x6) &&
(MacroAssembler::extract_rs1(addr + instr_size) == x6) &&
(MacroAssembler::extract_rs1(addr + 2 * instr_size) == x6) &&
(MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) {
(MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) {
return true;
}
if (MacroAssembler::is_auipc_at(addr) &&
MacroAssembler::is_ld_at(addr + instr_size) &&
MacroAssembler::is_jal_at(addr + 2 * instr_size) &&
(MacroAssembler::extract_rd(addr) == x6) &&
(MacroAssembler::extract_rd(addr + instr_size) == x6) &&
(MacroAssembler::extract_rs1(addr + instr_size) == x6) &&
(MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) {
return true;
}
return false;
}
bool NativeFarCall::is_call_before(address return_address) {
return NativeFarCall::is_at(return_address - return_address_offset);
}
//-----------------------------------------------------------------------------
// NativeCall
address NativeCall::instruction_address() const {
return NativeFarCall::at(addr_at(0))->instruction_address();
}
address NativeCall::next_instruction_address() const {
return NativeFarCall::at(addr_at(0))->next_instruction_address();
}
address NativeCall::return_address() const {
return NativeFarCall::at(addr_at(0))->return_address();
}
address NativeCall::destination() const {
return NativeFarCall::at(addr_at(0))->destination();
}
address NativeCall::reloc_destination(address orig_address) {
return NativeFarCall::at(addr_at(0))->reloc_destination(orig_address);
}
void NativeCall::set_destination(address dest) {
NativeFarCall::at(addr_at(0))->set_destination(dest);
}
void NativeCall::verify() {
NativeFarCall::at(addr_at(0))->verify();;
}
void NativeCall::print() {
NativeFarCall::at(addr_at(0))->print();;
}
bool NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
return NativeFarCall::at(addr_at(0))->set_destination_mt_safe(dest, assert_lock);
}
bool NativeCall::reloc_set_destination(address dest) {
return NativeFarCall::at(addr_at(0))->reloc_set_destination(dest);
}
bool NativeCall::is_at(address addr) {
return NativeFarCall::is_at(addr);
}
bool NativeCall::is_call_before(address return_address) {
return NativeFarCall::is_call_before(return_address);
return NativeCall::is_at(return_address - NativeCall::instruction_size);
}
NativeCall* nativeCall_at(address addr) {
@@ -280,7 +215,7 @@ NativeCall* nativeCall_at(address addr) {
NativeCall* nativeCall_before(address return_address) {
assert_cond(return_address != nullptr);
NativeCall* call = nullptr;
call = (NativeCall*)(return_address - NativeFarCall::return_address_offset);
call = (NativeCall*)(return_address - NativeCall::instruction_size);
DEBUG_ONLY(call->verify());
return call;
}
@@ -432,7 +367,9 @@ void NativeIllegalInstruction::insert(address code_pos) {
}
bool NativeInstruction::is_stop() {
return uint_at(0) == 0xc0101073; // an illegal instruction, 'csrrw x0, time, x0'
// an illegal instruction, 'csrrw x0, time, x0'
uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::time, x0);
return uint_at(0) == encoded;
}
//-------------------------------------------------------------------
@@ -481,6 +418,8 @@ void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
MacroAssembler a(&cb);
Assembler::IncompressibleScope scope(&a); // Fixed length: see NativeGeneralJump::get_instruction_size()
MacroAssembler::assert_alignment(code_pos);
int32_t offset = 0;
a.movptr(t1, entry, offset, t0); // lui, lui, slli, add
a.jr(t1, offset); // jalr
@@ -512,6 +451,7 @@ bool NativePostCallNop::decode(int32_t& oopmap_slot, int32_t& cb_offset) const {
}
bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
MacroAssembler::assert_alignment(addr_at(4));
if (((oopmap_slot & 0xff) != oopmap_slot) || ((cb_offset & 0xffffff) != cb_offset)) {
return false; // cannot encode
}
@@ -523,14 +463,17 @@ bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
return true; // successfully encoded
}
void NativeDeoptInstruction::verify() {
bool NativeDeoptInstruction::is_deopt_at(address instr) {
assert(instr != nullptr, "Must be");
uint32_t value = Assembler::ld_instr(instr);
uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::instret, x0);
return value == encoded;
}
// Inserts an undefined instruction at a given pc
void NativeDeoptInstruction::insert(address code_pos) {
// 0xc0201073 encodes CSRRW x0, instret, x0
uint32_t insn = 0xc0201073;
uint32_t *pos = (uint32_t *) code_pos;
*pos = insn;
MacroAssembler::assert_alignment(code_pos);
uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::instret, x0);
Assembler::sd_instr(code_pos, encoded);
ICache::invalidate_range(code_pos, 4);
}

View File

@@ -94,7 +94,6 @@ class NativeInstruction {
static uint64_t get_data64_at(address src) { return Bytes::get_native_u8(src); }
public:
inline friend NativeInstruction* nativeInstruction_at(address addr);
static bool maybe_cpool_ref(address instr) {
@@ -112,6 +111,7 @@ NativeCall* nativeCall_before(address return_address);
// The NativeCall is an abstraction for accessing/manipulating native
// call instructions (used to manipulate inline caches, primitive &
// DSO calls, etc.).
// NativeCall is reloc call on RISC-V. See MacroAssembler::reloc_call.
class NativeCall: private NativeInstruction {
// private: when common code is using byte_size()
private:
@@ -119,34 +119,48 @@ class NativeCall: private NativeInstruction {
// Use byte_size() as it can be changed in runtime
// Since instruction_size exists on NativeInstruction we need
// to overload and hide it.
instruction_size = 3 * Assembler::instruction_size // auipc + ld + jalr
instruction_size = 3 * NativeInstruction::instruction_size // auipc + ld + jalr
};
public:
public:
static int byte_size() {
return 3 * NativeInstruction::instruction_size; // auipc + ld + jalr
return NativeCall::instruction_size; // auipc + ld + jalr
}
// Creation
friend NativeCall* nativeCall_at(address addr);
friend NativeCall* nativeCall_before(address return_address);
address instruction_address() const;
address next_instruction_address() const;
address return_address() const;
address instruction_address() const { return addr_at(0); }
address next_instruction_address() const { return addr_at(NativeCall::instruction_size); }
address return_address() const { return addr_at(NativeCall::instruction_size); }
address destination() const;
address reloc_destination(address orig_address);
address reloc_destination();
void verify_alignment() {} // do nothing on riscv
void verify();
void print();
void set_destination(address dest);
bool set_destination_mt_safe(address dest, bool assert_lock = true);
void set_destination(address dest) { Unimplemented(); }
// patch stub to target address of the reloc call
bool set_destination_mt_safe(address dest);
// patch reloc call to stub address
bool reloc_set_destination(address dest);
static bool is_at(address addr);
static bool is_call_before(address return_address);
private:
// return stub address, without checking stub address in locs
address stub_address();
// set target address at stub
static void set_stub_address_destination_at(address dest, address value);
// return target address at stub
static address stub_address_destination_at(address src);
// We either have a jalr or jal depending on distance to old destination.
// This method emits a new jal if new destination is within jal reach.
// Otherwise restores the jalr which can reach any destination.
void optimize_call(address dest, bool mt_safe = true);
};
// An interface for accessing/manipulating native mov reg, imm instructions.
@@ -363,14 +377,7 @@ class NativeDeoptInstruction: public NativeInstruction {
address instruction_address() const { return addr_at(instruction_offset); }
address next_instruction_address() const { return addr_at(instruction_size); }
void verify();
static bool is_deopt_at(address instr) {
assert(instr != nullptr, "");
uint32_t value = Assembler::ld_instr(instr);
// 0xc0201073 encodes CSRRW x0, instret, x0
return value == 0xc0201073;
}
static bool is_deopt_at(address instr);
// MT-safe patching
static void insert(address code_pos);

View File

@@ -72,13 +72,12 @@ void Relocation::pd_set_data_value(address x, bool verify_only) {
}
address Relocation::pd_call_destination(address orig_addr) {
assert(is_call(), "should be an address instruction here");
assert(is_call(), "should be a call here");
if (NativeCall::is_at(addr())) {
return nativeCall_at(addr())->reloc_destination(orig_addr);
return nativeCall_at(addr())->reloc_destination();
}
// Non call reloc
if (orig_addr != nullptr) {
// the extracted address from the instructions in address orig_addr
address new_addr = MacroAssembler::pd_call_destination(orig_addr);
// If call is branch to self, don't try to relocate it, just leave it
// as branch to self. This happens during code generation if the code
@@ -87,20 +86,19 @@ address Relocation::pd_call_destination(address orig_addr) {
new_addr = (new_addr == orig_addr) ? addr() : new_addr;
return new_addr;
}
return MacroAssembler::pd_call_destination(addr());
}
void Relocation::pd_set_call_destination(address x) {
assert(is_call(), "should be an address instruction here");
assert(is_call(), "should be a call here");
if (NativeCall::is_at(addr())) {
NativeCall* nc = nativeCall_at(addr());
if (nc->reloc_set_destination(x)) {
return;
}
NativeCall* call = nativeCall_at(addr());
call->reloc_set_destination(x);
} else {
MacroAssembler::pd_patch_instruction_size(addr(), x);
assert(pd_call_destination(addr()) == x, "fail in reloc");
}
MacroAssembler::pd_patch_instruction_size(addr(), x);
address pd_call = pd_call_destination(addr());
assert(pd_call == x, "fail in reloc");
}
address* Relocation::pd_address_in_code() {

View File

@@ -1269,6 +1269,26 @@ int CallDynamicJavaDirectNode::compute_padding(int current_offset) const
return align_up(current_offset, alignment_required()) - current_offset;
}
int CallRuntimeDirectNode::compute_padding(int current_offset) const
{
return align_up(current_offset, alignment_required()) - current_offset;
}
int CallLeafDirectNode::compute_padding(int current_offset) const
{
return align_up(current_offset, alignment_required()) - current_offset;
}
int CallLeafDirectVectorNode::compute_padding(int current_offset) const
{
return align_up(current_offset, alignment_required()) - current_offset;
}
int CallLeafNoFPDirectNode::compute_padding(int current_offset) const
{
return align_up(current_offset, alignment_required()) - current_offset;
}
//=============================================================================
#ifndef PRODUCT
@@ -1493,7 +1513,7 @@ void MachEpilogNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
code_stub = &stub->entry();
}
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */);
}
}
@@ -2271,10 +2291,6 @@ encode %{
__ mv(dst_reg, 1);
%}
enc_class riscv_enc_mov_byte_map_base(iRegP dst) %{
__ load_byte_map_base($dst$$Register);
%}
enc_class riscv_enc_mov_n(iRegN dst, immN src) %{
Register dst_reg = as_Register($dst$$reg);
address con = (address)$src$$constant;
@@ -2825,21 +2841,6 @@ operand immP_1()
interface(CONST_INTER);
%}
// Card Table Byte Map Base
operand immByteMapBase()
%{
// Get base of card map
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&)
(CardTable::CardValue*)n->get_ptr() ==
((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
match(ConP);
op_cost(0);
format %{ %}
interface(CONST_INTER);
%}
// Int Immediate: low 16-bit mask
operand immI_16bits()
%{
@@ -3843,13 +3844,18 @@ opclass immIorL(immI, immL);
pipeline %{
attributes %{
// RISC-V instructions are of fixed length
fixed_size_instructions; // Fixed size instructions TODO does
max_instructions_per_bundle = 2; // Generic RISC-V 1, Sifive Series 7 2
// RISC-V instructions come in 32-bit word units
instruction_unit_size = 4; // An instruction is 4 bytes long
instruction_fetch_unit_size = 64; // The processor fetches one line
instruction_fetch_units = 1; // of 64 bytes
// RISC-V instructions are of length 2 or 4 bytes.
variable_size_instructions;
instruction_unit_size = 2;
// Up to 4 instructions per bundle
max_instructions_per_bundle = 4;
// The RISC-V processor fetches 64 bytes...
instruction_fetch_unit_size = 64;
// ...in one line.
instruction_fetch_units = 1;
// List of nop instructions
nops( MachNop );
@@ -4799,18 +4805,6 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
ins_pipe(ialu_imm);
%}
// Load Byte Map Base Constant
instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con)
%{
match(Set dst con);
ins_cost(ALU_COST);
format %{ "mv $dst, $con\t# Byte Map Base, #@loadByteMapBase" %}
ins_encode(riscv_enc_mov_byte_map_base(dst));
ins_pipe(ialu_imm);
%}
// Load Narrow Pointer Constant
instruct loadConN(iRegNNoSp dst, immN con)
%{
@@ -8195,7 +8189,7 @@ instruct unnecessary_membar_volatile_rvtso() %{
ins_cost(0);
size(0);
format %{ "#@unnecessary_membar_volatile_rvtso (unnecessary so empty encoding)" %}
ins_encode %{
__ block_comment("unnecessary_membar_volatile_rvtso");
@@ -8431,6 +8425,17 @@ instruct castVV(vReg dst)
ins_pipe(pipe_class_empty);
%}
instruct castVVMask(vRegMask dst)
%{
match(Set dst (CastVV dst));
size(0);
format %{ "# castVV of $dst" %}
ins_encode(/* empty encoding */);
ins_cost(0);
ins_pipe(pipe_class_empty);
%}
// ============================================================================
// Convert Instructions
@@ -8565,7 +8570,7 @@ instruct convF2HF_reg_reg(iRegINoSp dst, fRegF src, fRegF ftmp, iRegINoSp xtmp)
instruct reinterpretS2HF(fRegF dst, iRegI src)
%{
match(Set dst (ReinterpretS2HF src));
format %{ "fmv.h.x $dst, $src" %}
format %{ "fmv.h.x $dst, $src\t# reinterpretS2HF" %}
ins_encode %{
__ fmv_h_x($dst$$FloatRegister, $src$$Register);
%}
@@ -8585,7 +8590,7 @@ instruct convF2HFAndS2HF(fRegF dst, fRegF src)
instruct reinterpretHF2S(iRegINoSp dst, fRegF src)
%{
match(Set dst (ReinterpretHF2S src));
format %{ "fmv.x.h $dst, $src" %}
format %{ "fmv.x.h $dst, $src\t# reinterpretHF2S" %}
ins_encode %{
__ fmv_x_h($dst$$Register, $src$$FloatRegister);
%}
@@ -8947,7 +8952,7 @@ instruct encodeKlass_not_null(iRegNNoSp dst, iRegP src) %{
instruct decodeKlass_not_null(iRegPNoSp dst, iRegN src, iRegPNoSp tmp) %{
match(Set dst (DecodeNKlass src));
effect(TEMP tmp);
effect(TEMP_DEF dst, TEMP tmp);
ins_cost(ALU_COST);
format %{ "decode_klass_not_null $dst, $src\t#@decodeKlass_not_null" %}
@@ -10518,6 +10523,7 @@ instruct CallRuntimeDirect(method meth)
ins_encode(riscv_enc_java_to_runtime(meth));
ins_pipe(pipe_class_call);
ins_alignment(4);
%}
// Call Runtime Instruction
@@ -10535,6 +10541,7 @@ instruct CallLeafDirect(method meth)
ins_encode(riscv_enc_java_to_runtime(meth));
ins_pipe(pipe_class_call);
ins_alignment(4);
%}
// Call Runtime Instruction without safepoint and with vector arguments
@@ -10552,6 +10559,7 @@ instruct CallLeafDirectVector(method meth)
ins_encode(riscv_enc_java_to_runtime(meth));
ins_pipe(pipe_class_call);
ins_alignment(4);
%}
// Call Runtime Instruction
@@ -10569,6 +10577,7 @@ instruct CallLeafNoFPDirect(method meth)
ins_encode(riscv_enc_java_to_runtime(meth));
ins_pipe(pipe_class_call);
ins_alignment(4);
%}
// ============================================================================

View File

@@ -110,6 +110,7 @@ source %{
if (vlen < 4) {
return false;
}
break;
case Op_VectorCastHF2F:
case Op_VectorCastF2HF:
case Op_AddVHF:

View File

@@ -1004,20 +1004,23 @@ static void gen_continuation_enter(MacroAssembler* masm,
__ bnez(c_rarg2, call_thaw);
// Make sure the call is patchable
__ align(NativeInstruction::instruction_size);
address call_pc;
{
Assembler::IncompressibleScope scope(masm);
// Make sure the call is patchable
__ align(NativeInstruction::instruction_size);
const address tr_call = __ reloc_call(resolve);
if (tr_call == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
call_pc = __ reloc_call(resolve);
if (call_pc == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
}
oop_maps->add_gc_map(__ pc() - start, map);
__ post_call_nop();
}
oop_maps->add_gc_map(__ pc() - start, map);
__ post_call_nop();
__ j(exit);
address stub = CompiledDirectCall::emit_to_interp_stub(masm, tr_call);
address stub = CompiledDirectCall::emit_to_interp_stub(masm, call_pc);
if (stub == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
}
@@ -1036,26 +1039,36 @@ static void gen_continuation_enter(MacroAssembler* masm,
__ bnez(c_rarg2, call_thaw);
// Make sure the call is patchable
__ align(NativeInstruction::instruction_size);
address call_pc;
{
Assembler::IncompressibleScope scope(masm);
// Make sure the call is patchable
__ align(NativeInstruction::instruction_size);
const address tr_call = __ reloc_call(resolve);
if (tr_call == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
call_pc = __ reloc_call(resolve);
if (call_pc == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
}
oop_maps->add_gc_map(__ pc() - start, map);
__ post_call_nop();
}
oop_maps->add_gc_map(__ pc() - start, map);
__ post_call_nop();
__ j(exit);
__ bind(call_thaw);
ContinuationEntry::_thaw_call_pc_offset = __ pc() - start;
__ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw()));
oop_maps->add_gc_map(__ pc() - start, map->deep_copy());
ContinuationEntry::_return_pc_offset = __ pc() - start;
__ post_call_nop();
// Post call nops must be natural aligned due to cmodx rules.
{
Assembler::IncompressibleScope scope(masm);
__ align(NativeInstruction::instruction_size);
ContinuationEntry::_thaw_call_pc_offset = __ pc() - start;
__ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw()));
oop_maps->add_gc_map(__ pc() - start, map->deep_copy());
ContinuationEntry::_return_pc_offset = __ pc() - start;
__ post_call_nop();
}
__ bind(exit);
ContinuationEntry::_cleanup_offset = __ pc() - start;
@@ -1084,7 +1097,7 @@ static void gen_continuation_enter(MacroAssembler* masm,
__ jr(x11); // the exception handler
}
address stub = CompiledDirectCall::emit_to_interp_stub(masm, tr_call);
address stub = CompiledDirectCall::emit_to_interp_stub(masm, call_pc);
if (stub == nullptr) {
fatal("CodeCache is full at gen_continuation_enter");
}
@@ -1117,10 +1130,16 @@ static void gen_continuation_yield(MacroAssembler* masm,
__ mv(c_rarg1, sp);
// Post call nops must be natural aligned due to cmodx rules.
__ align(NativeInstruction::instruction_size);
frame_complete = __ pc() - start;
address the_pc = __ pc();
__ post_call_nop(); // this must be exactly after the pc value that is pushed into the frame info, we use this nop for fast CodeBlob lookup
{
Assembler::IncompressibleScope scope(masm);
__ post_call_nop(); // this must be exactly after the pc value that is pushed into the frame info, we use this nop for fast CodeBlob lookup
}
__ mv(c_rarg0, xthread);
__ set_last_Java_frame(sp, fp, the_pc, t0);
@@ -1777,15 +1796,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// check for safepoint operation in progress and/or pending suspend requests
{
// We need an acquire here to ensure that any subsequent load of the
// global SafepointSynchronize::_state flag is ordered after this load
// of the thread-local polling word. We don't want this poll to
// return false (i.e. not safepointing) and a later poll of the global
// SafepointSynchronize::_state spuriously to return true.
// This is to avoid a race when we're in a native->Java transition
// racing the code which wakes up from a safepoint.
__ safepoint_poll(safepoint_in_progress, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */);
__ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset()));
__ bnez(t0, safepoint_in_progress);
__ bind(safepoint_in_progress_done);

View File

@@ -683,10 +683,11 @@ class StubGenerator: public StubCodeGenerator {
address start = __ pc();
if (UseBlockZeroing) {
// Ensure count >= 2*CacheLineSize so that it still deserves a cbo.zero
// after alignment.
int zicboz_block_size = VM_Version::zicboz_block_size.value();
// Ensure count >= 2 * zicboz_block_size so that it still deserves
// a cbo.zero after alignment.
Label small;
int low_limit = MAX2(2 * CacheLineSize, BlockZeroingLowLimit) / wordSize;
int low_limit = MAX2(2 * zicboz_block_size, (int)BlockZeroingLowLimit) / wordSize;
__ mv(tmp1, low_limit);
__ blt(cnt, tmp1, small);
__ zero_dcache_blocks(base, cnt, tmp1, tmp2);
@@ -6354,18 +6355,8 @@ class StubGenerator: public StubCodeGenerator {
__ ret();
__ bind(NaN_SLOW);
__ fmv_x_w(dst, src);
// preserve the payloads of non-canonical NaNs.
__ srai(dst, dst, 13);
// preserve the sign bit.
__ srai(t1, dst, 13);
__ slli(t1, t1, 10);
__ mv(t0, 0x3ff);
__ orr(t1, t1, t0);
// get the result by merging sign bit and payloads of preserved non-canonical NaNs.
__ andr(dst, dst, t1);
__ float_to_float16_NaN(dst, src, t0, t1);
__ ret();
return entry;

View File

@@ -1229,15 +1229,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
{
Label L, Continue;
// We need an acquire here to ensure that any subsequent load of the
// global SafepointSynchronize::_state flag is ordered after this load
// of the thread-local polling word. We don't want this poll to
// return false (i.e. not safepointing) and a later poll of the global
// SafepointSynchronize::_state spuriously to return true.
//
// This is to avoid a race when we're in a native->Java transition
// racing the code which wakes up from a safepoint.
__ safepoint_poll(L, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(L, true /* at_return */, false /* in_nmethod */);
__ lwu(t1, Address(xthread, JavaThread::suspend_flags_offset()));
__ beqz(t1, Continue);
__ bind(L);
@@ -1388,7 +1380,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
Label slow_path;
Label fast_path;
__ safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
__ j(fast_path);
__ bind(slow_path);

View File

@@ -133,6 +133,7 @@ Address TemplateTable::at_bcp(int offset) {
void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
Register temp_reg, bool load_bc_into_bc_reg /*=true*/,
int byte_no) {
assert_different_registers(bc_reg, temp_reg);
if (!RewriteBytecodes) { return; }
Label L_patch_done;
@@ -196,7 +197,11 @@ void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg,
__ bind(L_okay);
#endif
// patch bytecode
// Patch bytecode with release store to coordinate with ResolvedFieldEntry loads
// in fast bytecode codelets. load_field_entry has a memory barrier that gains
// the needed ordering, together with control dependency on entering the fast codelet
// itself.
__ membar(MacroAssembler::LoadStore | MacroAssembler::StoreStore);
__ sb(bc_reg, at_bcp(0));
__ bind(L_patch_done);
}
@@ -3017,6 +3022,7 @@ void TemplateTable::fast_storefield(TosState state) {
// X11: field offset, X12: field holder, X13: flags
load_resolved_field_entry(x12, x12, noreg, x11, x13);
__ verify_field_offset(x11);
{
Label notVolatile;
@@ -3104,6 +3110,8 @@ void TemplateTable::fast_accessfield(TosState state) {
__ load_field_entry(x12, x11);
__ load_sized_value(x11, Address(x12, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/);
__ verify_field_offset(x11);
__ load_unsigned_byte(x13, Address(x12, in_bytes(ResolvedFieldEntry::flags_offset())));
// x10: object
@@ -3159,7 +3167,9 @@ void TemplateTable::fast_xaccess(TosState state) {
__ ld(x10, aaddress(0));
// access constant pool cache
__ load_field_entry(x12, x13, 2);
__ load_sized_value(x11, Address(x12, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/);
__ verify_field_offset(x11);
// make sure exception is reported in correct bcp range (getfield is
// next instruction)

View File

@@ -147,7 +147,7 @@ void VM_Version::common_initialize() {
if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
FLAG_SET_DEFAULT(AvoidUnalignedAccesses,
unaligned_access.value() != MISALIGNED_FAST);
unaligned_scalar.value() != MISALIGNED_SCALAR_FAST);
}
if (!AvoidUnalignedAccesses) {
@@ -162,7 +162,12 @@ void VM_Version::common_initialize() {
// This machine has fast unaligned memory accesses
if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
FLAG_SET_DEFAULT(UseUnalignedAccesses,
unaligned_access.value() == MISALIGNED_FAST);
(unaligned_scalar.value() == MISALIGNED_SCALAR_FAST));
}
if (FLAG_IS_DEFAULT(AlignVector)) {
FLAG_SET_DEFAULT(AlignVector,
unaligned_vector.value() != MISALIGNED_VECTOR_FAST);
}
#ifdef __riscv_ztso
@@ -181,12 +186,13 @@ void VM_Version::common_initialize() {
FLAG_SET_DEFAULT(UsePopCountInstruction, false);
}
if (UseZicboz) {
if (UseZicboz && zicboz_block_size.enabled() && zicboz_block_size.value() > 0) {
assert(is_power_of_2(zicboz_block_size.value()), "Sanity");
if (FLAG_IS_DEFAULT(UseBlockZeroing)) {
FLAG_SET_DEFAULT(UseBlockZeroing, true);
}
if (FLAG_IS_DEFAULT(BlockZeroingLowLimit)) {
FLAG_SET_DEFAULT(BlockZeroingLowLimit, 2 * CacheLineSize);
FLAG_SET_DEFAULT(BlockZeroingLowLimit, 4 * zicboz_block_size.value());
}
} else if (UseBlockZeroing) {
warning("Block zeroing is not available");
@@ -194,24 +200,19 @@ void VM_Version::common_initialize() {
}
if (UseRVV) {
if (!ext_V.enabled() && FLAG_IS_DEFAULT(UseRVV)) {
warning("RVV is not supported on this CPU");
FLAG_SET_DEFAULT(UseRVV, false);
} else {
// read vector length from vector CSR vlenb
_initial_vector_length = cpu_vector_length();
}
// read vector length from vector CSR vlenb
_initial_vector_length = cpu_vector_length();
}
// Misc Intrinsics could depend on RVV
// Misc Intrinsics that could depend on RVV.
if (UseZba || UseRVV) {
if (!AvoidUnalignedAccesses && (UseZba || UseRVV)) {
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
}
} else {
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)");
warning("CRC32 intrinsic are not available on this CPU.");
}
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
}
@@ -325,20 +326,40 @@ void VM_Version::c2_initialize() {
FLAG_SET_DEFAULT(UseMulAddIntrinsic, true);
}
if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) {
FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, true);
if (!AvoidUnalignedAccesses) {
if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) {
FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, true);
}
} else if (UseMultiplyToLenIntrinsic) {
warning("Intrinsics for BigInteger.multiplyToLen() not available on this CPU.");
FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, false);
}
if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) {
FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, true);
if (!AvoidUnalignedAccesses) {
if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) {
FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, true);
}
} else if (UseSquareToLenIntrinsic) {
warning("Intrinsics for BigInteger.squareToLen() not available on this CPU.");
FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, false);
}
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, true);
if (!AvoidUnalignedAccesses) {
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, true);
}
} else if (UseMontgomeryMultiplyIntrinsic) {
warning("Intrinsics for BigInteger.montgomeryMultiply() not available on this CPU.");
FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, false);
}
if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true);
if (!AvoidUnalignedAccesses) {
if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true);
}
} else if (UseMontgomerySquareIntrinsic) {
warning("Intrinsics for BigInteger.montgomerySquare() not available on this CPU.");
FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, false);
}
// Adler32
@@ -456,10 +477,6 @@ void VM_Version::c2_initialize() {
warning("AES/CTR intrinsics are not available on this CPU");
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
}
if (FLAG_IS_DEFAULT(AlignVector)) {
FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses);
}
}
#endif // COMPILER2

View File

@@ -86,25 +86,27 @@ class VM_Version : public Abstract_VM_Version {
} \
} \
#define UPDATE_DEFAULT_DEP(flag, dep) \
void update_flag() { \
assert(enabled(), "Must be."); \
/* dep must be declared before */ \
assert((uintptr_t)(this) > \
(uintptr_t)(&dep), "Invalid");\
if (FLAG_IS_DEFAULT(flag)) { \
if (dep.enabled()) { \
FLAG_SET_DEFAULT(flag, true); \
} else { \
FLAG_SET_DEFAULT(flag, false); \
} \
} else { \
/* Sync CPU features with flags */ \
if (!flag) { \
disable_feature(); \
} \
} \
} \
#define UPDATE_DEFAULT_DEP(flag, dep) \
void update_flag() { \
assert(enabled(), "Must be."); \
/* dep must be declared before */ \
assert((uintptr_t)(this) > \
(uintptr_t)(&dep), "Invalid"); \
if (FLAG_IS_DEFAULT(flag)) { \
if (dep.enabled()) { \
FLAG_SET_DEFAULT(flag, true); \
} else { \
FLAG_SET_DEFAULT(flag, false); \
/* Sync CPU features with flags */ \
disable_feature(); \
} \
} else { \
/* Sync CPU features with flags */ \
if (!flag) { \
disable_feature(); \
} \
} \
} \
#define NO_UPDATE_DEFAULT \
void update_flag() {} \
@@ -151,7 +153,8 @@ class VM_Version : public Abstract_VM_Version {
// mvendorid Manufactory JEDEC id encoded, ISA vol 2 3.1.2..
// marchid Id for microarch. Mvendorid plus marchid uniquely identify the microarch.
// mimpid A unique encoding of the version of the processor implementation.
// unaligned_access Unaligned memory accesses (unknown, unspported, emulated, slow, firmware, fast)
// unaligned_scalar Performance of misaligned scalar accesses (unknown, emulated, slow, fast, unsupported)
// unaligned_vector Performance of misaligned vector accesses (unknown, unspported, slow, fast)
// satp mode SATP bits (number of virtual addr bits) mbare, sv39, sv48, sv57, sv64
public:
@@ -160,45 +163,47 @@ class VM_Version : public Abstract_VM_Version {
// Note: the order matters, depender should be after their dependee. E.g. ext_V before ext_Zvbb.
// declaration name , extension name, bit pos ,in str, mapped flag)
#define RV_FEATURE_FLAGS(decl) \
decl(ext_I , "i" , ('I' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_M , "m" , ('M' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_A , "a" , ('A' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_F , "f" , ('F' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_D , "d" , ('D' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_C , "c" , ('C' - 'A'), true , UPDATE_DEFAULT(UseRVC)) \
decl(ext_Q , "q" , ('Q' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_H , "h" , ('H' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \
decl(ext_Zicbom , "Zicbom" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbom)) \
decl(ext_Zicboz , "Zicboz" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicboz)) \
decl(ext_Zicbop , "Zicbop" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbop)) \
decl(ext_Zba , "Zba" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZba)) \
decl(ext_Zbb , "Zbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbb)) \
decl(ext_Zbc , "Zbc" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zbs , "Zbs" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbs)) \
decl(ext_Zbkb , "Zbkb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbkb)) \
decl(ext_Zcb , "Zcb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZcb)) \
decl(ext_Zfa , "Zfa" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfa)) \
decl(ext_Zfh , "Zfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfh)) \
decl(ext_Zfhmin , "Zfhmin" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfhmin)) \
decl(ext_Zicsr , "Zicsr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zicntr , "Zicntr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zifencei , "Zifencei" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zic64b , "Zic64b" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZic64b)) \
decl(ext_Ztso , "Ztso" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZtso)) \
decl(ext_Zihintpause , "Zihintpause" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZihintpause)) \
decl(ext_Zacas , "Zacas" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZacas)) \
decl(ext_Zvbb , "Zvbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbb, ext_V)) \
decl(ext_Zvbc , "Zvbc" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbc, ext_V)) \
decl(ext_Zvfh , "Zvfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvfh, ext_V)) \
decl(ext_Zvkn , "Zvkn" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvkn, ext_V)) \
decl(ext_Zicond , "Zicond" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicond)) \
decl(mvendorid , "VendorId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(marchid , "ArchId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(mimpid , "ImpId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(unaligned_access, "Unaligned" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(satp_mode , "SATP" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
#define RV_FEATURE_FLAGS(decl) \
decl(ext_I , "i" , ('I' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_M , "m" , ('M' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_A , "a" , ('A' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_F , "f" , ('F' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_D , "d" , ('D' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_C , "c" , ('C' - 'A'), true , UPDATE_DEFAULT(UseRVC)) \
decl(ext_Q , "q" , ('Q' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_H , "h" , ('H' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \
decl(ext_Zicbom , "Zicbom" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbom)) \
decl(ext_Zicboz , "Zicboz" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicboz)) \
decl(ext_Zicbop , "Zicbop" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbop)) \
decl(ext_Zba , "Zba" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZba)) \
decl(ext_Zbb , "Zbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbb)) \
decl(ext_Zbc , "Zbc" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zbs , "Zbs" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbs)) \
decl(ext_Zbkb , "Zbkb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbkb)) \
decl(ext_Zcb , "Zcb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZcb)) \
decl(ext_Zfa , "Zfa" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfa)) \
decl(ext_Zfh , "Zfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfh)) \
decl(ext_Zfhmin , "Zfhmin" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfhmin)) \
decl(ext_Zicsr , "Zicsr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zicntr , "Zicntr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zifencei , "Zifencei" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zic64b , "Zic64b" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZic64b)) \
decl(ext_Ztso , "Ztso" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZtso)) \
decl(ext_Zihintpause , "Zihintpause" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZihintpause)) \
decl(ext_Zacas , "Zacas" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZacas)) \
decl(ext_Zvbb , "Zvbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbb, ext_V)) \
decl(ext_Zvbc , "Zvbc" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbc, ext_V)) \
decl(ext_Zvfh , "Zvfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvfh, ext_V)) \
decl(ext_Zvkn , "Zvkn" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvkn, ext_V)) \
decl(ext_Zicond , "Zicond" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicond)) \
decl(mvendorid , "VendorId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(marchid , "ArchId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(mimpid , "ImpId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(satp_mode , "SATP" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(unaligned_scalar , "UnalignedScalar", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(unaligned_vector , "UnalignedVector", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(zicboz_block_size, "ZicbozBlockSize", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
#define DECLARE_RV_FEATURE(NAME, PRETTY, BIT, FSTRING, FLAGF) \
struct NAME##RVFeatureValue : public RVFeatureValue { \
@@ -273,12 +278,19 @@ class VM_Version : public Abstract_VM_Version {
static VM_MODE parse_satp_mode(const char* vm_mode);
// Values from riscv_hwprobe()
enum UNALIGNED_ACCESS : int {
MISALIGNED_UNKNOWN = 0,
MISALIGNED_EMULATED = 1,
MISALIGNED_SLOW = 2,
MISALIGNED_FAST = 3,
MISALIGNED_UNSUPPORTED = 4
enum UNALIGNED_SCALAR_ACCESS : int {
MISALIGNED_SCALAR_UNKNOWN = 0,
MISALIGNED_SCALAR_EMULATED = 1,
MISALIGNED_SCALAR_SLOW = 2,
MISALIGNED_SCALAR_FAST = 3,
MISALIGNED_SCALAR_UNSUPPORTED = 4
};
enum UNALIGNED_VECTOR_ACCESS : int {
MISALIGNED_VECTOR_UNKNOWN = 0,
MISALIGNED_VECTOR_SLOW = 2,
MISALIGNED_VECTOR_FAST = 3,
MISALIGNED_VECTOR_UNSUPPORTED = 4
};
// Null terminated list

View File

@@ -356,7 +356,7 @@ instruct g1CompareAndExchangeP(iRegP mem_ptr, rarg5RegP oldval, iRegP_N2P newval
__ z_lgr($res$$Register, $oldval$$Register); // previous content
__ z_csg($oldval$$Register, $newval$$Register, 0, $mem_ptr$$reg);
__ z_csg($res$$Register, $newval$$Register, 0, $mem_ptr$$reg);
write_barrier_post(masm, this,
$mem_ptr$$Register /* store_addr */,

View File

@@ -1398,11 +1398,7 @@ void Assembler::addl(Address dst, Register src) {
void Assembler::eaddl(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x01);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x01, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::addl(Register dst, int32_t imm32) {
@@ -1432,11 +1428,7 @@ void Assembler::addl(Register dst, Register src) {
}
void Assembler::eaddl(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void)emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_arith(0x03, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x03, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::addr_nop_4() {
@@ -1657,17 +1649,18 @@ void Assembler::eandl(Register dst, Register src1, Address src2, bool no_flags)
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x23, no_flags);
}
void Assembler::eandl(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x21, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::andl(Register dst, Register src) {
(void) prefix_and_encode(dst->encoding(), src->encoding());
emit_arith(0x23, 0xC0, dst, src);
}
void Assembler::eandl(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_arith(0x23, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x23, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::andnl(Register dst, Register src1, Register src2) {
@@ -2519,7 +2512,7 @@ void Assembler::imull(Register dst, Register src) {
}
void Assembler::eimull(Register dst, Register src1, Register src2, bool no_flags) {
emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */);
emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */, true /* is_commutative */);
}
void Assembler::imull(Register dst, Address src, int32_t value) {
@@ -4419,11 +4412,7 @@ void Assembler::enotl(Register dst, Register src) {
}
void Assembler::eorw(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_arith(0x0B, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_66, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_16bit, 0x0B, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::orl(Address dst, int32_t imm32) {
@@ -4467,11 +4456,7 @@ void Assembler::orl(Register dst, Register src) {
}
void Assembler::eorl(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_arith(0x0B, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x0B, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::orl(Address dst, Register src) {
@@ -4483,11 +4468,7 @@ void Assembler::orl(Address dst, Register src) {
void Assembler::eorl(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x09);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x09, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::orb(Address dst, int imm8) {
@@ -4517,11 +4498,7 @@ void Assembler::orb(Address dst, Register src) {
void Assembler::eorb(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_8bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x08);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_8bit, 0x08, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::packsswb(XMMRegister dst, XMMRegister src) {
@@ -7323,11 +7300,7 @@ void Assembler::xorl(Register dst, Register src) {
}
void Assembler::exorl(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_arith(0x33, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x33, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::xorl(Address dst, Register src) {
@@ -7339,11 +7312,7 @@ void Assembler::xorl(Address dst, Register src) {
void Assembler::exorl(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x31);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x31, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::xorb(Register dst, Address src) {
@@ -7367,11 +7336,7 @@ void Assembler::xorb(Address dst, Register src) {
void Assembler::exorb(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_8bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x30);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_8bit, 0x30, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::xorw(Register dst, Address src) {
@@ -12891,6 +12856,31 @@ void Assembler::eevex_prefix_ndd(Address adr, int ndd_enc, int xreg_enc, VexSimd
vex_prefix(adr, ndd_enc, xreg_enc, pre, opc, attributes, /* nds_is_ndd */ true, no_flags);
}
void Assembler::emit_eevex_or_demote(Register dst, Address src1, Register src2, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags, bool is_map1, bool is_commutative) {
if (is_commutative && is_demotable(no_flags, dst->encoding(), src2->encoding())) {
// Opcode byte adjustment due to mismatch between NDD and equivalent demotable variant
opcode_byte += 2;
if (size == EVEX_64bit) {
emit_prefix_and_int8(get_prefixq(src1, dst, is_map1), opcode_byte);
} else {
// For 32-bit, 16-bit and 8-bit
if (size == EVEX_16bit) {
emit_int8(0x66);
}
prefix(src1, dst, false, is_map1);
emit_int8(opcode_byte);
}
} else {
bool vex_w = (size == EVEX_64bit) ? true : false;
InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, size);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), pre, opc, &attributes, no_flags);
emit_int8(opcode_byte);
}
emit_operand(src2, src1, 0);
}
void Assembler::emit_eevex_or_demote(Register dst, Register src1, Address src2, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags, bool is_map1) {
if (is_demotable(no_flags, dst->encoding(), src1->encoding())) {
@@ -12991,18 +12981,20 @@ void Assembler::emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, int8
}
void Assembler::emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags, bool is_map1, bool swap) {
int size, int opcode_byte, bool no_flags, bool is_map1, bool swap, bool is_commutative) {
int encode;
bool is_prefixq = (size == EVEX_64bit) ? true : false;
if (is_demotable(no_flags, dst_enc, nds_enc)) {
bool first_operand_demotable = is_demotable(no_flags, dst_enc, nds_enc);
bool second_operand_demotable = is_commutative && is_demotable(no_flags, dst_enc, src_enc);
if (first_operand_demotable || second_operand_demotable) {
if (size == EVEX_16bit) {
emit_int8(0x66);
}
int src = first_operand_demotable ? src_enc : nds_enc;
if (swap) {
encode = is_prefixq ? prefixq_and_encode(dst_enc, src_enc, is_map1) : prefix_and_encode(dst_enc, src_enc, is_map1);
encode = is_prefixq ? prefixq_and_encode(dst_enc, src, is_map1) : prefix_and_encode(dst_enc, src, is_map1);
} else {
encode = is_prefixq ? prefixq_and_encode(src_enc, dst_enc, is_map1) : prefix_and_encode(src_enc, dst_enc, is_map1);
encode = is_prefixq ? prefixq_and_encode(src, dst_enc, is_map1) : prefix_and_encode(src, dst_enc, is_map1);
}
emit_opcode_prefix_and_encoding((unsigned char)opcode_byte, 0xC0, encode);
} else {
@@ -13050,6 +13042,26 @@ int Assembler::eevex_prefix_and_encode_nf(int dst_enc, int nds_enc, int src_enc,
return vex_prefix_and_encode(dst_enc, nds_enc, src_enc, pre, opc, attributes, /* src_is_gpr */ true, /* nds_is_ndd */ false, no_flags);
}
void Assembler::emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register src1, Register src2, VexSimdPrefix pre, VexOpcode opc,
int size, int op1, int op2, bool no_flags, bool is_commutative) {
bool demotable = is_demotable(no_flags, dst->encoding(), src1->encoding());
if (!demotable && is_commutative) {
if (is_demotable(no_flags, dst->encoding(), src2->encoding())) {
// swap src1 and src2
Register tmp = src1;
src1 = src2;
src2 = tmp;
}
}
bool vex_w = (size == EVEX_64bit) ? true : false;
bool use_prefixq = vex_w;
InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void)emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), pre, opc, &attributes, no_flags, use_prefixq);
emit_arith(op1, op2, src1, src2);
}
void Assembler::emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register nds, int32_t imm32, VexSimdPrefix pre, VexOpcode opc,
int size, int op1, int op2, bool no_flags) {
int dst_enc = dst->encoding();
@@ -13060,7 +13072,6 @@ void Assembler::emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register nds
} else {
bool vex_w = (size == EVEX_64bit) ? true : false;
InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
//attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, size);
attributes.set_is_evex_instruction();
vex_prefix_and_encode(0, dst_enc, nds_enc, pre, opc, &attributes, /* src_is_gpr */ true, /* nds_is_ndd */ true, no_flags);
@@ -13689,7 +13700,7 @@ void Assembler::pdepq(Register dst, Register src1, Address src2) {
void Assembler::sarxl(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13697,7 +13708,7 @@ void Assembler::sarxl(Register dst, Register src1, Register src2) {
void Assembler::sarxl(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -13706,7 +13717,7 @@ void Assembler::sarxl(Register dst, Address src1, Register src2) {
void Assembler::sarxq(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13714,7 +13725,7 @@ void Assembler::sarxq(Register dst, Register src1, Register src2) {
void Assembler::sarxq(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -13723,7 +13734,7 @@ void Assembler::sarxq(Register dst, Address src1, Register src2) {
void Assembler::shlxl(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13731,7 +13742,7 @@ void Assembler::shlxl(Register dst, Register src1, Register src2) {
void Assembler::shlxl(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -13740,7 +13751,7 @@ void Assembler::shlxl(Register dst, Address src1, Register src2) {
void Assembler::shlxq(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13748,7 +13759,7 @@ void Assembler::shlxq(Register dst, Register src1, Register src2) {
void Assembler::shlxq(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -13757,7 +13768,7 @@ void Assembler::shlxq(Register dst, Address src1, Register src2) {
void Assembler::shrxl(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13765,7 +13776,7 @@ void Assembler::shrxl(Register dst, Register src1, Register src2) {
void Assembler::shrxl(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -13774,7 +13785,7 @@ void Assembler::shrxl(Register dst, Address src1, Register src2) {
void Assembler::shrxq(Register dst, Register src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes, true);
emit_int16((unsigned char)0xF7, (0xC0 | encode));
}
@@ -13782,7 +13793,7 @@ void Assembler::shrxq(Register dst, Register src1, Register src2) {
void Assembler::shrxq(Register dst, Address src1, Register src2) {
assert(VM_Version::supports_bmi2(), "");
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0xF7);
@@ -14543,11 +14554,7 @@ void Assembler::addq(Address dst, Register src) {
void Assembler::eaddq(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x01);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x01, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::addq(Register dst, int32_t imm32) {
@@ -14576,11 +14583,7 @@ void Assembler::addq(Register dst, Register src) {
}
void Assembler::eaddq(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */);
emit_arith(0x03, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x03, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::adcxq(Register dst, Register src) {
@@ -14673,11 +14676,7 @@ void Assembler::andq(Register dst, Register src) {
}
void Assembler::eandq(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */);
emit_arith(0x23, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x23, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::andq(Address dst, Register src) {
@@ -14688,11 +14687,7 @@ void Assembler::andq(Address dst, Register src) {
void Assembler::eandq(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x21);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x21, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::andnq(Register dst, Register src1, Register src2) {
@@ -15038,7 +15033,7 @@ void Assembler::eimulq(Register dst, Register src, bool no_flags) {
}
void Assembler::eimulq(Register dst, Register src1, Register src2, bool no_flags) {
emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */);
emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */, true /* is_commutative */);
}
void Assembler::imulq(Register src) {
@@ -15500,11 +15495,7 @@ void Assembler::orq(Address dst, Register src) {
void Assembler::eorq(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x09);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x09, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void Assembler::orq(Register dst, int32_t imm32) {
@@ -15544,13 +15535,8 @@ void Assembler::orq(Register dst, Register src) {
}
void Assembler::eorq(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */);
emit_arith(0x0B, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x0B, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::popcntq(Register dst, Address src) {
assert(VM_Version::supports_popcnt(), "must support");
InstructionMark im(this);
@@ -15681,6 +15667,8 @@ void Assembler::pusha_uncached() { // 64bit
// Push pair of original stack pointer along with remaining registers
// at 16B aligned boundary.
push2p(rax, r31);
// Restore the original contents of RAX register.
movq(rax, Address(rax));
push2p(r30, r29);
push2p(r28, r27);
push2p(r26, r25);
@@ -16290,11 +16278,7 @@ void Assembler::xorq(Register dst, Register src) {
}
void Assembler::exorq(Register dst, Register src1, Register src2, bool no_flags) {
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
// NDD shares its encoding bits with NDS bits for regular EVEX instruction.
// Therefore, DST is passed as the second argument to minimize changes in the leaf level routine.
(void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */);
emit_arith(0x33, 0xC0, src1, src2);
emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x33, 0xC0, no_flags, true /* is_commutative */);
}
void Assembler::xorq(Register dst, Address src) {
@@ -16348,11 +16332,7 @@ void Assembler::esetzucc(Condition cc, Register dst) {
void Assembler::exorq(Register dst, Address src1, Register src2, bool no_flags) {
InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags);
emit_int8(0x31);
emit_operand(src2, src1, 0);
emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x31, no_flags, false /* is_map1 */, true /* is_commutative */);
}
void InstructionAttr::set_address_attributes(int tuple_type, int input_size_in_bits) {

View File

@@ -796,14 +796,20 @@ private:
int emit_eevex_prefix_or_demote_ndd(int dst_enc, int nds_enc, VexSimdPrefix pre, VexOpcode opc,
InstructionAttr *attributes, bool no_flags = false, bool use_prefixq = false);
void emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register src1, Register src2, VexSimdPrefix pre, VexOpcode opc,
int size, int op1, int op2, bool no_flags = false, bool is_commutative = false);
void emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register nds, int32_t imm32, VexSimdPrefix pre, VexOpcode opc,
int size, int op1, int op2, bool no_flags);
void emit_eevex_or_demote(Register dst, Register src1, Address src2, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags = false, bool is_map1 = false);
void emit_eevex_or_demote(Register dst, Address src1, Register src2, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags = false, bool is_map1 = false, bool is_commutative = false);
void emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags, bool is_map1 = false, bool swap = false);
int size, int opcode_byte, bool no_flags, bool is_map1 = false, bool swap = false, bool is_commutative = false);
void emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, int8_t imm8, VexSimdPrefix pre, VexOpcode opc,
int size, int opcode_byte, bool no_flags, bool is_map1 = false);
@@ -1138,6 +1144,7 @@ private:
void eandl(Register dst, Register src, int32_t imm32, bool no_flags);
void andl(Register dst, Address src);
void eandl(Register dst, Register src1, Address src2, bool no_flags);
void eandl(Register dst, Address src1, Register src2, bool no_flags);
void andl(Register dst, Register src);
void eandl(Register dst, Register src1, Register src2, bool no_flags);
void andl(Address dst, Register src);

View File

@@ -4655,6 +4655,7 @@ static void convertF2I_slowpath(C2_MacroAssembler& masm, C2GeneralStub<Register,
__ subptr(rsp, 8);
__ movdbl(Address(rsp), src);
__ call(RuntimeAddress(target));
// APX REX2 encoding for pop(dst) increases the stub size by 1 byte.
__ pop(dst);
__ jmp(stub.continuation());
#undef __
@@ -4687,7 +4688,9 @@ void C2_MacroAssembler::convertF2I(BasicType dst_bt, BasicType src_bt, Register
}
}
auto stub = C2CodeStub::make<Register, XMMRegister, address>(dst, src, slowpath_target, 23, convertF2I_slowpath);
// Using the APX extended general purpose registers increases the instruction encoding size by 1 byte.
int max_size = 23 + (UseAPX ? 1 : 0);
auto stub = C2CodeStub::make<Register, XMMRegister, address>(dst, src, slowpath_target, max_size, convertF2I_slowpath);
jcc(Assembler::equal, stub->entry());
bind(stub->continuation());
}

View File

@@ -353,7 +353,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
// The rest is saved with the optimized path
uint num_saved_regs = 4 + (dst != rax ? 1 : 0) + 4;
uint num_saved_regs = 4 + (dst != rax ? 1 : 0) + 4 + (UseAPX ? 16 : 0);
__ subptr(rsp, num_saved_regs * wordSize);
uint slot = num_saved_regs;
if (dst != rax) {
@@ -367,6 +367,25 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
__ movptr(Address(rsp, (--slot) * wordSize), r9);
__ movptr(Address(rsp, (--slot) * wordSize), r10);
__ movptr(Address(rsp, (--slot) * wordSize), r11);
// Save APX extended registers r16r31 if enabled
if (UseAPX) {
__ movptr(Address(rsp, (--slot) * wordSize), r16);
__ movptr(Address(rsp, (--slot) * wordSize), r17);
__ movptr(Address(rsp, (--slot) * wordSize), r18);
__ movptr(Address(rsp, (--slot) * wordSize), r19);
__ movptr(Address(rsp, (--slot) * wordSize), r20);
__ movptr(Address(rsp, (--slot) * wordSize), r21);
__ movptr(Address(rsp, (--slot) * wordSize), r22);
__ movptr(Address(rsp, (--slot) * wordSize), r23);
__ movptr(Address(rsp, (--slot) * wordSize), r24);
__ movptr(Address(rsp, (--slot) * wordSize), r25);
__ movptr(Address(rsp, (--slot) * wordSize), r26);
__ movptr(Address(rsp, (--slot) * wordSize), r27);
__ movptr(Address(rsp, (--slot) * wordSize), r28);
__ movptr(Address(rsp, (--slot) * wordSize), r29);
__ movptr(Address(rsp, (--slot) * wordSize), r30);
__ movptr(Address(rsp, (--slot) * wordSize), r31);
}
// r12-r15 are callee saved in all calling conventions
assert(slot == 0, "must use all slots");
@@ -398,6 +417,25 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom), arg0, arg1);
}
// Restore APX extended registers r31r16 if previously saved
if (UseAPX) {
__ movptr(r31, Address(rsp, (slot++) * wordSize));
__ movptr(r30, Address(rsp, (slot++) * wordSize));
__ movptr(r29, Address(rsp, (slot++) * wordSize));
__ movptr(r28, Address(rsp, (slot++) * wordSize));
__ movptr(r27, Address(rsp, (slot++) * wordSize));
__ movptr(r26, Address(rsp, (slot++) * wordSize));
__ movptr(r25, Address(rsp, (slot++) * wordSize));
__ movptr(r24, Address(rsp, (slot++) * wordSize));
__ movptr(r23, Address(rsp, (slot++) * wordSize));
__ movptr(r22, Address(rsp, (slot++) * wordSize));
__ movptr(r21, Address(rsp, (slot++) * wordSize));
__ movptr(r20, Address(rsp, (slot++) * wordSize));
__ movptr(r19, Address(rsp, (slot++) * wordSize));
__ movptr(r18, Address(rsp, (slot++) * wordSize));
__ movptr(r17, Address(rsp, (slot++) * wordSize));
__ movptr(r16, Address(rsp, (slot++) * wordSize));
}
__ movptr(r11, Address(rsp, (slot++) * wordSize));
__ movptr(r10, Address(rsp, (slot++) * wordSize));
__ movptr(r9, Address(rsp, (slot++) * wordSize));

View File

@@ -137,7 +137,7 @@ void MethodHandles::verify_method(MacroAssembler* _masm, Register method, Regist
case vmIntrinsicID::_invokeBasic:
// Require compiled LambdaForm class to be fully initialized.
__ cmpb(Address(method_holder, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized);
__ jccb(Assembler::equal, L_ok);
__ jcc(Assembler::equal, L_ok);
break;
case vmIntrinsicID::_linkToStatic:
@@ -154,7 +154,7 @@ void MethodHandles::verify_method(MacroAssembler* _masm, Register method, Regist
// init_state check failed, but it may be an abstract interface method
__ load_unsigned_short(temp, Address(method, Method::access_flags_offset()));
__ testl(temp, JVM_ACC_ABSTRACT);
__ jccb(Assembler::notZero, L_ok);
__ jcc(Assembler::notZero, L_ok);
break;
default:

View File

@@ -30,7 +30,7 @@
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(initial, 20000 WINDOWS_ONLY(+1000)) \
do_arch_blob(initial, PRODUCT_ONLY(20000) NOT_PRODUCT(21000) WINDOWS_ONLY(+1000)) \
do_stub(initial, verify_mxcsr) \
do_arch_entry(x86, initial, verify_mxcsr, verify_mxcsr_entry, \
verify_mxcsr_entry) \
@@ -239,7 +239,7 @@
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(final, 31000 \
do_arch_blob(final, 33000 \
WINDOWS_ONLY(+22000) ZGC_ONLY(+20000)) \
#endif // CPU_X86_STUBDECLARATIONS_HPP

View File

@@ -393,6 +393,8 @@ class StubGenerator: public StubCodeGenerator {
XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, XMMRegister xmm8);
void ghash_last_8_avx2(Register subkeyHtbl);
void check_key_offset(Register key, int offset, int load_size);
// Load key and shuffle operation
void ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask);
void ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch);

View File

@@ -1759,25 +1759,43 @@ void StubGenerator::roundDeclast(XMMRegister xmm_reg) {
__ vaesdeclast(xmm8, xmm8, xmm_reg, Assembler::AVX_512bit);
}
// Check incoming byte offset against the int[] len. key is the pointer to the int[0].
// This check happens often, so it is important for it to be very compact.
void StubGenerator::check_key_offset(Register key, int offset, int load_size) {
#ifdef ASSERT
Address key_length(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT));
assert((offset + load_size) % 4 == 0, "Alignment is good: %d + %d", offset, load_size);
int end_offset = (offset + load_size) / 4;
Label L_good;
__ cmpl(key_length, end_offset);
__ jccb(Assembler::greaterEqual, L_good);
__ hlt();
__ bind(L_good);
#endif
}
// Utility routine for loading a 128-bit key word in little endian format
void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) {
check_key_offset(key, offset, 16);
__ movdqu(xmmdst, Address(key, offset));
__ pshufb(xmmdst, xmm_shuf_mask);
}
void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) {
check_key_offset(key, offset, 16);
__ movdqu(xmmdst, Address(key, offset));
__ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch);
}
void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) {
check_key_offset(key, offset, 16);
__ movdqu(xmmdst, Address(key, offset));
__ pshufb(xmmdst, xmm_shuf_mask);
__ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit);
}
void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) {
check_key_offset(key, offset, 16);
__ movdqu(xmmdst, Address(key, offset));
__ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch);
__ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit);
@@ -3205,12 +3223,12 @@ void StubGenerator::ghash16_encrypt_parallel16_avx512(Register in, Register out,
//AES round 9
roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15);
ev_load_key(AESKEY2, key, 11 * 16, rbx);
//AES rounds up to 11 (AES192) or 13 (AES256)
//AES128 is done
__ cmpl(NROUNDS, 52);
__ jcc(Assembler::less, last_aes_rnd);
__ bind(aes_192);
ev_load_key(AESKEY2, key, 11 * 16, rbx);
roundEncode(AESKEY1, B00_03, B04_07, B08_11, B12_15);
ev_load_key(AESKEY1, key, 12 * 16, rbx);
roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15);

View File

@@ -46,6 +46,12 @@
//
/******************************************************************************/
/* Represents 0x7FFFFFFFFFFFFFFF double precision in lower 64 bits*/
ATTRIBUTE_ALIGNED(16) static const juint _ABS_MASK[] =
{
4294967295, 2147483647, 0, 0
};
ATTRIBUTE_ALIGNED(4) static const juint _SIG_MASK[] =
{
0, 1032192
@@ -188,10 +194,10 @@ address StubGenerator::generate_libmCbrt() {
StubCodeMark mark(this, stub_id);
address start = __ pc();
Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1;
Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1;
Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1;
Label B1_1, B1_2, B1_4;
address ABS_MASK = (address)_ABS_MASK;
address SIG_MASK = (address)_SIG_MASK;
address EXP_MASK = (address)_EXP_MASK;
address EXP_MSK2 = (address)_EXP_MSK2;
@@ -208,8 +214,12 @@ address StubGenerator::generate_libmCbrt() {
__ enter(); // required for proper stackwalking of RuntimeStub frame
__ bind(B1_1);
__ subq(rsp, 24);
__ movsd(Address(rsp), xmm0);
__ ucomisd(xmm0, ExternalAddress(ZERON), r11 /*rscratch*/);
__ jcc(Assembler::equal, L_2TAG_PACKET_1_0_1); // Branch only if x is +/- zero or NaN
__ movq(xmm1, xmm0);
__ andpd(xmm1, ExternalAddress(ABS_MASK), r11 /*rscratch*/);
__ ucomisd(xmm1, ExternalAddress(INF), r11 /*rscratch*/);
__ jcc(Assembler::equal, B1_4); // Branch only if x is +/- INF
__ bind(B1_2);
__ movq(xmm7, xmm0);
@@ -228,8 +238,6 @@ address StubGenerator::generate_libmCbrt() {
__ andl(rdx, rax);
__ cmpl(rdx, 0);
__ jcc(Assembler::equal, L_2TAG_PACKET_0_0_1); // Branch only if |x| is denormalized
__ cmpl(rdx, 524032);
__ jcc(Assembler::equal, L_2TAG_PACKET_1_0_1); // Branch only if |x| is INF or NaN
__ shrl(rdx, 8);
__ shrq(r9, 8);
__ andpd(xmm2, xmm0);
@@ -297,8 +305,6 @@ address StubGenerator::generate_libmCbrt() {
__ andl(rdx, rax);
__ shrl(rdx, 8);
__ shrq(r9, 8);
__ cmpl(rdx, 0);
__ jcc(Assembler::equal, L_2TAG_PACKET_3_0_1); // Branch only if |x| is zero
__ andpd(xmm2, xmm0);
__ andpd(xmm0, xmm5);
__ orpd(xmm3, xmm2);
@@ -322,41 +328,10 @@ address StubGenerator::generate_libmCbrt() {
__ psllq(xmm7, 52);
__ jmp(L_2TAG_PACKET_2_0_1);
__ bind(L_2TAG_PACKET_3_0_1);
__ cmpq(r9, 0);
__ jcc(Assembler::notEqual, L_2TAG_PACKET_4_0_1); // Branch only if x is negative zero
__ xorpd(xmm0, xmm0);
__ jmp(B1_4);
__ bind(L_2TAG_PACKET_4_0_1);
__ movsd(xmm0, ExternalAddress(ZERON), r11 /*rscratch*/);
__ jmp(B1_4);
__ bind(L_2TAG_PACKET_1_0_1);
__ movl(rax, Address(rsp, 4));
__ movl(rdx, Address(rsp));
__ movl(rcx, rax);
__ andl(rcx, 2147483647);
__ cmpl(rcx, 2146435072);
__ jcc(Assembler::above, L_2TAG_PACKET_5_0_1); // Branch only if |x| is NaN
__ cmpl(rdx, 0);
__ jcc(Assembler::notEqual, L_2TAG_PACKET_5_0_1); // Branch only if |x| is NaN
__ cmpl(rax, 2146435072);
__ jcc(Assembler::notEqual, L_2TAG_PACKET_6_0_1); // Branch only if x is negative INF
__ movsd(xmm0, ExternalAddress(INF), r11 /*rscratch*/);
__ jmp(B1_4);
__ bind(L_2TAG_PACKET_6_0_1);
__ movsd(xmm0, ExternalAddress(NEG_INF), r11 /*rscratch*/);
__ jmp(B1_4);
__ bind(L_2TAG_PACKET_5_0_1);
__ movsd(xmm0, Address(rsp));
__ addsd(xmm0, xmm0);
__ movq(Address(rsp, 8), xmm0);
__ bind(B1_4);
__ addq(rsp, 24);
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2024, Intel Corporation. All rights reserved.
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2021, Tencent. All rights reserved.
* Intel Math Library (LIBM) Source Code
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2024, Intel Corporation. All rights reserved.
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2021, Tencent. All rights reserved.
* Intel Math Library (LIBM) Source Code
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2024, Intel Corporation. All rights reserved.
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* Copyright (C) 2021, Tencent. All rights reserved.
* Intel Math Library (LIBM) Source Code
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -465,13 +465,19 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
__ call_VM_leaf0(CAST_FROM_FN_PTR(address, SharedRuntime::dtan));
}
} else if (kind == Interpreter::java_lang_math_tanh) {
assert(StubRoutines::dtanh() != nullptr, "not initialized");
if (StubRoutines::dtanh() != nullptr) {
__ movdbl(xmm0, Address(rsp, wordSize));
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dtanh())));
} else {
return nullptr; // Fallback to default implementation
}
} else if (kind == Interpreter::java_lang_math_cbrt) {
assert(StubRoutines::dcbrt() != nullptr, "not initialized");
__ movdbl(xmm0, Address(rsp, wordSize));
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcbrt())));
if (StubRoutines::dcbrt() != nullptr) {
__ movdbl(xmm0, Address(rsp, wordSize));
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcbrt())));
} else {
return nullptr; // Fallback to default implementation
}
} else if (kind == Interpreter::java_lang_math_abs) {
assert(StubRoutines::x86::double_sign_mask() != nullptr, "not initialized");
__ movdbl(xmm0, Address(rsp, wordSize));

View File

@@ -138,7 +138,7 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
const uint32_t CPU_FAMILY_486 = (4 << CPU_FAMILY_SHIFT);
bool use_evex = FLAG_IS_DEFAULT(UseAVX) || (UseAVX > 2);
Label detect_486, cpu486, detect_586, std_cpuid1, std_cpuid4, std_cpuid24;
Label detect_486, cpu486, detect_586, std_cpuid1, std_cpuid4, std_cpuid24, std_cpuid29;
Label sef_cpuid, sefsl1_cpuid, ext_cpuid, ext_cpuid1, ext_cpuid5, ext_cpuid7;
Label ext_cpuid8, done, wrapup, vector_save_restore, apx_save_restore_warning;
Label legacy_setup, save_restore_except, legacy_save_restore, start_simd_check;
@@ -337,6 +337,16 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
__ movl(Address(rsi, 0), rax);
__ movl(Address(rsi, 4), rdx);
//
// cpuid(0x29) APX NCI NDD NF (EAX = 29H, ECX = 0).
//
__ bind(std_cpuid29);
__ movl(rax, 0x29);
__ movl(rcx, 0);
__ cpuid();
__ lea(rsi, Address(rbp, in_bytes(VM_Version::std_cpuid29_offset())));
__ movl(Address(rsi, 0), rbx);
//
// cpuid(0x24) Converged Vector ISA Main Leaf (EAX = 24H, ECX = 0).
//
@@ -440,7 +450,6 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
__ andl(rax, Address(rbp, in_bytes(VM_Version::xem_xcr0_offset()))); // xcr0 bits apx_f
__ jcc(Assembler::equal, vector_save_restore);
#ifndef PRODUCT
bool save_apx = UseAPX;
VM_Version::set_apx_cpuFeatures();
UseAPX = true;
@@ -457,7 +466,6 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
__ movq(Address(rsi, 8), r31);
UseAPX = save_apx;
#endif
__ bind(vector_save_restore);
//
// Check if OS has enabled XGETBV instruction to access XCR0
@@ -1017,18 +1025,6 @@ void VM_Version::get_processor_features() {
_features.clear_feature(CPU_AVX10_2);
}
// Currently APX support is only enabled for targets supporting AVX512VL feature.
bool apx_supported = os_supports_apx_egprs() && supports_apx_f() && supports_avx512vl();
if (UseAPX && !apx_supported) {
warning("UseAPX is not supported on this CPU, setting it to false");
FLAG_SET_DEFAULT(UseAPX, false);
} else if (FLAG_IS_DEFAULT(UseAPX)) {
FLAG_SET_DEFAULT(UseAPX, apx_supported ? true : false);
}
if (!UseAPX) {
_features.clear_feature(CPU_APX_F);
}
if (UseAVX < 2) {
_features.clear_feature(CPU_AVX2);
@@ -1052,6 +1048,7 @@ void VM_Version::get_processor_features() {
_features.clear_feature(CPU_VZEROUPPER);
_features.clear_feature(CPU_AVX512BW);
_features.clear_feature(CPU_AVX512VL);
_features.clear_feature(CPU_APX_F);
_features.clear_feature(CPU_AVX512DQ);
_features.clear_feature(CPU_AVX512_VNNI);
_features.clear_feature(CPU_AVX512_VAES);
@@ -1071,8 +1068,20 @@ void VM_Version::get_processor_features() {
}
}
// Currently APX support is only enabled for targets supporting AVX512VL feature.
bool apx_supported = os_supports_apx_egprs() && supports_apx_f() && supports_avx512vl();
if (UseAPX && !apx_supported) {
warning("UseAPX is not supported on this CPU, setting it to false");
FLAG_SET_DEFAULT(UseAPX, false);
}
if (!UseAPX) {
_features.clear_feature(CPU_APX_F);
}
if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) {
_has_intel_jcc_erratum = compute_has_intel_jcc_erratum();
FLAG_SET_ERGO(IntelJccErratumMitigation, _has_intel_jcc_erratum);
} else {
_has_intel_jcc_erratum = IntelJccErratumMitigation;
}
@@ -2111,7 +2120,7 @@ bool VM_Version::is_intel_cascade_lake() {
// has improved implementation of 64-byte load/stores and so the default
// threshold is set to 0 for these platforms.
int VM_Version::avx3_threshold() {
return (is_intel_family_core() &&
return (is_intel_server_family() &&
supports_serialize() &&
FLAG_IS_DEFAULT(AVX3Threshold)) ? 0 : AVX3Threshold;
}
@@ -2936,7 +2945,8 @@ VM_Version::VM_Features VM_Version::CpuidInfo::feature_flags() const {
if (std_cpuid1_ecx.bits.popcnt != 0)
vm_features.set_feature(CPU_POPCNT);
if (sefsl1_cpuid7_edx.bits.apx_f != 0 &&
xem_xcr0_eax.bits.apx_f != 0) {
xem_xcr0_eax.bits.apx_f != 0 &&
std_cpuid29_ebx.bits.apx_nci_ndd_nf != 0) {
vm_features.set_feature(CPU_APX_F);
}
if (std_cpuid1_ecx.bits.avx != 0 &&
@@ -3151,17 +3161,11 @@ bool VM_Version::os_supports_apx_egprs() {
if (!supports_apx_f()) {
return false;
}
// Enable APX support for product builds after
// completion of planned features listed in JDK-8329030.
#if !defined(PRODUCT)
if (_cpuid_info.apx_save[0] != egpr_test_value() ||
_cpuid_info.apx_save[1] != egpr_test_value()) {
return false;
}
return true;
#else
return false;
#endif
}
uint VM_Version::cores_per_cpu() {

View File

@@ -303,6 +303,14 @@ class VM_Version : public Abstract_VM_Version {
} bits;
};
union StdCpuidEax29Ecx0 {
uint32_t value;
struct {
uint32_t apx_nci_ndd_nf : 1,
: 31;
} bits;
};
union StdCpuid24MainLeafEax {
uint32_t value;
struct {
@@ -587,6 +595,10 @@ protected:
StdCpuid24MainLeafEax std_cpuid24_eax;
StdCpuid24MainLeafEbx std_cpuid24_ebx;
// cpuid function 0x29 APX Advanced Performance Extensions Leaf
// eax = 0x29, ecx = 0
StdCpuidEax29Ecx0 std_cpuid29_ebx;
// cpuid function 0xB (processor topology)
// ecx = 0
uint32_t tpl_cpuidB0_eax;
@@ -707,6 +719,7 @@ public:
static ByteSize std_cpuid0_offset() { return byte_offset_of(CpuidInfo, std_max_function); }
static ByteSize std_cpuid1_offset() { return byte_offset_of(CpuidInfo, std_cpuid1_eax); }
static ByteSize std_cpuid24_offset() { return byte_offset_of(CpuidInfo, std_cpuid24_eax); }
static ByteSize std_cpuid29_offset() { return byte_offset_of(CpuidInfo, std_cpuid29_ebx); }
static ByteSize dcp_cpuid4_offset() { return byte_offset_of(CpuidInfo, dcp_cpuid4_eax); }
static ByteSize sef_cpuid7_offset() { return byte_offset_of(CpuidInfo, sef_cpuid7_eax); }
static ByteSize sefsl1_cpuid7_offset() { return byte_offset_of(CpuidInfo, sefsl1_cpuid7_eax); }
@@ -756,7 +769,9 @@ public:
_features.set_feature(CPU_SSE2);
_features.set_feature(CPU_VZEROUPPER);
}
static void set_apx_cpuFeatures() { _features.set_feature(CPU_APX_F); }
static void set_apx_cpuFeatures() {
_features.set_feature(CPU_APX_F);
}
static void set_bmi_cpuFeatures() {
_features.set_feature(CPU_BMI1);
_features.set_feature(CPU_BMI2);

View File

@@ -10527,7 +10527,8 @@ instruct xorI_rReg_im1_ndd(rRegI dst, rRegI src, immI_M1 imm)
// Xor Register with Immediate
instruct xorI_rReg_imm(rRegI dst, immI src, rFlagsReg cr)
%{
predicate(!UseAPX);
// Strict predicate check to make selection of xorI_rReg_im1 cost agnostic if immI src is -1.
predicate(!UseAPX && n->in(2)->bottom_type()->is_int()->get_con() != -1);
match(Set dst (XorI dst src));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
@@ -10541,7 +10542,8 @@ instruct xorI_rReg_imm(rRegI dst, immI src, rFlagsReg cr)
instruct xorI_rReg_rReg_imm_ndd(rRegI dst, rRegI src1, immI src2, rFlagsReg cr)
%{
predicate(UseAPX);
// Strict predicate check to make selection of xorI_rReg_im1_ndd cost agnostic if immI src2 is -1.
predicate(UseAPX && n->in(2)->bottom_type()->is_int()->get_con() != -1);
match(Set dst (XorI src1 src2));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
@@ -10559,6 +10561,7 @@ instruct xorI_rReg_mem_imm_ndd(rRegI dst, memory src1, immI src2, rFlagsReg cr)
predicate(UseAPX);
match(Set dst (XorI (LoadI src1) src2));
effect(KILL cr);
ins_cost(150);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
format %{ "exorl $dst, $src1, $src2\t# int ndd" %}
@@ -11201,7 +11204,8 @@ instruct xorL_rReg_im1_ndd(rRegL dst,rRegL src, immL_M1 imm)
// Xor Register with Immediate
instruct xorL_rReg_imm(rRegL dst, immL32 src, rFlagsReg cr)
%{
predicate(!UseAPX);
// Strict predicate check to make selection of xorL_rReg_im1 cost agnostic if immL32 src is -1.
predicate(!UseAPX && n->in(2)->bottom_type()->is_long()->get_con() != -1L);
match(Set dst (XorL dst src));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
@@ -11215,7 +11219,8 @@ instruct xorL_rReg_imm(rRegL dst, immL32 src, rFlagsReg cr)
instruct xorL_rReg_rReg_imm(rRegL dst, rRegL src1, immL32 src2, rFlagsReg cr)
%{
predicate(UseAPX);
// Strict predicate check to make selection of xorL_rReg_im1_ndd cost agnostic if immL32 src2 is -1.
predicate(UseAPX && n->in(2)->bottom_type()->is_long()->get_con() != -1L);
match(Set dst (XorL src1 src2));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
@@ -11234,6 +11239,7 @@ instruct xorL_rReg_mem_imm(rRegL dst, memory src1, immL32 src2, rFlagsReg cr)
match(Set dst (XorL (LoadL src1) src2));
effect(KILL cr);
flag(PD::Flag_sets_sign_flag, PD::Flag_sets_zero_flag, PD::Flag_sets_parity_flag, PD::Flag_clears_overflow_flag, PD::Flag_clears_carry_flag);
ins_cost(150);
format %{ "exorq $dst, $src1, $src2\t# long ndd" %}
ins_encode %{

View File

@@ -2504,7 +2504,7 @@ static bool thread_cpu_time_unchecked(Thread* thread, jlong* p_sys_time, jlong*
dummy, &dummy_size) == 0) {
tid = pinfo.__pi_tid;
} else {
tty->print_cr("pthread_getthrds_np failed.");
tty->print_cr("pthread_getthrds_np failed, errno: %d.", errno);
error = true;
}
@@ -2515,7 +2515,7 @@ static bool thread_cpu_time_unchecked(Thread* thread, jlong* p_sys_time, jlong*
sys_time = thrdentry.ti_ru.ru_stime.tv_sec * 1000000000LL + thrdentry.ti_ru.ru_stime.tv_usec * 1000LL;
user_time = thrdentry.ti_ru.ru_utime.tv_sec * 1000000000LL + thrdentry.ti_ru.ru_utime.tv_usec * 1000LL;
} else {
tty->print_cr("pthread_getthrds_np failed.");
tty->print_cr("getthrds64 failed, errno: %d.", errno);
error = true;
}
}

View File

@@ -349,11 +349,20 @@ julong os::physical_memory() {
return phys_mem;
}
// Returns the resident set size (RSS) of the process.
// Falls back to using VmRSS from /proc/self/status if /proc/self/smaps_rollup is unavailable.
// Note: On kernels with memory cgroups or shared memory, VmRSS may underreport RSS.
// Users requiring accurate RSS values should be aware of this limitation.
size_t os::rss() {
size_t size = 0;
os::Linux::meminfo_t info;
if (os::Linux::query_process_memory_info(&info)) {
size = info.vmrss * K;
os::Linux::accurate_meminfo_t accurate_info;
if (os::Linux::query_accurate_process_memory_info(&accurate_info) && accurate_info.rss != -1) {
size = accurate_info.rss * K;
} else {
os::Linux::meminfo_t info;
if (os::Linux::query_process_memory_info(&info)) {
size = info.vmrss * K;
}
}
return size;
}
@@ -2346,6 +2355,37 @@ bool os::Linux::query_process_memory_info(os::Linux::meminfo_t* info) {
return false;
}
// Accurate memory information need Linux 4.14 or newer
bool os::Linux::query_accurate_process_memory_info(os::Linux::accurate_meminfo_t* info) {
FILE* f = os::fopen("/proc/self/smaps_rollup", "r");
if (f == nullptr) {
return false;
}
const size_t num_values = sizeof(os::Linux::accurate_meminfo_t) / sizeof(size_t);
size_t num_found = 0;
char buf[256];
info->rss = info->pss = info->pssdirty = info->pssanon =
info->pssfile = info->pssshmem = info->swap = info->swappss = -1;
while (::fgets(buf, sizeof(buf), f) != nullptr && num_found < num_values) {
if ( (info->rss == -1 && sscanf(buf, "Rss: %zd kB", &info->rss) == 1) ||
(info->pss == -1 && sscanf(buf, "Pss: %zd kB", &info->pss) == 1) ||
(info->pssdirty == -1 && sscanf(buf, "Pss_Dirty: %zd kB", &info->pssdirty) == 1) ||
(info->pssanon == -1 && sscanf(buf, "Pss_Anon: %zd kB", &info->pssanon) == 1) ||
(info->pssfile == -1 && sscanf(buf, "Pss_File: %zd kB", &info->pssfile) == 1) ||
(info->pssshmem == -1 && sscanf(buf, "Pss_Shmem: %zd kB", &info->pssshmem) == 1) ||
(info->swap == -1 && sscanf(buf, "Swap: %zd kB", &info->swap) == 1) ||
(info->swappss == -1 && sscanf(buf, "SwapPss: %zd kB", &info->swappss) == 1)
)
{
num_found ++;
}
}
fclose(f);
return true;
}
#ifdef __GLIBC__
// For Glibc, print a one-liner with the malloc tunables.
// Most important and popular is MALLOC_ARENA_MAX, but we are

View File

@@ -181,6 +181,23 @@ class os::Linux {
// fields will contain -1.
static bool query_process_memory_info(meminfo_t* info);
// Output structure for query_accurate_process_memory_info() (all values in KB)
struct accurate_meminfo_t {
ssize_t rss; // current resident set size
ssize_t pss; // current proportional set size
ssize_t pssdirty; // proportional set size (dirty)
ssize_t pssanon; // proportional set size (anonymous mappings)
ssize_t pssfile; // proportional set size (file mappings)
ssize_t pssshmem; // proportional set size (shared mappings)
ssize_t swap; // swapped out
ssize_t swappss; // proportional set size (swapped out)
};
// Attempts to query accurate memory information from /proc/self/smaps_rollup and return it in the output structure.
// May fail (returns false) or succeed (returns true) but not all output fields are available; unavailable
// fields will contain -1.
static bool query_accurate_process_memory_info(accurate_meminfo_t* info);
// Tells if the user asked for transparent huge pages.
static bool _thp_requested;

View File

@@ -2623,7 +2623,6 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr());
}
#if !defined(PRODUCT)
if ((exception_code == EXCEPTION_ACCESS_VIOLATION) &&
VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
// Verify that OS save/restore APX registers.
@@ -2631,7 +2630,6 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr_apx());
}
#endif
#endif
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
if (VMError::was_assert_poison_crash(exception_record)) {

View File

@@ -429,13 +429,11 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
stub = VM_Version::cpuinfo_cont_addr();
}
#if !defined(PRODUCT) && defined(_LP64)
if ((sig == SIGSEGV || sig == SIGBUS) && VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
// Verify that OS save/restore APX registers.
stub = VM_Version::cpuinfo_cont_addr_apx();
VM_Version::clear_apx_test_state();
}
#endif
// We test if stub is already set (by the stack overflow code
// above) so it is not overwritten by the code that follows. This

View File

@@ -209,8 +209,16 @@ frame os::fetch_compiled_frame_from_context(const void* ucVoid) {
}
intptr_t* os::fetch_bcp_from_context(const void* ucVoid) {
Unimplemented();
return nullptr;
assert(ucVoid != nullptr, "invariant");
const ucontext_t* uc = (const ucontext_t*)ucVoid;
assert(os::Posix::ucontext_is_interpreter(uc), "invariant");
#if (FP_REG_NUM == 11)
assert(Rbcp == R7, "expected FP=R11, Rbcp=R7");
return (intptr_t*)uc->uc_mcontext.arm_r7;
#else
assert(Rbcp == R11, "expected FP=R7, Rbcp=R11");
return (intptr_t*)uc->uc_mcontext.arm_fp; // r11
#endif
}
frame os::get_sender_for_C_frame(frame* fr) {

View File

@@ -89,6 +89,25 @@
#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0)
#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0)
#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6
#define RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS 7
#define RISCV_HWPROBE_KEY_TIME_CSR_FREQ 8
#define RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF 9
#define RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN 0
#define RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED 1
#define RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW 2
#define RISCV_HWPROBE_MISALIGNED_SCALAR_FAST 3
#define RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED 4
#define RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF 10
#define RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN 0
#define RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW 2
#define RISCV_HWPROBE_MISALIGNED_VECTOR_FAST 3
#define RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED 4
#ifndef NR_riscv_hwprobe
#ifndef NR_arch_specific_syscall
#define NR_arch_specific_syscall 244
@@ -114,7 +133,12 @@ static struct riscv_hwprobe query[] = {{RISCV_HWPROBE_KEY_MVENDORID, 0},
{RISCV_HWPROBE_KEY_MIMPID, 0},
{RISCV_HWPROBE_KEY_BASE_BEHAVIOR, 0},
{RISCV_HWPROBE_KEY_IMA_EXT_0, 0},
{RISCV_HWPROBE_KEY_CPUPERF_0, 0}};
{RISCV_HWPROBE_KEY_CPUPERF_0, 0},
{RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE, 0},
{RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS, 0},
{RISCV_HWPROBE_KEY_TIME_CSR_FREQ, 0},
{RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF, 0},
{RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF, 0}};
bool RiscvHwprobe::probe_features() {
assert(!rw_hwprobe_completed, "Called twice.");
@@ -188,6 +212,9 @@ void RiscvHwprobe::add_features_from_query_result() {
VM_Version::ext_Zbs.enable_feature();
}
#ifndef PRODUCT
if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZICBOZ)) {
VM_Version::ext_Zicboz.enable_feature();
}
if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZBKB)) {
VM_Version::ext_Zbkb.enable_feature();
}
@@ -240,8 +267,22 @@ void RiscvHwprobe::add_features_from_query_result() {
VM_Version::ext_Zicond.enable_feature();
}
#endif
// RISCV_HWPROBE_KEY_CPUPERF_0 is deprecated and returns similar values
// to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF. Keep it there for backward
// compatibility with old kernels.
if (is_valid(RISCV_HWPROBE_KEY_CPUPERF_0)) {
VM_Version::unaligned_access.enable_feature(
VM_Version::unaligned_scalar.enable_feature(
query[RISCV_HWPROBE_KEY_CPUPERF_0].value & RISCV_HWPROBE_MISALIGNED_MASK);
} else if (is_valid(RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF)) {
VM_Version::unaligned_scalar.enable_feature(
query[RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF].value);
}
if (is_valid(RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF)) {
VM_Version::unaligned_vector.enable_feature(
query[RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF].value);
}
if (is_valid(RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE)) {
VM_Version::zicboz_block_size.enable_feature(query[RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE].value);
}
}

View File

@@ -100,7 +100,6 @@
#endif
uint32_t VM_Version::cpu_vector_length() {
assert(ext_V.enabled(), "should not call this");
return (uint32_t)read_csr(CSR_VLENB);
}
@@ -303,7 +302,7 @@ void VM_Version::rivos_features() {
ext_Zvfh.enable_feature();
unaligned_access.enable_feature(MISALIGNED_FAST);
unaligned_scalar.enable_feature(MISALIGNED_SCALAR_FAST);
satp_mode.enable_feature(VM_SV48);
// Features dependent on march/mimpid.

View File

@@ -255,13 +255,11 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
stub = VM_Version::cpuinfo_cont_addr();
}
#if !defined(PRODUCT) && defined(_LP64)
if ((sig == SIGSEGV) && VM_Version::is_cpuinfo_segv_addr_apx(pc)) {
// Verify that OS save/restore APX registers.
stub = VM_Version::cpuinfo_cont_addr_apx();
VM_Version::clear_apx_test_state();
}
#endif
if (thread->thread_state() == _thread_in_Java) {
// Java thread running in Java code => find exception handler if any

View File

@@ -238,7 +238,7 @@ bool Compiler::is_intrinsic_supported(vmIntrinsics::ID id) {
case vmIntrinsics::_counterTime:
#endif
case vmIntrinsics::_getObjectSize:
#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV) || defined(PPC64)
#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64)
case vmIntrinsics::_clone:
#endif
break;

View File

@@ -350,8 +350,9 @@ LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_
, _tmp(tmp)
, _expected_type(expected_type)
, _flags(flags) {
#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV) || defined(PPC64)
if (expected_type != nullptr && flags == 0) {
#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64)
if (expected_type != nullptr &&
((flags & ~LIR_OpArrayCopy::get_initial_copy_flags()) == 0)) {
_stub = nullptr;
} else {
_stub = new ArrayCopyStub(this);

View File

@@ -1282,6 +1282,8 @@ public:
int flags() const { return _flags; }
ciArrayKlass* expected_type() const { return _expected_type; }
ArrayCopyStub* stub() const { return _stub; }
static int get_initial_copy_flags() { return LIR_OpArrayCopy::unaligned |
LIR_OpArrayCopy::overlapping; }
virtual void emit_code(LIR_Assembler* masm);
virtual LIR_OpArrayCopy* as_OpArrayCopy() { return this; }

View File

@@ -818,7 +818,7 @@ JRT_ENTRY(void, Runtime1::deoptimize(JavaThread* current, jint trap_request))
Deoptimization::DeoptReason reason = Deoptimization::trap_request_reason(trap_request);
if (action == Deoptimization::Action_make_not_entrant) {
if (nm->make_not_entrant("C1 deoptimize")) {
if (nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize)) {
if (reason == Deoptimization::Reason_tenured) {
MethodData* trap_mdo = Deoptimization::get_method_data(current, method, true /*create_if_missing*/);
if (trap_mdo != nullptr) {
@@ -1110,7 +1110,7 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, C1StubId stub_id ))
// safepoint, but if it's still alive then make it not_entrant.
nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
if (nm != nullptr) {
nm->make_not_entrant("C1 code patch");
nm->make_not_entrant(nmethod::ChangeReason::C1_codepatch);
}
Deoptimization::deoptimize_frame(current, caller_frame.id());
@@ -1358,7 +1358,7 @@ void Runtime1::patch_code(JavaThread* current, C1StubId stub_id) {
// Make sure the nmethod is invalidated, i.e. made not entrant.
nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
if (nm != nullptr) {
nm->make_not_entrant("C1 deoptimize for patching");
nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize_for_patching);
}
}
@@ -1486,7 +1486,7 @@ JRT_ENTRY(void, Runtime1::predicate_failed_trap(JavaThread* current))
nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
assert (nm != nullptr, "no more nmethod?");
nm->make_not_entrant("C1 predicate failed trap");
nm->make_not_entrant(nmethod::ChangeReason::C1_predicate_failed_trap);
methodHandle m(current, nm->method());
MethodData* mdo = m->method_data();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -187,7 +187,13 @@ class ValueNumberingVisitor: public InstructionVisitor {
void do_Convert (Convert* x) { /* nothing to do */ }
void do_NullCheck (NullCheck* x) { /* nothing to do */ }
void do_TypeCast (TypeCast* x) { /* nothing to do */ }
void do_NewInstance (NewInstance* x) { /* nothing to do */ }
void do_NewInstance (NewInstance* x) {
ciInstanceKlass* c = x->klass();
if (c != nullptr && !c->is_initialized() &&
(!c->is_loaded() || c->has_class_initializer())) {
kill_memory();
}
}
void do_NewTypeArray (NewTypeArray* x) { /* nothing to do */ }
void do_NewObjectArray (NewObjectArray* x) { /* nothing to do */ }
void do_NewMultiArray (NewMultiArray* x) { /* nothing to do */ }

View File

@@ -121,6 +121,7 @@
\
product(ccstr, AOTCacheOutput, nullptr, \
"Specifies the file name for writing the AOT cache") \
constraint(AOTCacheOutputConstraintFunc, AtParse) \
\
product(bool, AOTInvokeDynamicLinking, false, DIAGNOSTIC, \
"AOT-link JVM_CONSTANT_InvokeDynamic entries in cached " \
@@ -147,7 +148,7 @@
product(bool, AOTVerifyTrainingData, trueInDebug, DIAGNOSTIC, \
"Verify archived training data") \
\
product(bool, AOTCompileEagerly, false, DIAGNOSTIC, \
product(bool, AOTCompileEagerly, false, EXPERIMENTAL, \
"Compile methods as soon as possible") \
\
/* AOT Code flags */ \

Some files were not shown because too many files have changed in this diff Show More