Compare commits

..

341 Commits

Author SHA1 Message Date
Vitaly Provodin
c628622ceb update exclude list on results of 25.0.2 test runs 2026-01-31 05:43:29 +04:00
Nikita Provotorov
81b06e0189 JBR-9817 Wayland: text-input-unstable-v3: Japanese input text partially highlighted in search
* Completely reimplementing JavaPreeditString#fromWaylandPreeditString and JavaCommitString#fromWaylandCommitString to make sure they don't ignore UTF-8 encoding errors and that JavaPreeditString#fromWaylandPreeditString sensibly handles invalid cursor indices.
* Covering the new JavaPreeditString#fromWaylandPreeditString with tests.
* Working around https://gitlab.gnome.org/GNOME/mutter/-/issues/3547.

(cherry picked from commit e621663f0c)
2026-01-30 18:09:24 +01:00
Nikita Provotorov
ad6422a063 JBR-9816 Wayland: text-input-unstable-v3: Caret position is incorrect during Japanese typing in Editor
Make the caret within preedit text be sourced from cursor_begin of zwp_text_input_v3::preedit_string and not from cursor_end.

(cherry picked from commit 29ede7b550)
2026-01-30 18:09:07 +01:00
Nikita Provotorov
32de5c51f7 JBR-9506 Wayland: warnings from text_input_unstable_v3
Relaxed the logging entry level from WARNING to INFO.

(cherry picked from commit 28c83fe054)
2026-01-30 16:35:59 +01:00
Nikita Gubarkov
3e0117342f JBR-9552 Isolated JBR API context per classloader 2026-01-30 13:53:48 +01:00
Konanki Sreenath
dd05ed48b0 8368032: Enhance Certificate Checking
Backport-of: 8747d00ad14838d5a2e3403b807a60a722044374
2026-01-30 13:31:27 +04:00
Sean Coffey
f1c768b55e 8372753: jpackage ignores --file-associations option with predefined app image
Backport-of: 44c11c754e3612f83ca4027ad3d43b90d33e86c5
2026-01-30 13:31:27 +04:00
Kerem Kat
685515eecc 8371425: Include folder names in vscode workspace virtual folders
Backport-of: 98f40e4575
2026-01-30 13:31:26 +04:00
SendaoYan
a00b25a4e8 8371697: test/jdk/java/nio/file/FileStore/Basic.java fails after 8360887 on linux
Backport-of: 46b5e588ab
2026-01-30 13:31:26 +04:00
SendaoYan
7a2bc8fb5f 8368982: Test sun/security/tools/jarsigner/EC.java completed and timed out
Backport-of: b0721e2859
2026-01-30 13:31:26 +04:00
Alexey Semenyuk
1804a6246c 8371094: --mac-signing-key-user-name no longer works
Reviewed-by: aivanov
Backport-of: 0555f6228c
2026-01-30 13:31:25 +04:00
Aleksey Shipilev
ed1504532c 8370318: AES-GCM vector intrinsic may read out of bounds (x86_64, AVX-512)
Backport-of: 7bb490c4bf
2026-01-30 13:31:25 +04:00
Renjith Kannath Pariyangad
3a5672a379 8370465: Right to Left Orientation Issues with MenuItem Component
Backport-of: fc5df4ac8f
2026-01-30 13:31:25 +04:00
SendaoYan
7feb1a32bb 8366694: Test JdbStopInNotificationThreadTest.java timed out after 60 second
8366850: Test com/sun/jdi/JdbStopInNotificationThreadTest.java failed

Reviewed-by: phh
Backport-of: ed62bda2e0
2026-01-30 13:31:24 +04:00
Ravi.Patel8
f12891f1ac 8368606: Printer lookup returns empty on AIX platform due to uninitialized results list
Backport-of: 9b1633ded0
2026-01-30 13:31:24 +04:00
Paul Hübner
ff0e89986c 8366229: runtime/Thread/TooSmallStackSize.java runs with all collectors
Backport-of: 075ebb4ee5
2026-01-30 13:31:23 +04:00
Bhogesh Patil
001d5f6455 8370428: Change milestone to fcs for all releases
Reviewed-by: jwilhelm
2026-01-30 13:31:23 +04:00
Srinivas Vamsi Parasa
af5f3bf1e6 8354348: Enable Extended EVEX to REX2/REX demotion for commutative operations with same dst and src2
Backport-of: c41add8d3e
2026-01-30 13:31:22 +04:00
Vladimir Petko
f8e1f57602 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
2026-01-30 13:31:22 +04:00
SendaoYan
75990bd8e2 8367904: Test java/net/InetAddress/ptr/Lookup.java should throw SkippedException
Backport-of: c0815e40b6
2026-01-30 13:31:22 +04:00
Vladimir Petko
6e1db512e3 8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails
Backport-of: 5609ee11a2
2026-01-30 13:31:21 +04:00
Hari Prasad Kummari
03de0be867 8346884: Add since checker test to jdk.editpad
Backport-of: 7daf9813c0
2026-01-30 13:31:21 +04:00
David Briemann
2fc02dac34 8369979: Flag UsePopCountInstruction was accidentally disabled on PPC64
Backport-of: 9b9559a2e3
2026-01-30 13:31:20 +04:00
Matthias Baesken
9cee39e654 8369563: Gtest dll_address_to_function_and_library_name has issues with stripped pdb files
Backport-of: 98e1d2fab1
2026-01-30 13:31:20 +04:00
Matthias Baesken
3bd3d490eb 8368960: Adjust java UL logging in the build
Backport-of: bd25db1fb8
2026-01-30 13:31:20 +04:00
SendaoYan
8240aeca9f 8367869: Test java/io/FileDescriptor/Sync.java timed out
Backport-of: 61c5245bf7
2026-01-30 13:31:19 +04:00
SendaoYan
2f5ff016b8 8367988: NewFileSystemTests.readOnlyZipFileFailure fails when run by root user
Backport-of: b03b6f54c5
2026-01-30 13:31:19 +04:00
Martin Doerr
17129fe6bb 8369946: Bytecode rewriting causes Java heap corruption on PPC
Backport-of: 6bf3581bba
2026-01-30 13:31:19 +04:00
Matias Saavedra Silva
8b5e4ca797 8364660: ClassVerifier::ends_in_athrow() should be removed
Reviewed-by: jwilhelm, dlong, rhalade
Backport-of: 1bd814c3b2
2026-01-30 13:31:18 +04:00
Yagmur Eren
d27facbd40 8358748: Large page size initialization fails with assert "page_size must be a power of 2"
Reviewed-by: ayang, dholmes
Backport-of: 40bc083267
2026-01-30 13:31:17 +04:00
Viktor Klang
5dca6876b5 8369656: Calling CompletableFuture.join() could execute task in common pool
Reviewed-by: alanb
Backport-of: b5b83247da
2026-01-30 13:31:16 +04:00
Mohamed Issa
79ce7b4661 8358556: Assert when running with -XX:-UseLibmIntrinsic
Backport-of: ef4cbec6fb
2026-01-30 13:31:16 +04:00
Feilong Jiang
997872a738 8369947: Bytecode rewriting causes Java heap corruption on RISC-V
Backport-of: 4625199358
2026-01-30 13:31:16 +04:00
William Kemper
284d3dfb5d 8370048: Shenandoah: Deprecated ShenandoahPacing option
Reviewed-by: ysr
2026-01-30 13:31:15 +04:00
Anawesha Khuntia
cef0f89a96 8364764: java/nio/channels/vthread/BlockingChannelOps.java subtests timed out
Backport-of: f0498c2aed
2026-01-30 13:31:15 +04:00
Kieran Farrell
a8f9bc4af5 8365086: CookieStore.getURIs() and get(URI) should return an immutable List
Backport-of: 022e29a775
2026-01-30 13:31:14 +04:00
Justin King
229f73d07a 8369506: Bytecode rewriting causes Java heap corruption on AArch64
Reviewed-by: aph
Backport-of: 18fd047702
2026-01-30 13:31:14 +04:00
Hari Prasad Kummari
a66cd0f996 8365660: test/jdk/sun/security/pkcs11/KeyAgreement/ tests skipped without SkipExceprion
Backport-of: ec7361e082
2026-01-30 13:31:14 +04:00
Cesar Soares Lucas
1c89084d0c 8357396: Refactor nmethod::make_not_entrant to use Enum instead of "const char*"
Backport-of: 62fde68708
2026-01-30 13:31:13 +04:00
Alexey Semenyuk
ab06ebc1cc 8369853: jpackage signing tests fail after JDK-8358723
Backport-of: 95def24b02
2026-01-30 13:31:13 +04:00
Alexey Semenyuk
af6909947d 8369868: Compilation error in Win8365790Test.java with JDK-8358723 fix resulting in CI tier3 failure
Reviewed-by: aivanov
2026-01-30 13:31:13 +04:00
Chris Dennis
9154864e32 8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...)
Reviewed-by: aph
Backport-of: d5a207994b
2026-01-30 13:31:12 +04:00
Matthias Baesken
5b0b9337d9 8369560: Slowdebug build without CDS fails
Reviewed-by: lucy
Backport-of: 0af959a340
2026-01-30 13:31:12 +04:00
Matthias Baesken
08333f1417 8369657: [AIX] TOC overflow in static-launcher build when building slowdebug after JDK-8352064
Backport-of: 4b85ba9067
2026-01-30 13:31:12 +04:00
Kieran Farrell
5dde40c38c 8367237: Thread-Safety Usage Warning for java.text.Collator Classes
Reviewed-by: jlu
Backport-of: 64155dfac0
2026-01-30 13:31:11 +04:00
SendaoYan
e98d0a40f4 8368668: Several vmTestbase/vm/gc/compact tests timed out on large memory machine
Backport-of: 9093d3a04c
2026-01-30 13:31:11 +04:00
Vladimir Petko
41fc238b6e 8369450: [Ubuntu 25.10] openjdk fails to build due to rust-coreutils date
Backport-of: b73228b51c
2026-01-30 13:31:10 +04:00
Vanitha B P
72e981d9ff 8367598: Switch to CRC32C for SEED calculation in jdk.test.lib.Utils
Backport-of: 29908148f8
2026-01-30 13:31:10 +04:00
Anawesha Khuntia
5738657709 8333526: Restructure java/nio/channels/DatagramChannel/StressNativeSignal.java to a fail fast exception handling policy
Backport-of: 4f4030a423
2026-01-30 13:31:10 +04:00
Joakim Nordström
0a85eed507 8365913: Support latest MSC_VER in abstract_vm_version.cpp
Backport-of: af532cc1b2
2026-01-30 13:31:09 +04:00
Ashish
65d9ea8779 8359167: Remove unused test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java
Reviewed-by: cjplummer, coffeys
Backport-of: 982064e50c
2026-01-30 13:31:09 +04:00
Erik Gahlin
0e6caec683 8368670: Deadlock in JFR on event register + class load
Reviewed-by: mgronlun
Backport-of: 5fccabff15
2026-01-30 13:31:09 +04:00
Ramesh Bhagavatam Gangadhar
2b147bd854 8366342: Key generator and key pair generator tests skipping, but showing as passed
Backport-of: 7690a45f77
2026-01-30 13:31:08 +04:00
Feilong Jiang
3f695563ad 8369616: JavaFrameAnchor on RISC-V has unnecessary barriers and wrong store order in MacroAssembler
Backport-of: 72663695da
2026-01-30 13:31:08 +04:00
Matthias Baesken
733e9b9ca5 8368565: Adjust comment regarding dependency of libjvm.so to librt
Backport-of: 7bfdb01207
2026-01-30 13:31:08 +04:00
Shivangi Gupta
838202355a 8201778: Speed up test javax/net/ssl/DTLS/PacketLossRetransmission.java
Backport-of: fc3e3e26c5
2026-01-30 13:31:07 +04:00
Sean Coffey
90e384351f 8369319: java/net/httpclient/CancelRequestTest.java fails intermittently
Reviewed-by: dfuchs
2026-01-30 13:31:07 +04:00
Erik Gahlin
4eff4bd41a 8364190: JFR: RemoteRecordingStream withers don't work
Reviewed-by: mgronlun
Backport-of: da0d9598d0
2026-01-30 13:31:06 +04:00
Kieran Farrell
f4c51b1ccf 8367021: Regression in LocaleDataTest refactoring
Backport-of: 48831c65b5
2026-01-30 13:31:06 +04:00
Kieran Farrell
7751aedec7 8369184: SimpleTimeZone equals() Returns True for Unequal Instances with Different hashCode Values
Backport-of: 37b725d9c1
2026-01-30 13:31:06 +04:00
Ramesh Bhagavatam Gangadhar
4eb2c10cec 8366159: SkippedException is treated as a pass for pkcs11/KeyStore, pkcs11/SecretKeyFactory and pkcs11/SecureRandom
Backport-of: 166ef5e7b1
2026-01-30 13:31:05 +04:00
Alexey Ivanov
58c71372c4 8370331: Problemlist 2 tests due to failures in the CI pipeline
Reviewed-by: robm
2026-01-30 13:31:05 +04:00
Ravi Reddy
eb8f788cc7 8365058: Enhance CopyOnWriteArraySet
Reviewed-by: jlu
Backport-of: 5c7956fd9a56a00c8af2d3092ea5680843429b53
2026-01-30 13:31:05 +04:00
Alexey Ivanov
60b0b5ee71 8365280: Enhance JOptionPane
Backport-of: 8d9541f8c907d10159d524fc00fce85a2d99e51d
2026-01-30 13:31:04 +04:00
nibjen
e2a4e9c612 8367133: DTLS: fragmentation of Finished message results in handshake failure
Backport-of: 80cb0ead50
2026-01-30 13:31:04 +04:00
Sergey Bylokhov
ff5d111051 8367384: The ICC_Profile class may throw exceptions during serialization
Backport-of: 0e98ec3662
2026-01-30 13:31:04 +04:00
Thomas Fitzsimmons
37ea549e72 8361711: Add library name configurability to PKCS11Test.java
Backport-of: 1cb1267ce8
2026-01-30 13:31:03 +04:00
Alex Menkov
ac9474f1b4 8304811: vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/INDIFY_Test.java fails with JVMTI_ERROR_TYPE_MISMATCH
Backport-of: 854b384b12
2026-01-30 13:31:03 +04:00
Roman Marchenko
c9c0e5fd46 8358751: C2: Recursive inlining check for compiled lambda forms is broken
Backport-of: 9cca4f7c76
2026-01-30 13:31:02 +04:00
Justin Lu
a4a1835477 8369078: Fix faulty test conversion in IllegalCharsetName.java
Backport-of: 0f406c420e
2026-01-30 13:31:01 +04:00
Rui Li
7a73f74456 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
2026-01-30 13:31:01 +04:00
Aleksey Shipilev
bb7a4ec838 8367948: JFR: MethodTrace threshold setting has no effect
Backport-of: 4bc86a26db
2026-01-30 13:31:00 +04:00
Aleksey Shipilev
458962450c 8367953: JFR sampler threads does not appear in thread dump
Backport-of: 64c46d8efc
2026-01-30 13:31:00 +04:00
Joakim Nordström
17ca88eceb 8364993: JFR: Disable jdk.ModuleExport in default.jfc
Backport-of: a382996bb4
2026-01-30 13:31:00 +04:00
Joakim Nordström
6c2dc3f19c 8364556: JFR: Disable SymbolTableStatistics and StringTableStatistics in default.jfc
Backport-of: 7698c373a6
2026-01-30 13:30:59 +04:00
Aleksey Shipilev
ba4ef8208b 8369226: GHA: Switch to MacOS 15
Backport-of: 1ea8cfa6dc
2026-01-30 13:30:59 +04:00
SendaoYan
4f78a57a32 8365983: Tests should throw SkippedException when SCTP not supported
Backport-of: a029245a4e
2026-01-30 13:30:58 +04:00
Dingli Zhang
341deb2edf 8368893: RISC-V: crash after JDK-8352673 on fastdebug version
Backport-of: f49849a5ed
2026-01-30 13:30:58 +04:00
Justin King
b15b77e3ce 8369190: JavaFrameAnchor on AArch64 has unnecessary barriers and wrong store order in MacroAssembler
Backport-of: fd29677479
2026-01-30 13:30:58 +04:00
Johannes Bechberger
9e13eab915 8359690: New test TestCPUTimeSampleThrottling still fails intermittently
Backport-of: 487cc3c5be
2026-01-30 13:30:57 +04:00
Arno Zeller
1d794d79e7 8362581: Timeouts in java/nio/channels/SocketChannel/OpenLeak.java on UNIX
Backport-of: de59da27a6
2026-01-30 13:30:57 +04:00
Robbin Ehn
cec01d5097 8367692: RISC-V: Align post call nop
Reviewed-by: fyang
Backport-of: 07ecc93dbd
2026-01-30 13:30:57 +04:00
SendaoYan
3b56b96197 8365834: Mark java/net/httpclient/ManyRequests.java as intermittent
Reviewed-by: jpai
Backport-of: 09aad0aea8
2026-01-30 13:30:56 +04:00
Yassine-O
2b62151aa2 8366844: Update and automate MouseDraggedOriginatedByScrollBarTest.java
Backport-of: f1ee1b4a3d
2026-01-30 13:30:56 +04:00
Alexey Semenyuk
56f90a9b19 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
2026-01-30 13:30:55 +04:00
Srinivas Vamsi Parasa
5d7e5bf523 8366365: [test] test/lib-test/jdk/test/whitebox/CPUInfoTest.java should be updated
Backport-of: 8520fd3f6a
2026-01-30 13:30:55 +04:00
Aleksey Shipilev
da02cac1a9 8361950: Update to use jtreg 8
Backport-of: 5db1dfe5c8
2026-01-30 13:30:55 +04:00
Hari Prasad Kummari
c30857e839 8361423: Add IPSupport::printPlatformSupport to java/net/NetworkInterface/IPv4Only.java
Backport-of: 2f1aed2a16
2026-01-30 13:30:54 +04:00
Anawesha Khuntia
4b40e9df0b 8359477: com/sun/net/httpserver/Test12.java appears to have a temp file race
Backport-of: e1681c4828
2026-01-30 13:30:54 +04:00
Srinivas Vamsi Parasa
c36c6fedc6 8367780: Enable UseAPX on Intel CPUs only when both APX_F and APX_NCI_NDD_NF cpuid features are present
Backport-of: 3d4e049194
2026-01-30 13:30:54 +04:00
Aleksey Shipilev
8d82199ba0 8367313: CTW: Execute in AWT headless mode
Backport-of: 7e738f0d90
2026-01-30 13:30:53 +04:00
Srinivas Vamsi Parasa
55e37d7ac9 8367694: Fix jtreg test failure when Intel APX is enabled for KNL platforms
Backport-of: e883dec6be
2026-01-30 13:30:53 +04:00
Yassine
802df893a7 8365425: [macos26] javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java fails on macOS 26
Backport-of: bdf9834b81
2026-01-30 13:30:52 +04:00
Nibedita Jena
5ca87846a5 8369487: Revert EA option for build promotion
Reviewed-by: coffeys
2026-01-30 13:30:52 +04:00
Trupti Patil
7ca9502d22 8366750: Remove test 'java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java' from problemlist
Backport-of: b674a42553
2026-01-30 13:30:52 +04:00
Christoph Langer
ded81c2c79 8364454: ProblemList runtime/cds/DeterministicDump.java on macos for JDK-8363986
Backport-of: ad0fd13f20
2026-01-30 13:30:51 +04:00
William Kemper
d60a74254b 8368152: Shenandoah: Incorrect behavior at end of degenerated cycle
Reviewed-by: kdnilsen, phh
Backport-of: f36c33c86d
2026-01-30 13:30:51 +04:00
William Kemper
d373a77eae 8365956: GenShen: Adaptive tenuring threshold algorithm may raise threshold prematurely
Reviewed-by: phh, kdnilsen
Backport-of: 7fcce27096
2026-01-30 13:30:50 +04:00
Dingli Zhang
811e868e33 8368732: RISC-V: Detect support for misaligned vector access via hwprobe
Reviewed-by: fyang
Backport-of: 538a722c2e
2026-01-30 13:30:50 +04:00
Igor Veresov
487aef31ac 8368698: runtime/cds/appcds/aotCache/OldClassSupport.java assert(can_add()) failed: Cannot add TrainingData objects
Backport-of: 4df41d2a75
2026-01-30 13:30:49 +04:00
Sergey Bylokhov
3236aa1abc 8362204: test/jdk/sun/awt/font/TestDevTransform.java fails on Ubuntu 24.04
Backport-of: 89af6e13f2
2026-01-30 13:30:49 +04:00
Srinivas Vamsi Parasa
cf9d1bfb3d 8365265: x86 short forward jump exceeds 8-bit offset in methodHandles_x86.cpp when using Intel APX
Backport-of: 38a261415d
2026-01-30 13:30:49 +04:00
Aleksey Shipilev
378811aa9c 8345810: Custom launchers must be linked with pthread to avoid dynamic linker issues
Backport-of: 685da0323b
2026-01-30 13:30:48 +04:00
Aleksey Shipilev
7382a8417f 8362282: runtime/logging/StressAsyncUL.java failed with exitValue = 134
Backport-of: c968a672c0
2026-01-30 13:30:48 +04:00
Aleksey Shipilev
2e616df413 8357141: Update to use jtreg 7.5.2
Backport-of: fe3be498b8
2026-01-30 13:30:47 +04:00
Andreas Steiner
669f1a84a9 8359104: gc/TestAlwaysPreTouchBehavior.java#<gcname> fails on Linux
Backport-of: 73df06c80c
2026-01-30 13:30:47 +04:00
Deepak Damodaran
8cc1a3ff31 8325766: Extend CertificateBuilder to create trust and end entity certificates programmatically
Reviewed-by: coffeys
2026-01-30 13:30:46 +04:00
SendaoYan
3c6b7846f6 8368367: Test jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java fails jdk.GCHeapMemoryUsage "expected 0 > 0"
Backport-of: ed31023fc5
2026-01-30 13:30:46 +04:00
Coleen Phillimore
1f49644e38 8365823: Revert storing abstract and interface Klasses to non-class metaspace
Reviewed-by: shade
Backport-of: fa00b24954
2026-01-30 13:30:45 +04:00
Matthias Baesken
4c533429fc 8359423: Improve error message in case of missing jsa shared archive
Reviewed-by: clanger
Backport-of: ef291d2d5d
2026-01-30 13:30:45 +04:00
Matthias Baesken
ba53556b63 8357691: File blocked.certs contains bad content when boot jdk 25 is used, sun/security/lib/CheckBlockedCerts.java failing
Backport-of: a80ba6260e
2026-01-30 13:30:44 +04:00
Aleksey Shipilev
a0e47a9c45 8358340: Support CDS heap archive with Generational Shenandoah
Backport-of: 577ac0610a
2026-01-30 13:30:44 +04:00
Aleksey Shipilev
55baf76d3e 8365165: Zap C-heap memory at delete/free
Backport-of: ca753ebad6
2026-01-30 13:30:44 +04:00
Severin Gehwolf
be32c100e5 8365389: Remove static color fields from SwingUtilities3 and WindowsMenuItemUI
Backport-of: 3468c6e5ef
2026-01-30 13:30:44 +04:00
Aleksey Shipilev
61bda7303a 8364111: InstanceMirrorKlass iterators should handle CDS and hidden classes consistently
Backport-of: ebb7f5d39b
2026-01-30 13:30:43 +04:00
Aleksey Shipilev
1f7e9e2f32 8333783: java/nio/channels/FileChannel/directio/DirectIOTest.java is unstable with AV software
Backport-of: 8c6d12250b
2026-01-30 13:30:43 +04:00
Aleksey Shipilev
662d55871c 8367333: C2: Vector math operation intrinsification failure
8367969: C2: compiler/vectorapi/TestVectorMathLib.java fails without UnlockDiagnosticVMOptions

Reviewed-by: eastigeevich, phh
Backport-of: aa36799acb
2026-01-30 13:30:42 +04:00
Aleksey Shipilev
da49569719 8362530: VM crash with -XX:+PrintTieredEvents when collecting AOT profiling
Backport-of: 26ccb3cef1
2026-01-30 13:30:42 +04:00
Sergey Bylokhov
a4a960df26 8367017: Remove legacy checks from WrappedToolkitTest and convert from bash
Backport-of: e1071797a4
2026-01-30 13:30:42 +04:00
Man Cao
34bf02361c 8368071: Compilation throughput regressed 2X-8X after JDK-8355003
Reviewed-by: shade
Backport-of: bdfe05b595
2026-01-30 13:30:41 +04:00
Aleksey Shipilev
4f939ef841 8365726: Test crashed with assert in C1 thread: Possible safepoint reached by thread that does not allow it
Backport-of: 452b052fe3
2026-01-30 13:30:41 +04:00
Jayashree S Kumar
de815407a0 8360178: TestArguments.atojulong gtest has incorrect format string
Backport-of: 878497fb85
2026-01-30 13:30:41 +04:00
Jayashree S Kumar
0a72d8c5bb 8361314: Test serviceability/jvmti/VMEvent/MyPackage/VMEventRecursionTest.java FATAL ERROR in native method: Failed during the GetClassSignature call
Backport-of: 8c00c374ec
2026-01-30 13:30:40 +04:00
Jayashree S Kumar
75a839af21 8361253: CommandLineOptionTest library should report observed values on failure
Backport-of: f153e415d7
2026-01-30 13:30:40 +04:00
Jayashree S Kumar
82c76143c8 8361897: gc/z/TestUncommit.java fails with Uncommitted too slow
Backport-of: 3f21c8bd1f
2026-01-30 13:30:39 +04:00
Igor Veresov
18d08f6e53 8366948: AOT cache creation crashes when iterating training data
Backport-of: 2aafda1968
2026-01-30 13:30:39 +04:00
Sean Coffey
f4e344514e 8362632: Improve HttpServer Request handling
Backport-of: 566ceb1b00f3e7ac7b9189ec84653ccb1f701d25
2026-01-30 13:30:39 +04:00
Dmitry Markov
7352ba6b0f 8359501: Enhance Handling of URIs
Backport-of: 79283a4b99d7bfff32674b4a29a75f706c9a9ba3
2026-01-30 13:30:38 +04:00
Matthias Baesken
d498dc56be 8362516: Support of GCC static analyzer (-fanalyzer)
Backport-of: ba90ccc6a8
2026-01-30 13:30:38 +04:00
Manukumar V S
81e0eb74c0 8346839: [TESTBUG] "java/awt/textfield/setechochartest4/setechochartest4.java" failed because the test frame disappears on clicking "Click Several Times" button
Backport-of: 58270b757c
2026-01-30 13:30:37 +04:00
Aleksey Shipilev
8181062072 8361520: Stabilize SystemGC benchmarks
Backport-of: a9bd1ad40c
2026-01-30 13:30:37 +04:00
SendaoYan
e54a9e818b 8366893: java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java timed out on macos-aarch64
Backport-of: 0dad3f1ae8
2026-01-30 13:30:37 +04:00
Fei Yang
d02a23474a 8368366: RISC-V: AlignVector is mistakenly set to AvoidUnalignedAccesses
Backport-of: 2313f8e4eb
2026-01-30 13:30:36 +04:00
Ramesh Bhagavatam Gangadhar
0934306889 8368192: Test java/lang/ProcessBuilder/Basic.java#id0 fails with Exception: Stack trace
Reviewed-by: coffeys
Backport-of: 218e82c875
2026-01-30 13:30:36 +04:00
Fei Yang
84fe27bab7 8362972: C2 fails with unexpected node in SuperWord truncation: IsFiniteF, IsFiniteD
Backport-of: 9f796da377
2026-01-30 13:30:36 +04:00
Sergey Bylokhov
be90488ef9 8367131: Test com/sun/jdi/ThreadMemoryLeakTest.java fails on 32 bits
Backport-of: fdc11a1569
2026-01-30 13:30:35 +04:00
Francisco Ferrari Bihurriet
d394eea2e9 8367782: VerifyJarEntryName.java: Fix modifyJarEntryName to operate on bytes and re-introduce verifySignatureEntryName
Backport-of: 1b9a11682d
2026-01-30 13:30:35 +04:00
Tejal Wakchaure
c6fc78c733 8365919: Replace currentTimeMillis with nanoTime in Stresser.java
Backport-of: 0ca38bdc4d
2026-01-30 13:30:35 +04:00
Calvin Cheung
aea816d37f 8357064: cds/appcds/ArchiveRelocationTest.java failed with missing expected output
Backport-of: 534d2b33dc
2026-01-30 13:30:34 +04:00
Erik Gahlin
104df6aa39 8362836: JFR: Broken pipe in jdk/jfr/event/io/TestIOTopFrame.java
Backport-of: 1b94a3466e
2026-01-30 13:30:34 +04:00
Chad Rakoczy
cbc2654510 8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking
Backport-of: 46ae1ee871
2026-01-30 13:30:34 +04:00
Manukumar V S
37e4033b08 8023263: [TESTBUG] Test closed/java/awt/Focus/InactiveWindowTest/InactiveFocusRace fails due to not enough time to initialize graphic components
Backport-of: 5271448b3a
2026-01-30 13:30:33 +04:00
Fei Gao
f369141fd6 8364184: [REDO] AArch64: [VectorAPI] sve vector math operations are not supported after JDK-8353217
Backport-of: 51d710e3cc
2026-01-30 13:30:33 +04:00
Manukumar V S
5b5e8660ff 8162380: [TEST_BUG] MouseEvent/.../AltGraphModifierTest.java has only "Fail" button
Backport-of: 34c3ac0316
2026-01-30 13:30:32 +04:00
Alexey Semenyuk
8973c90a03 8365790: Shutdown hook for application image does not work on Windows
Reviewed-by: almatvee, aivanov
Backport-of: f7ce3a1b5f
2026-01-30 13:30:32 +04:00
Alexey Ivanov
cff64d2be9 8358532: JFileChooser in GTK L&F still displays HTML filename
Backport-of: 6fe9143bbb
2026-01-30 13:30:31 +04:00
Francesco Andreuzzi
e26580de05 8367689: Revert removal of several compilation-related vmStructs fields
Reviewed-by: aturbanov, shade
Backport-of: 4c5e901c96
2026-01-30 13:30:30 +04:00
William Kemper
d01cab4969 8367378: GenShen: Missing timing stats when old mark buffers are flushed during final update refs
Backport-of: 11df28916a
2026-01-30 13:30:29 +04:00
Alexey Ivanov
2fdb7cf0eb 8367348: Enhance PassFailJFrame to support links in HTML
Backport-of: 7a3025e3d7
2026-01-30 13:30:28 +04:00
Stefan Johansson
1d918ce8b1 8366980: TestTransparentHugePagesHeap.java fails when run with -UseCompressedOops
Backport-of: 703d930e4d
2026-01-30 13:30:28 +04:00
Stefan Johansson
2e50003535 8366434: THP not working properly with G1 after JDK-8345655
Backport-of: a03302d41b
2026-01-30 13:30:27 +04:00
Richard Reingruber
051add6c5a 8360219: [AIX] assert(locals_base >= l2) failed: bad placement
Backport-of: bea2b029a7
2026-01-30 13:30:27 +04:00
Aleksey Shipilev
d498714c1b 8364212: Shenandoah: Rework archived objects loading
Backport-of: 68a35511eb
2026-01-30 13:30:27 +04:00
Matthias Baesken
da7714a67d 8364352: Some tests fail when using a limited number of pregenerated .jsa CDS archives
Backport-of: 3ca44c8dea
2026-01-30 13:30:26 +04:00
Fei Yang
8d131d94ee 8365926: RISC-V: Performance regression in renaissance (chi-square)
Reviewed-by: rehn
Backport-of: 5c1865a4fc
2026-01-30 13:30:26 +04:00
Fei Gao
415aaf6382 8365312: GCC 12 cannot compile SVE on aarch64 with auto-var-init pattern
Backport-of: 999761d0f6
2026-01-30 13:30:25 +04:00
Dingli Zhang
80a425d6b0 8367616: RISC-V: Auto-enable Zicboz extension for debug builds
Backport-of: 90e81c2bee
2026-01-30 13:30:25 +04:00
Axel Boldt-Christmas
6710bb48cf 8366147: ZGC: ZPageAllocator::cleanup_failed_commit_single_partition may leak memory
Backport-of: 86d6a2e05e
2026-01-30 13:30:25 +04:00
Aleksey Shipilev
e3a8de312f 8363966: GHA: Switch cross-compiling sysroots to Debian trixie
Backport-of: 2a5f149bb8
2026-01-30 13:30:24 +04:00
Anass Baya
959426d180 8346952: GetGraphicsStressTest.java fails: Native resources unavailable 8361839: Problemlist BogusFocusableWindowState due to failures in the CI pipeline
Reviewed-by: aivanov
Backport-of: 44cff9d6ab
2026-01-30 13:30:24 +04:00
Disha
3528d56c47 8366764: Deproblemlist java/awt/ScrollPane/ScrollPositionTest.java
Backport-of: 9f697c8b1ced41c256bd33f52bdcb2cede2adbf9
2026-01-30 13:30:23 +04:00
Tejal Wakchaure
36d897a328 8366029: Do not add -XX:VerifyArchivedFields by default to CDS tests
Backport-of: 15601b4718
2026-01-30 13:30:23 +04:00
Matthias Baesken
2619ee1c67 8365442: [asan] runtime/ErrorHandling/CreateCoredumpOnCrash.java fails
Backport-of: e5ec464120
2026-01-30 13:30:23 +04:00
Matthias Baesken
7949ae4ada 8366092: [GCC static analyzer] UnixOperatingSystem.c warning: use of uninitialized value 'systemTicks'
Backport-of: a6e2a329a0
2026-01-30 13:30:22 +04:00
Matthias Baesken
d4582460f4 8365700: Jar --validate without any --file option leaves around a temporary file /tmp/tmpJar<number>.jar
Backport-of: 320235ccb8
2026-01-30 13:30:22 +04:00
Dingli Zhang
790a18cc26 8367098: RISC-V: sync CPU features with related JVM flags for dependant ones
Backport-of: f51e442b0e
2026-01-30 13:30:22 +04:00
Rui Li
b1d7577e7f 8364296: Set IntelJccErratumMitigation flag ergonomically
Backport-of: 6c5804722b
2026-01-30 13:30:21 +04:00
Hamlin Li
d01d8eb151 8360090: [TEST] RISC-V: disable some cds tests on qemu
Backport-of: c50370599e
2026-01-30 13:30:21 +04:00
skishor
b0926c1895 8361367: AOT ExcludedClasses.java test failed with missing constant pool logs
Backport-of: 92712ef45d
2026-01-30 13:30:21 +04:00
Hari Prasad Kummari
063f0f0ec4 8364263: HttpClient: Improve encapsulation of ProxyServer
Backport-of: 190e113031
2026-01-30 13:30:20 +04:00
Dingli Zhang
d36d9d6188 8367137: RISC-V: Detect Zicboz block size via hwprobe
Backport-of: 5abd18426d
2026-01-30 13:30:20 +04:00
Dingli Zhang
a0573824c1 8367066: RISC-V: refine register selection in MacroAssembler:: decode_klass_not_null
Backport-of: 0b3a303053
2026-01-30 13:30:20 +04:00
Lei Zhu
77c10f761f 8362533: Tests sun/management/jmxremote/bootstrap/* duplicate VM flags
Backport-of: 458f033d4d
2026-01-30 13:30:19 +04:00
Sarvesh Kumar Jain
9b6e87f41c 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
2026-01-30 13:30:19 +04:00
SendaoYan
44ccc285b7 8366359: Test should throw SkippedException when there is no lpstat
Backport-of: f23c150709
2026-01-30 13:30:18 +04:00
Rui Li
08153c6ce0 8320836: jtreg gtest runs should limit heap size
Backport-of: ac9e51023f
2026-01-30 13:30:18 +04:00
Rui Li
0d87088aa6 8364198: NMT should have a better corruption message
Backport-of: 2202156acc
2026-01-30 13:30:17 +04:00
Dingli Zhang
e8f50a83f6 8367048: RISC-V: Correct pipeline descriptions of the architecture
Backport-of: 0aee7bf24d
2026-01-30 13:30:17 +04:00
Sean Coffey
ed00e13bab 8341496: Improve JMX connections
8367277: Fix copyright header in JMXInterfaceBindingTest.java

Reviewed-by: dfuchs
Backport-of: 76c1173ff5780b18cdb9ba3a519ee83abf651a3a
2026-01-30 13:30:16 +04:00
Renjith Kannath Pariyangad
48bd6ccbbe 8366446: Test java/awt/geom/ConcurrentDrawPolygonTest.java fails intermittently
Backport-of: 92c451f3b3273babc630a2f0371a0cbb4366c387
2026-01-30 13:30:16 +04:00
SendaoYan
723039e451 8364786: Test java/net/vthread/HttpALot.java intermittently fails - 24999 handled, expected 25000
Backport-of: f83454cd61
2026-01-30 13:30:15 +04:00
SendaoYan
54d27a20c7 8366031: Mark com/sun/nio/sctp/SctpChannel/CloseDescriptors.java as intermittent
Backport-of: efb81dafaf
2026-01-30 13:30:15 +04:00
SendaoYan
3e7a925c57 8366558: Gtests leave /tmp/cgroups-test* files
Backport-of: 49fd6a0cb4
2026-01-30 13:30:14 +04:00
skishor
b333aaf549 8357816: Add test from JDK-8350576
Backport-of: d8c3533a91
2026-01-30 13:30:14 +04:00
Trupti Patil
0361807740 8361298: SwingUtilities/bug4967768.java fails where character P is not underline
Backport-of: 57553ca1db
2026-01-30 13:30:14 +04:00
Manukumar V S
8db3d87e02 8347277: java/awt/Focus/ComponentLostFocusTest.java fails intermittently
Backport-of: e2a503e26e
2026-01-30 13:30:13 +04:00
Tejal Wakchaure
a9f70cbc11 8365638: JFR: Add --exact for debugging out-of-order events
Backport-of: a42ba1ff1a
2026-01-30 13:30:13 +04:00
Matthias Baesken
675526eeb2 8365487: [asan] some oops (mode) related tests fail
Backport-of: 98f54d90ea
2026-01-30 13:30:13 +04:00
Matthias Baesken
8c5a7608d7 8364514: [asan] runtime/jni/checked/TestCharArrayReleasing.java heap-buffer-overflow
Backport-of: 67ba8b45dd
2026-01-30 13:30:12 +04:00
SendaoYan
9c9d863c5e 8365863: /test/jdk/sun/security/pkcs11/Cipher tests skip without SkippedException
Backport-of: 993babb326
2026-01-30 13:30:12 +04:00
skishor
f9cd40e7d9 8361215: Add AOT test case: verification constraint classes are excluded
Backport-of: 055d2ffa69
2026-01-30 13:30:11 +04:00
skishor
3de6f63c05 8358685: [TEST] AOTLoggingTag.java failed with missing log message
Backport-of: 9658cecde3
2026-01-30 13:30:11 +04:00
Rui Li
f6844d10d7 8364257: JFR: User-defined events and settings with a one-letter name cannot be configured
Backport-of: ea7e943874
2026-01-30 13:30:11 +04:00
Matthias Baesken
80d24b5275 8362889: [GCC static analyzer] leak in libstringPlatformChars.c
Reviewed-by: rriggs
Backport-of: 5160cfb496
2026-01-30 13:30:10 +04:00
Sergey Bylokhov
4f103f1b78 8366208: Unexpected exception in sun.java2d.cmm.lcms.LCMSImageLayout
Backport-of: 12e6a0b6d0
2026-01-30 13:30:10 +04:00
Vanitha B P
29d0bd1fcc 8366537: Test "java/util/TimeZone/DefaultTimeZoneTest.java" is not updating the zone ID as expected
Reviewed-by: naoto
Backport-of: a40afdd08f
2026-01-30 13:30:09 +04:00
Matthias Baesken
39ca946862 8365240: [asan] exclude some tests when using asan enabled binaries
Backport-of: d78fa5a9f6
2026-01-30 13:30:09 +04:00
Shyam Kishor
657e0268a2 8361494: [IR Framework] Escape too much in replacement of placeholder
Backport-of: 76442f39b9
2026-01-30 13:30:09 +04:00
Lei Zhu
fa9d53ad19 8362532: Test gc/g1/plab/* duplicate command-line options
Backport-of: 13bab09bff
2026-01-30 13:30:08 +04:00
Kevin Walls
0cf915fa95 8305567: serviceability/tmtools/jstat/GcTest01.java failed utils.JstatGcResults.assertConsistency
Backport-of: 310ef85667
2026-01-30 13:30:08 +04:00
John Jiang
d648ecdf81 8364597: Replace THL A29 Limited with Tencent
Backport-of: 4c9eaddaef
2026-01-30 13:30:08 +04:00
Sean Coffey
4bfecd8787 8365168: Use 64-bit aligned addresses for CK_ULONG access in PKCS11 native key code
Backport-of: 640b71da48
2026-01-30 13:30:07 +04:00
Rui Li
33cfc5f9fa 8361497: Scoped Values: orElse and orElseThrow do not access the cache
Backport-of: 9dd93c6a2c
2026-01-30 13:30:07 +04:00
Alexey Ivanov
1657bc2410 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java
Reviewed-by: dmarkov
Backport-of: 7576064a10
2026-01-30 13:30:06 +04:00
Zhaokun Xie
ea2b0d1b90 8361892: AArch64: Incorrect matching rule leading to improper oop instruction encoding
Backport-of: dccb1782ec
2026-01-30 13:30:06 +04:00
Prajwal Kumaraswamy
30d67ee58b 8265429: Improve GCM encryption
Backport-of: 1315d641edc5fd7619fed0998cb130cfc8162804
2026-01-30 13:30:06 +04:00
Alexey Ivanov
bc22999ef2 8366800: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: dmarkov
2026-01-30 13:30:05 +04:00
Alexey Ivanov
1ec08d5dd6 8365615: Improve JMenuBar/RightLeftOrientation.java
Backport-of: afa8e79ba1
2026-01-30 13:30:05 +04:00
Matthias Baesken
f556b3ea5b 8363676: [GCC static analyzer] missing return value check of malloc in OGLContext_SetTransform
Backport-of: d25ad881eb
2026-01-30 13:30:05 +04:00
Chen Liang
e8aaee9d61 8366028: MethodType::fromMethodDescriptorString should not throw UnsupportedOperationException for invalid descriptors
Backport-of: 1d53ac30f1
2026-01-30 13:30:04 +04:00
Hamlin Li
91b316fe36 8365772: RISC-V: correctly prereserve NaN payload when converting from float to float16 in vector way
Backport-of: 32df2d17f3
2026-01-30 13:30:04 +04:00
Hamlin Li
c168a53f83 8365206: RISC-V: compiler/c2/irTests/TestFloat16ScalarOperations.java is failing on riscv64
Backport-of: 28602f3d3e
2026-01-30 13:30:03 +04:00
abhishek.n
f5d63953b7 8361112: Use exact float -> Float16 conversion method in Float16 tests
Backport-of: 549b875866
2026-01-30 13:30:03 +04:00
Matthias Baesken
5bc4dded89 8361871: [GCC static analyzer] complains about use of uninitialized value ckpObject in p11_util.c
Backport-of: 518d5f4bbb
2026-01-30 13:30:03 +04:00
Matthias Baesken
a4852743ae 8361868: [GCC static analyzer] complains about missing calloc - NULL checks in p11_util.c
Backport-of: 1cde536b98
2026-01-30 13:30:02 +04:00
Matthias Baesken
1acafda29c 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX
Backport-of: 166ea12d73
2026-01-30 13:30:01 +04:00
Aleksey Shipilev
30cb64ec03 8361211: C2: Final graph reshaping generates unencodeable klass constants
Backport-of: e304d37996
2026-01-30 13:30:01 +04:00
Aleksey Shipilev
7acd0aac8e 8356324: JVM crash (SIGSEGV at ClassListParser::resolve_indy_impl) during -Xshare:dump starting from 21.0.5
Backport-of: 506625b768
2026-01-30 13:30:00 +04:00
Oli Gillespie
c2f568c46f 8357959: (bf) ByteBuffer.allocateDirect initialization can result in large TTSP spikes
Backport-of: e5ce5c57c8
2026-01-30 13:30:00 +04:00
Alexey Ivanov
7af848abaa 8349188: LineBorder does not scale correctly
Backport-of: 24117c6e9a
2026-01-30 13:30:00 +04:00
Alexey Ivanov
4c08bc4e49 8358813: JPasswordField identifies spaces in password via delete shortcuts
Backport-of: 8d73fe91bc
2026-01-30 13:29:59 +04:00
Alexey Ivanov
09088bc4cf 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
2026-01-30 13:29:59 +04:00
abhishek.n
782dd27206 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java
Backport-of: 1926aeb1a3
2026-01-30 13:29:58 +04:00
William Kemper
44317b5925 8365571: GenShen: PLAB promotions may remain disabled for evacuation threads
Backport-of: 08db4b9962
2026-01-30 13:29:58 +04:00
abhishek.n
83a20ef619 8362207: Add more test cases for possible double-rounding in fma
Backport-of: 6e368e0c69
2026-01-30 13:29:58 +04:00
Doug Simon
58a158bbfc 8365468: EagerJVMCI should only apply to the CompilerBroker JVMCI runtime
Backport-of: e3aeebec17
2026-01-30 13:29:57 +04:00
Thomas Schatzl
f39e740e0f 8364503: gc/g1/TestCodeCacheUnloadDuringConcCycle.java fails because of race printing to stdout
Reviewed-by: shade
Backport-of: c56fb0b6ef
2026-01-30 13:29:57 +04:00
Alexey Ivanov
64e09dd3c0 8365271: Improve Swing supports
Backport-of: 3a925dcd8a7628ea9ad9092a9019198fa7a6f00d
2026-01-30 13:29:56 +04:00
Alexey Ivanov
b3c8a388c3 8366340: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: robm
2026-01-30 13:29:56 +04:00
Alexey Ivanov
646c9e95c9 8366250: Problemlist 3 tests due to failures in the CI pipeline
Reviewed-by: robm
2026-01-30 13:29:56 +04:00
Dingli Zhang
42f03c9a6e 8365844: RISC-V: TestBadFormat.java fails when running without RVV
Backport-of: 584137cf96
2026-01-30 13:29:55 +04:00
Dingli Zhang
7254380239 8365841: RISC-V: Several IR verification tests fail after JDK-8350960 without Zvfh
Backport-of: 2e06a91765
2026-01-30 13:29:55 +04:00
Paul Hohensee
0783ab090b 8279005: sun/tools/jstat tests do not check for test case exit codes after JDK-8245129
Backport-of: c90c31b07e
2026-01-30 13:29:55 +04:00
Jorn Vernee
b4638d2f41 8362169: Pointer passed to upcall may get wrong scope
Backport-of: 9dc62825b5
2026-01-30 13:29:54 +04:00
Matthias Baesken
9b445dba6f 8364996: java/awt/font/FontNames/LocaleFamilyNames.java times out on Windows
Backport-of: 15e8609a2c
2026-01-30 13:29:54 +04:00
Matthias Baesken
c3a8b679cb 8364199: Enhance list of environment variables printed in hserr/hsinfo file
Backport-of: 812bd8e94d
2026-01-30 13:29:53 +04:00
Matthias Baesken
f00eb3d0b1 8363910: Avoid tuning for Power10 CPUs on Linux ppc64le when gcc < 10 is used
Backport-of: 41c94eed37
2026-01-30 13:29:53 +04:00
Shyam Kishor
beb154f649 8362602: Add test.timeout.factor to CompileFactory to avoid test timeouts
Backport-of: f8c8bcf4fd
2026-01-30 13:29:52 +04:00
Thomas Schatzl
34e79ffc01 8350621: Code cache stops scheduling GC
Reviewed-by: shade
Backport-of: 2292246f8c
2026-01-30 13:29:52 +04:00
Thomas Stuefe
6851d806b9 8365307: AIX make fails after JDK-8364611
Backport-of: 391ea15118
2026-01-30 13:29:52 +04:00
Boris Ulasevich
bbc94f6986 8365071: ARM32: JFR intrinsic jvm_commit triggers C2 regalloc assert
Backport-of: f2f7a490c0
2026-01-30 13:29:51 +04:00
Boris Ulasevich
c1cdce3424 8365166: ARM32: missing os::fetch_bcp_from_context implementation
Reviewed-by: shade
Backport-of: 001aaa1e49
2026-01-30 13:29:51 +04:00
Francesco Andreuzzi
f5e833e53a 8357822: C2: Multiple string optimization tests are no longer testing string concatenation optimizations
Backport-of: 6c616c71ec
2026-01-30 13:29:50 +04:00
Trupti Patil
a8f84b1fd9 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
2026-01-30 13:29:50 +04:00
Hari Prasad Kummari
d4909a4a5c 8358048: java/net/httpclient/HttpsTunnelAuthTest.java incorrectly calls Thread::stop
Backport-of: d288ca28be
2026-01-30 13:29:49 +04:00
Hari Prasad Kummari
ed56cdea5f 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
2026-01-30 13:29:49 +04:00
Hari Prasad Kummari
06435e0bd7 8360981: Remove use of Thread.stop in test/jdk/java/net/Socket/DeadlockTest.java
Backport-of: 3263361a28
2026-01-30 13:29:49 +04:00
Coleen Phillimore
e6fbe2620a 8343218: Add option to disable allocating interface and abstract classes in non-class metaspace
Backport-of: da3a5da81b
2026-01-30 13:29:49 +04:00
Martin Doerr
72628ee8fb 8361599: [PPC64] enable missing tests via jtreg requires
Backport-of: 83feb7a238
2026-01-30 13:29:48 +04:00
SendaoYan
3b7f0839f0 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
2026-01-30 13:29:48 +04:00
Ramesh Bhagavatam Gangadhar
ae40c215e8 8356897: Update NSS library to 3.111
Reviewed-by: rhalade
Backport-of: cabd7c1f7a
2026-01-30 13:29:48 +04:00
Aleksey Shipilev
0d9a9b59f4 8357382: runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java#aot fails with Xcomp and C1
Backport-of: 429158218b
2026-01-30 13:29:47 +04:00
Alexey Ivanov
98de6bd6d8 8366075: Problemlist 2 tests due to failures in the CI pipeline
Reviewed-by: robm
2026-01-30 13:29:46 +04:00
Renjith Kannath Pariyangad
e6779bfd57 8364214: Enhance polygon data support
Backport-of: bc74f4a552f4bec37ee3cd870bacef4a0b186c53
2026-01-30 13:29:46 +04:00
Renjith Kannath Pariyangad
df45a19642 8362308: Enhance Bitmap operations
Backport-of: d8ea3bcf8597c7277d6b4bbe23afd33cc41d48fa
2026-01-30 13:29:45 +04:00
Thomas Stuefe
4c62039d1d 8364611: (process) Child process SIGPIPE signal disposition should be default
Reviewed-by: adinn
Backport-of: bdb1646a1e
2026-01-30 13:29:45 +04:00
abhishek.n
67646d48fa 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test
Backport-of: 49a82d8806
2026-01-30 13:29:45 +04:00
Aleksey Shipilev
a102d262e0 8363928: Specifying AOTCacheOutput with a blank path causes the JVM to crash
Backport-of: ea754316fd
2026-01-30 13:29:44 +04:00
Aleksey Shipilev
253c5074e7 8360783: CTW: Skip deoptimization between tiers
Backport-of: cd6caedd0a
2026-01-30 13:29:44 +04:00
David Holmes
b40240ff2a 8364235: Fix for JDK-8361447 breaks the alignment requirements for GuardedMemory
Backport-of: 078d0d4968
2026-01-30 13:29:44 +04:00
Dingli Zhang
f1aa74d323 8365302: RISC-V: compiler/loopopts/superword/TestAlignVector.java fails when vlen=128
Backport-of: 636c61a386
2026-01-30 13:29:44 +04:00
Xiaolong Peng
e43626e130 8361948: Shenandoah: region free capacity unit mismatch
Backport-of: 46988e1073
2026-01-30 13:29:43 +04:00
Dingli Zhang
cd50ccf8d3 8364120: RISC-V: unify the usage of MacroAssembler::instruction_size
Backport-of: 7bf4c608e7
2026-01-30 13:29:43 +04:00
Dingli Zhang
d31ac22aa4 8364150: RISC-V: Leftover for JDK-8343430 removing old trampoline call
Backport-of: 3488f53d2c
2026-01-30 13:29:43 +04:00
Dingli Zhang
7766d8adb3 8365200: RISC-V: compiler/loopopts/superword/TestGeneralizedReductions.java fails with Zvbb and vlen=128
Backport-of: 6927fc3904
2026-01-30 13:29:42 +04:00
skishor
541ef99823 8359207: Remove runtime/signal/TestSigusr2.java since it is always skipped
Reviewed-by: syan
Backport-of: 51877f568b
2026-01-30 13:29:42 +04:00
Chen Liang
bd718557b6 8358535: Changes in ClassValue (JDK-8351996) caused a 1-9% regression in Renaissance-PageRank
Reviewed-by: shade
Backport-of: e13b4c8de9
2026-01-30 13:29:42 +04:00
Alexander Zvegintsev
17d4b3e5a5 8362390: AIX make fails in awt_GraphicsEnv.c
Backport-of: 18190519e7
2026-01-30 13:29:41 +04:00
Alexander Zvegintsev
9228f16f6c 8354415: [Ubuntu25.04] api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayMode - setDisplayMode_REFRESH_RATE_UNKNOWN fails: Height is different on vnc
Backport-of: 18c2e40de7
2026-01-30 13:29:41 +04:00
Ao Qi
640ab99d5a 8364177: JDK fails to build due to undefined symbol in libpng on LoongArch64
Backport-of: a9f3d3a290
2026-01-30 13:29:41 +04:00
Matthias Baesken
12a6bf90e9 8360518: Docker tests do not work when asan is configured
Backport-of: 01b15bc1f9
2026-01-30 13:29:40 +04:00
Aleksey Shipilev
0b8eb84de1 8360255: runtime/jni/checked/TestLargeUTF8Length.java fails with -XX:-CompactStrings
Backport-of: 1ca008fd02
2026-01-30 13:29:40 +04:00
Aleksey Shipilev
58ba6582cc 8361180: Disable CompiledDirectCall verification with -VerifyInlineCaches
Backport-of: 1ac7489874
2026-01-30 13:29:40 +04:00
Aleksey Shipilev
5c7cfac06a 8343546: GHA: Cache required dependencies in master-branch workflow
Backport-of: 1fa772e814
2026-01-30 13:29:39 +04:00
SendaoYan
437432aaa0 8362834: Several runtime/Thread tests should mark as /native
Backport-of: 699b8112f8
2026-01-30 13:29:39 +04:00
Dingli Zhang
46de53bb10 8362515: RISC-V: cleanup NativeFarCall
Backport-of: 3e2d12d85a
2026-01-30 13:29:38 +04:00
SendaoYan
e372a51bfe 8362482: [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java: System.gc() does not provide full GC
Reviewed-by: rrich
Backport-of: b4028c91d5
2026-01-30 13:29:38 +04:00
SendaoYan
feb1877e32 8362379: Test serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java should mark as /native
Backport-of: ee0bcc5526
2026-01-30 13:29:38 +04:00
Trupti Patil
406fb26778 8355478: DoubleActionESC.java fails intermittently
Backport-of: d1052c70cb
2026-01-30 13:29:37 +04:00
Srinivas Mandalika
f2e04acb95 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
2026-01-30 13:29:37 +04:00
Aleksey Shipilev
370c9233bc 8361478: GHA: Use MSYS2 from GHA runners
Backport-of: ed9066bdf4
2026-01-30 13:29:36 +04:00
Aleksey Shipilev
9bd52af67e 8361255: CTW: Tolerate more NCDFE problems
Backport-of: a201be8555
2026-01-30 13:29:36 +04:00
Aleksey Shipilev
9a617c8826 8360867: CTW: Disable inline cache verification
Backport-of: aa1911191c
2026-01-30 13:29:36 +04:00
Ludvig Janiuk
d9b3c73ca5 8365260: Problemlist 1 test due to failures in the CI pipeline
Reviewed-by: aivanov
2026-01-30 13:29:35 +04:00
Yasumasa Suenaga
87642d4a7c 8364090: Dump JFR recording on CrashOnOutOfMemoryError
Backport-of: 8ed214f3b1
2026-01-30 13:29:35 +04:00
Dingli Zhang
99f37afe26 8361449: RISC-V: Code cleanup for native call
Backport-of: 5edd546585
2026-01-30 13:29:35 +04:00
Shruthi Acharya
9499121dbf 8317801: java/net/Socket/asyncClose/Race.java fails intermittently (aix)
Backport-of: 8f121a173c
2026-01-30 13:29:34 +04:00
SendaoYan
5c09f2e93b 8362855: Test java/net/ipv6tests/TcpTest.java should report SkippedException when there no ia4addr or ia6addr
Backport-of: 8fcbb110e9
2026-01-30 13:29:34 +04:00
SendaoYan
fbe6b30d74 8364114: Test TestHugePageDecisionsAtVMStartup.java#LP_enabled fails when no free hugepage
Backport-of: 3b0da29879
2026-01-30 13:29:33 +04:00
Maheshkumar Bollapragada
6d5042288a 8359687: Use PassFailJFrame for java/awt/print/Dialog/DialogType.java
Backport-of: de34bb8e66
2026-01-30 13:29:33 +04:00
SendaoYan
e768046831 8362501: Update test/hotspot/jtreg/applications/jcstress/README
Backport-of: 559795b0eb
2026-01-30 13:29:33 +04:00
Dingli Zhang
462284c399 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls
Backport-of: 1a01839f8c
2026-01-30 13:29:32 +04:00
Dingli Zhang
982f64f6aa 8362596: RISC-V: Improve _vectorizedHashCode intrinsic
Backport-of: 4189fcbac4
2026-01-30 13:29:32 +04:00
Ao Qi
3d4c442497 8363895: Minimal build fails with slowdebug builds after JDK-8354887
Reviewed-by: kvn
Backport-of: 2da0cdadb8
2026-01-30 13:29:32 +04:00
Fei Yang
cc70761641 8360520: RISC-V: C1: Fix primitive array clone intrinsic regression after JDK-8333154
Backport-of: e6ac956a7a
2026-01-30 13:29:31 +04:00
Sarvesh KumarJain
2e451d45e7 8357799: Improve instructions for JFileChooser/HTMLFileName.java
Backport-of: 53a83d15a1
2026-01-30 13:29:31 +04:00
Aleksey Shipilev
7fb6b4c8a5 8363965: GHA: Switch cross-compiling sysroots to Debian bookworm
Backport-of: 3fe0d29ec3
2026-01-30 13:29:30 +04:00
Matthias Baesken
e245c24ed0 8351487: [ubsan] jvmti.h runtime error: load of value which is not a valid value
Backport-of: bf3cfbeff4
2026-01-30 13:29:30 +04:00
Matthias Baesken
db37e6e95b 8360791: [ubsan] Adjust signal handling
Backport-of: aeca49e43f
2026-01-30 13:29:30 +04:00
Matthias Baesken
492a761f29 8361959: [GCC static analyzer] java_props_md.c leak of 'temp' variable is reported
Backport-of: bf225c201f
2026-01-30 13:29:29 +04:00
Matthias Baesken
c82c045321 8361888: [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode
Backport-of: b85440d085
2026-01-30 13:29:29 +04:00
Hari Prasad Kummari
3060684607 8354447: Missing test for retroactive @SuppressWarnings("dangling-doc-comments") behavior
Backport-of: 0e725c6fb1
2026-01-30 13:29:28 +04:00
Hari Prasad Kummari
e1ce2cc75e 8360022: ClassRefDupInConstantPoolTest.java fails when running in repeat
Backport-of: 566279af49
2026-01-30 13:29:28 +04:00
Matthias Baesken
4abbb3d61e 8361198: [AIX] fix misleading error output in thread_cpu_time_unchecked
Backport-of: 2528c620a6
2026-01-30 13:29:27 +04:00
Dingli Zhang
f63640d867 8363898: RISC-V: TestRangeCheckHoistingScaledIV.java fails after JDK-8355293 when running without RVV
Backport-of: b746701e57
2026-01-30 13:29:27 +04:00
SendaoYan
836961f4a5 8359827: Test runtime/Thread/ThreadCountLimit.java need loop increasing the limit
Backport-of: fc8038441d
2026-01-30 13:29:26 +04:00
Feilong Jiang
6d8b977b63 8362838: RISC-V: Incorrect matching rule leading to improper oop instruction encoding
Backport-of: 0ba2942c6e
2026-01-30 13:29:26 +04:00
Fei Yang
49946dbc4a 8361504: RISC-V: Make C1 clone intrinsic platform guard more specific
Backport-of: 54e37629f6
2026-01-30 13:29:26 +04:00
Manukumar V S
51098b8024 8358697: TextLayout/MyanmarTextTest.java passes if no Myanmar font is found
Backport-of: bcad87eacb
2026-01-30 13:29:25 +04:00
Dingli Zhang
09d78d723c 8357694: RISC-V: Several IR verification tests fail when vlen=128
Backport-of: 15b5b54ac7
2026-01-30 13:29:24 +04:00
Aleksey Shipilev
3e04f02c07 8362582: GHA: Increase bundle retention time to deal with infra overload better
Backport-of: 1bd683b588
2026-01-30 13:29:24 +04:00
Hari Prasad Kummari
4d2fcd4d35 8359127: Amend java/nio/channels/DatagramChannel/PromiscuousIPv6.java to use @requires for OS platform selection
Backport-of: 78b1360e7d
2026-01-30 13:29:23 +04:00
Artem Semenov
7dca0ae64d 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
2026-01-30 13:29:23 +04:00
Nibedita Jena
bf2375a9b8 8362107: Update the Jan CPU26_01 release date in master branch after forking Oct CPU25_10
Reviewed-by: coffeys, rreddy
2026-01-30 13:29:23 +04:00
Vitaly Provodin
2acd509800 JBR-4154 modify searching jbr tag 2026-01-30 13:29:07 +04:00
Nikita Tsarev
eb618a76e5 JBR-9865 Wayland: More granular locking in clipboard
This patch removes holding a clipboard-global lock when receiving data
by reading from a pipe, since that has the potential to cause deadlocks
under specific circumstances.

To synchronize destroying the offer objects on the Java side, they are
now refcounted.
2026-01-29 15:20:56 +01:00
Maxim Kartashev
9feb6888c4 JBR-9884 Wayland: logical screen size reported incorrectly when fractional scaling is OFF
The size is corrected only under -Dsun.awt.wl.correctLogicalSize=true.
The location is unchanged.
2026-01-29 15:03:55 +04:00
Vladimir Dvorak
e5c4d9b1ee JBR-9692 DCEVM Callback after redefinition 2026-01-28 20:49:51 +01:00
Vitaly Provodin
2357d1aa2e JBR-9855 provide JBR25 with AL2 (glibc 2.26) support 2026-01-24 01:57:03 +04:00
Maxim Kartashev
c246c84e1a JBR-9902 Wayland: support modal dialogs without native modality aid 2026-01-23 16:44:49 +04:00
Maxim Kartashev
c70a979754 JBR-9912 Wayland: humburger menu disappears prematurely 2026-01-23 15:58:50 +04:00
Maxim Kartashev
79aab1b368 JBR-9911 Wayland: window can be moved by accident 2026-01-23 11:30:32 +04:00
Nikita Provotorov
ff979cccfc JBR-9904: Wayland: double shift or double ctrl is not working well after press space or alt key.
Fixing the timestamps of each KeyEvent/MouseEvent/MouseWheelEvent created by WLToolkit.

(cherry picked from commit 4d1f4d9cbd)
2026-01-22 14:59:20 +01:00
Maxim Kartashev
f3dcf6dd51 JBR-9803 Wayland: MOUSE_CLICKED event follows MOUSE_DRAG 2026-01-22 09:59:24 +04:00
Vitaly Provodin
33b1fb1d10 update exclude list on results of 25.0.1_272.54 test runs 2026-01-22 02:03:55 +04:00
Nikita Tsarev
1f3c13d214 JBR-9898 Wayland: Keep clipboard ownership when copying within the same process
This patch makes the WLClipboard not call lostOwnershipNow() when a data
offer is available that was made previously by this clipboard. To do
this, WLClipboard's data sources announce a random cookie string as one
of the supported mime types. This string is then checked for when
receiving a data offer.
2026-01-20 11:06:51 +01:00
Maxim Kartashev
79d45515f3 JBR-9893 Closed and disposed windows leak through WLGraphicsDevice.toplevels 2026-01-20 11:55:47 +04:00
Vitaly Provodin
0578580ddf update exclude list on results of 25.0.1_268.49 test runs 2026-01-16 03:28:23 +04:00
Vitaly Provodin
0bbd7a85f1 JBR-9759 revert OpenJDK changes causing the issue with links in Quick Documentation popup
this commit reverts
8335967: "text-decoration: none" does not work with "A" HTML tags
and
8326734: text-decoration applied to <span> lost when mixed with <u> or <s>
8325620: HTMLReader uses ConvertAction instead of specified CharacterAction for <b>, <i>, <u>
2026-01-16 01:52:50 +04:00
Maxim Kartashev
6892269bc7 JBR-9871 Wayland: undecorated window crashes on close 2026-01-15 09:36:15 +04:00
Maxim Kartashev
0c3cf6deb1 JBR-9875 On wayland modal dialog moves the parent window when dragged
Support for gnome-specific dialog modality is disabled by default.
Use -Dsun.awt.wl.NativeModality=true to enable.
2026-01-14 19:02:14 +04:00
Nikita Tsarev
e95e7e74c6 JBR-9874 Wayland: Add certain XF86 keysyms 2026-01-14 12:47:54 +01:00
Vitaly Provodin
43e9e15a78 update exclude list on results of 25.0.1_266.34 test runs 2026-01-09 01:51:46 +04:00
Vitaly Provodin
07f9c797a0 update exclude list on results of 25.0.1_259.33 test runs 2025-12-27 04:38:16 +04:00
Vladimir Lagunov
7dc3ddd974 JBR-9779 io-over-nio: RandomAccessFile now can open Windows pipes
The WinAPI function `GetFileAttributesW` actually opens a file and immediately closes it. If the file is a named pipe, it triggers a connection to the listener of the pipe. The listener closes the connection also asynchronously.

If the pipe is created with `nMaxInstances=1`, this code does not work:

```java
var path = Path.of("""\\.\pipe\openssh-ssh-agent""")

// `readAttributes` calls `GetFileAttributesW`, it opens the file and then closes it.
if (Files.readAttributes(path, BasicFileAttributes.class).isRegularFile()) {
  // Very probable race condition: the listener of the pipe has already received
  // the request of opening the file triggered by `GetFileAttributesW`
  // but hasn't closed the connection on their side yet.
  Files.newByteChannel(path);  // Fails with ERROR_PIPE_BUSY.
}
```

This revision adds an explicit check if some file looks like a Windows pipe. In these cases `RandomAccessFile` and `FileInputStream` don't call `Files.readAttributes` for the file.
2025-12-22 13:16:30 +01:00
Vladimir Lagunov
a3fdce3eb8 JBR-9779 Refactor: extract common logic for getting nio path in FileInputStream, RandomAccessFile, and FileOutputStream 2025-12-22 13:04:05 +01:00
Vitaly Provodin
c9ff46a1db JBR-9756 take JBR debug symbols from images/symbols 2025-12-18 05:54:46 +04:00
Vladimir Lagunov
f22792bf7e JBR-9797 Enable jbr.java.io.over.nio in JBR 25 2025-12-17 16:23:02 +01:00
Maxim Kartashev
b86151562f JBR-9768 sources/TestNoNULL.java: 'NULL' found in src/hotspot/share/runtime/arguments.cpp at line 3878 2025-12-11 12:09:19 +04:00
Vladimir Dvorak
00dfb2b2ce JBR-9757 DCEVM: Nullify MemberName in MethodHandle for invokevirtual/invokeinterface 2025-12-08 19:31:04 +01:00
Vitaly Provodin
4c46c41847 update exclude list based on the outcomes of agent updates: linux-6.14.0-1015-aws -> linux-6.14.0-1017-aws 2025-12-08 14:26:07 +04:00
819 changed files with 19485 additions and 11705 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/*
- main
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 == "main" ]]; 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:
@@ -314,6 +357,7 @@ jobs:
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:
@@ -328,6 +372,7 @@ jobs:
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-updates
jbs=JDK
version=25.0.1
version=25.0.2
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright

View File

@@ -48,7 +48,7 @@ VERSION_PATCH=$(getVersionProp "DEFAULT_VERSION_PATCH")
[[ $VERSION_PATCH = 0 ]] || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}.${VERSION_PATCH}"
echo "##teamcity[setParameter name='env.JBSDK_VERSION' value='${JBSDK_VERSION}']"
tag_prefix="jbr-"
OPENJDK_TAG=$(git log --simplify-by-decoration --decorate=short --pretty=short | grep "${tag_prefix}${JBSDK_VERSION}" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -V -f | tail -n 1 | tr -d ",")
OPENJDK_TAG=$(git tag -l "${tag_prefix}${JBSDK_VERSION}*")
JDK_BUILD_NUMBER=$(echo $OPENJDK_TAG | awk -F "-|[+]" '{print $3}')
[ -z $JDK_BUILD_NUMBER ] && JDK_BUILD_NUMBER=1
re='^[0-9]+$'
@@ -109,6 +109,12 @@ else
WITH_BUNDLED_FREETYPE=""
fi
if [ "$bundle_type" == "lb" ]; then
WITH_VULKAN=""
else
WITH_VULKAN="--with-vulkan"
fi
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
--with-hotspot-build-time=$BUILD_TIME
--with-copyright-year=$COPYRIGHT_YEAR
@@ -132,6 +138,20 @@ function zip_native_debug_symbols() {
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
}
function zip_native_debug_symbols_win() {
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
jdk_name=$(echo $1 | cut -d"/" -f5)
jbr_pdb_name=$2
[ -d "$jbr_pdb_name" ] && rm -rf $jbr_pdb_name
mkdir $jbr_pdb_name
rsync_target="../../../../"$jbr_pdb_name
(cd $image_bundle_path && find . -name '*' -exec rsync -R {} $rsync_target \;)
(/usr/bin/zip -r $jbr_pdb_name.zip $jbr_pdb_name) || do_exit $?
}
function do_exit() {
exit_code=$1
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java

View File

@@ -54,7 +54,7 @@ function do_configure {
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
--with-gtk-shell1-protocol=$GTK_SHELL_PATH \
--with-vulkan \
$WITH_VULKAN \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
@@ -102,7 +102,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
@@ -133,6 +133,11 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;

View File

@@ -50,12 +50,6 @@ function do_configure {
fi
fi
if [ -n "${JCEF_BUILD_LEGACY:-}" ]; then
WITH_VULKAN=""
else
WITH_VULKAN="--with-vulkan"
fi
sh configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
@@ -122,7 +116,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
@@ -156,6 +150,11 @@ case "$bundle_type" in
jbrsdk_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
jbrsdk_name_postfix="_${bundle_type}"
@@ -186,7 +185,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -199,7 +198,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ]|| [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -69,7 +69,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)

View File

@@ -96,7 +96,7 @@ function create_image_bundle {
mv release $JRE_CONTENTS/Home/release
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
if [ "$bundle_type" == "jcef" ]; then

View File

@@ -80,6 +80,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

View File

@@ -73,6 +73,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

View File

@@ -69,6 +69,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

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

@@ -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

@@ -504,6 +504,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

@@ -166,12 +166,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

@@ -295,7 +295,7 @@ define SetupJavaCompilationBody
ifeq ($$($1_PROCESS_JBR_API), true)
# Automatic path conversion doesn't work for two arguments, so call fixpath manually
$1_JBR_API_FLAGS := -Xplugin:"jbr-api $$(call FixPath, $$($1_BIN)/java.base/META-INF/jbrapi.registry) $$(call FixPath, $(TOPDIR)/jb/jbr-api.version)"
$1_JBR_API_FLAGS := -Xplugin:"jbr-api $$(call FixPath, $$($1_BIN)/java.base/META-INF/jbrapi) $$(call FixPath, $(TOPDIR)/jb/jbr-api.version)"
$1_EXTRA_DEPS := $$($1_EXTRA_DEPS) $$(BUILDTOOLS_OUTPUTDIR)/plugins/_the.COMPILE_JBR_API_PLUGIN_batch
endif

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,12 +28,12 @@
DEFAULT_VERSION_FEATURE=25
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=1
DEFAULT_VERSION_UPDATE=2
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2025-10-21
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

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

@@ -198,34 +198,35 @@ public class JBRApiPlugin implements Plugin {
return unresolvedErrors;
}
void read(RandomAccessFile file) throws IOException {
void read(RandomAccessFile file, boolean internal) throws IOException {
String s;
while ((s = file.readLine()) != null) {
String[] tokens = s.split(" ");
switch (tokens[0]) {
case "TYPE" -> {
types.put(tokens[1], new Type(tokens[2], Binding.valueOf(tokens[3])));
if (tokens.length > 4 && tokens[4].equals("INTERNAL")) internal.add(tokens[1]);
}
case "VERSION" -> {}
case "STATIC" -> {
StaticDescriptor descriptor = new StaticDescriptor(new StaticMethod(
tokens[1], tokens[2]), tokens[3]);
methods.put(descriptor, new StaticMethod(tokens[4], tokens[5]));
if (tokens.length > 6 && tokens[6].equals("INTERNAL")) internal.add(descriptor);
if (internal) this.internal.add(descriptor);
}
default -> {
types.put(tokens[1], new Type(tokens[2], Binding.valueOf(tokens[0])));
if (internal) this.internal.add(tokens[1]);
}
}
}
}
void write(RandomAccessFile file) throws IOException {
void write(RandomAccessFile pub, RandomAccessFile priv) throws IOException {
for (var t : types.entrySet()) {
file.writeBytes("TYPE " + t.getKey() + " " + t.getValue().type + " " + t.getValue().binding +
(internal.contains(t.getKey()) ? " INTERNAL\n" : "\n"));
(internal.contains(t.getKey()) ? priv : pub).writeBytes(
t.getValue().binding + " " + t.getKey() + " " + t.getValue().type + "\n");
}
for (var t : methods.entrySet()) {
file.writeBytes("STATIC " + t.getKey().method.type + " " + t.getKey().method.name + " " +
t.getKey().descriptor + " " + t.getValue().type + " " + t.getValue().name +
(internal.contains(t.getKey()) ? " INTERNAL\n" : "\n"));
(internal.contains(t.getKey()) ? priv : pub).writeBytes(
"STATIC " + t.getKey().method.type + " " + t.getKey().method.name + " " +
t.getKey().descriptor + " " + t.getValue().type + " " + t.getValue().name + "\n");
}
}
}
@@ -399,7 +400,7 @@ public class JBRApiPlugin implements Plugin {
@Override
public void init(JavacTask jt, String... args) {
Path output = Path.of(args[0]);
Path pubPath = Path.of(args[0] + ".public"), privPath = Path.of(args[0] + ".private");
String implVersion;
try {
implVersion = Files.readString(Path.of(args[1])).strip();
@@ -426,18 +427,21 @@ public class JBRApiPlugin implements Plugin {
}
}.scan(te.getTypeElement(), te.getCompilationUnit());
} else if (te.getKind() == TaskEvent.Kind.COMPILATION) {
try (RandomAccessFile file = new RandomAccessFile(output.toFile(), "rw");
FileChannel channel = file.getChannel()) {
try (RandomAccessFile pub = new RandomAccessFile(pubPath.toFile(), "rw");
RandomAccessFile priv = new RandomAccessFile(privPath.toFile(), "rw");
FileChannel channel = pub.getChannel()) {
for (;;) {
try { if (channel.lock() != null) break; } catch (OverlappingFileLockException ignore) {}
LockSupport.parkNanos(10_000000);
}
Registry r = new Registry();
r.read(file);
r.read(pub, false);
r.read(priv, true);
var unresolvedErrors = r.addBindings();
file.setLength(0);
file.writeBytes("VERSION " + implVersion + "\n");
r.write(file);
priv.setLength(0);
pub.setLength(0);
pub.writeBytes("VERSION " + implVersion + "\n");
r.write(pub, priv);
if (!unresolvedErrors.isEmpty()) {
throw new RuntimeException(String.join("\n", unresolvedErrors));
}

View File

@@ -179,7 +179,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

@@ -64,7 +64,8 @@ BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libLogEventTest := 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
@@ -153,6 +154,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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -97,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)) {

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);
@@ -2393,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 __
@@ -2412,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.
@@ -2491,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,
@@ -3402,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) {
@@ -3412,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);
}
@@ -3773,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 {
@@ -5019,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));
@@ -5113,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() {
@@ -5877,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);
@@ -5893,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);
}
@@ -5957,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);
@@ -1240,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);
@@ -1431,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) {
@@ -1644,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);
@@ -1701,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) &&
@@ -1725,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) &&
@@ -1742,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);
@@ -1753,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);
@@ -1764,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);
}
@@ -1774,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");
@@ -8576,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);
%}
@@ -8596,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);
%}
@@ -8958,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" %}
@@ -10529,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
@@ -10546,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
@@ -10563,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
@@ -10580,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,13 +200,8 @@ 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 that could depend on RVV.
@@ -476,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);
@@ -16292,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) {
@@ -16350,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

@@ -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

@@ -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

@@ -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).
//
@@ -1015,16 +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);
}
if (!UseAPX) {
_features.clear_feature(CPU_APX_F);
}
if (UseAVX < 2) {
_features.clear_feature(CPU_AVX2);
@@ -1048,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);
@@ -1067,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;
}
@@ -2932,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 &&

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

@@ -2508,7 +2508,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;
}
@@ -2519,7 +2519,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;
}
@@ -2350,6 +2359,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

@@ -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

@@ -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

@@ -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 " \

View File

@@ -1271,7 +1271,7 @@ void MetaspaceShared::unrecoverable_loading_error(const char* message) {
} else if (CDSConfig::new_aot_flags_used()) {
vm_exit_during_initialization("Unable to use AOT cache.", nullptr);
} else {
vm_exit_during_initialization("Unable to use shared archive.", nullptr);
vm_exit_during_initialization("Unable to use shared archive. Unrecoverable archive loading error (run with -Xlog:aot,cds for details)", message);
}
}
@@ -1395,6 +1395,7 @@ FileMapInfo* MetaspaceShared::open_static_archive() {
FileMapInfo* mapinfo = new FileMapInfo(static_archive, true);
if (!mapinfo->open_as_input()) {
delete(mapinfo);
log_info(cds)("Opening of static archive %s failed", static_archive);
return nullptr;
}
return mapinfo;

View File

@@ -80,6 +80,7 @@ friend class ciObjectFactory; \
// Any more access must be given explicitly.
#define CI_PACKAGE_ACCESS_TO \
friend class ciObjectFactory; \
friend class VMStructs; \
friend class ciCallSite; \
friend class ciConstantPoolCache; \
friend class ciField; \

View File

@@ -107,7 +107,7 @@ public:
bool is_in_encoding_range() {
Klass* k = get_Klass();
bool is_in_encoding_range = CompressedKlassPointers::is_encodable(k);
assert(is_in_encoding_range || k->is_interface() || k->is_abstract(), "sanity");
assert(is_in_encoding_range, "sanity");
return is_in_encoding_range;
}

View File

@@ -802,7 +802,7 @@ class CompileReplay : public StackObj {
// Make sure the existence of a prior compile doesn't stop this one
nmethod* nm = (entry_bci != InvocationEntryBci) ? method->lookup_osr_nmethod_for(entry_bci, comp_level, true) : method->code();
if (nm != nullptr) {
nm->make_not_entrant("CI replay");
nm->make_not_entrant(nmethod::ChangeReason::CI_replay);
}
replay_state = this;
CompileBroker::compile_method(methodHandle(THREAD, method), entry_bci, comp_level,

View File

@@ -5852,15 +5852,6 @@ bool ClassFileParser::is_java_lang_ref_Reference_subclass() const {
return _super_klass->reference_type() != REF_NONE;
}
// Returns true if the future Klass will need to be addressable with a narrow Klass ID.
bool ClassFileParser::klass_needs_narrow_id() const {
// Classes that are never instantiated need no narrow Klass Id, since the
// only point of having a narrow id is to put it into an object header. Keeping
// never instantiated classes out of class space lessens the class space pressure.
// For more details, see JDK-8338526.
return !is_interface() && !is_abstract();
}
// ----------------------------------------------------------------------------
// debugging

View File

@@ -526,11 +526,6 @@ class ClassFileParser {
bool is_hidden() const { return _is_hidden; }
bool is_interface() const { return _access_flags.is_interface(); }
bool is_abstract() const { return _access_flags.is_abstract(); }
// Returns true if the Klass to be generated will need to be addressable
// with a narrow Klass ID.
bool klass_needs_narrow_id() const;
ClassLoaderData* loader_data() const { return _loader_data; }
const Symbol* class_name() const { return _class_name; }

View File

@@ -90,7 +90,7 @@ DEBUG_ONLY(bool SystemDictionaryShared::_class_loading_may_happen = true;)
#ifdef ASSERT
static void check_klass_after_loading(const Klass* k) {
#ifdef _LP64
if (k != nullptr && UseCompressedClassPointers && k->needs_narrow_id()) {
if (k != nullptr && UseCompressedClassPointers) {
CompressedKlassPointers::check_encodable(k);
}
#endif

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