Compare commits

..

417 Commits

Author SHA1 Message Date
Jatin Bhateja
6d36eb78ad 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target.
Reviewed-by: epeter, sviswanathan
2024-01-25 10:07:50 +00:00
Jaikiran Pai
9d1a6d1484 8323645: Remove unused internal sun.net.www.protocol.jar.URLJarFileCallBack interface
Reviewed-by: alanb, dfuchs
2024-01-25 09:35:35 +00:00
Kim Barrett
3059c3b69e 8324242: Avoid null check for OopHandle::ptr_raw()
Reviewed-by: shade, jsjolen, coleenp
2024-01-25 05:44:18 +00:00
David Holmes
929af9ed03 8307788: vmTestbase/gc/gctests/LargeObjects/large003/TestDescription.java timed out
Reviewed-by: lmesnik, shade
2024-01-25 05:26:13 +00:00
MaxXSoft
e7fdac9d5c 8324280: RISC-V: Incorrect implementation in VM_Version::parse_satp_mode
Reviewed-by: rehn, fyang
2024-01-25 03:10:28 +00:00
Justin Lu
3d32c460eb 6503196: API doc for DecimalFormat::getMaximumIntegerDigits is unclear
Reviewed-by: naoto, iris
2024-01-24 23:42:53 +00:00
Jie Fu
2d5cb97288 8324647: Invalid test group of lib-test after JDK-8323515
Reviewed-by: shade
2024-01-24 23:25:17 +00:00
Alexander Zuev
6212264cc6 8320692: Null icon returned for .exe without custom icon
Co-authored-by: Alexey Ivanov <aivanov@openjdk.org>
Reviewed-by: aivanov
2024-01-24 22:10:28 +00:00
William Kemper
32eb5290c2 8324553: Shenandoah: Move periodic tasks closer to their collaborators
Reviewed-by: kdnilsen, shade
2024-01-24 19:15:21 +00:00
Christian Stein
c702dcabf8 8323815: Source launcher should find classes with $ in names
Reviewed-by: jlahoda, sundar
2024-01-24 19:05:15 +00:00
Joshua Cao
c432dc008b 8322149: ConcurrentHashMap smarter presizing for copy constructor and putAll
Reviewed-by: shade, simonis
2024-01-24 18:52:38 +00:00
Aleksey Shipilev
fb822e49f2 8324514: ClassLoaderData::print_on should print address of class loader
Reviewed-by: kbarrett, coleenp
2024-01-24 17:40:22 +00:00
Raffaello Giulietti
00bb6bf509 8324220: jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java had 22 failures
Reviewed-by: egahlin
2024-01-24 16:19:46 +00:00
Albert Mingkun Yang
bccd823c8e 8324613: Serial: Rename GenerationPool to TenuredGenerationPool
Reviewed-by: stefank
2024-01-24 13:03:03 +00:00
Thomas Schatzl
8c003d83c4 8321512: runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java fails on 32-bit platforms
Reviewed-by: shade, iwalulya
2024-01-24 12:00:17 +00:00
Magnus Ihse Bursie
67f29b16ef 8324537: Remove superfluous _FILE_OFFSET_BITS=64
Reviewed-by: shade, erikj, kbarrett
2024-01-24 10:09:05 +00:00
Albert Mingkun Yang
1c1cb048cd 8324512: Serial: Remove Generation::Name
Reviewed-by: stefank, iwalulya, cjplummer
2024-01-24 10:02:28 +00:00
Albert Mingkun Yang
b65e5eb14e 8324543: Remove Space::object_iterate
Reviewed-by: stefank, kbarrett
2024-01-24 10:02:18 +00:00
David Holmes
6d2f6408e4 8324578: [BACKOUT] [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
Reviewed-by: darcy, kvn
2024-01-24 03:14:01 +00:00
William Kemper
c17059dee7 8324334: Shenandoah: Improve end of process report
Reviewed-by: kdnilsen, ysr
2024-01-24 02:08:11 +00:00
Justin Lu
96607df7f0 8321545: Override toString() for Format subclasses
Reviewed-by: naoto, rriggs
2024-01-23 22:22:16 +00:00
Chris Plummer
edfee7f348 8323546: Cleanup jcmd docs for Compiler.perfmap and VM.cds filename parameter
Reviewed-by: dholmes, sspitsyn, iklam
2024-01-23 20:33:49 +00:00
Aleksey Shipilev
8b9bf75880 8323515: Create test alias "all" for all test roots
Reviewed-by: dholmes, alanb, joehw, lmesnik
2024-01-23 17:03:35 +00:00
Gerard Ziemski
3d8236367d 8300088: [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
Reviewed-by: dholmes, fparain, dcubed
2024-01-23 16:15:59 +00:00
Albert Mingkun Yang
2a01c798d3 8324513: Inline ContiguousSpace::object_iterate_from
Reviewed-by: stefank
2024-01-23 15:51:58 +00:00
Darragh Clarke
fbaaac63d4 8314164: java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fails intermittently in timeout
Reviewed-by: dfuchs, djelinski
2024-01-23 14:07:17 +00:00
sendaoYan
791b427f44 8323640: [TESTBUG]testMemoryFailCount in jdk/internal/platform/docker/TestDockerMemoryMetrics.java always fail because OOM killed
Reviewed-by: sgehwolf
2024-01-23 13:19:49 +00:00
Hamlin Li
bcaad515fd 8318228: RISC-V: C2 ConvF2HF
Reviewed-by: fyang, vkempik
2024-01-23 12:02:28 +00:00
Albert Mingkun Yang
5acd37fa96 8324207: Serial: Remove Space::set_saved_mark_word
Reviewed-by: tschatzl, stefank
2024-01-23 09:40:09 +00:00
Albert Mingkun Yang
f5e6d111b1 8324210: Serial: Remove unused methods in Generation
Reviewed-by: tschatzl, stefank
2024-01-23 09:38:47 +00:00
Kim Barrett
bcb340da09 8324286: Fix backsliding on use of nullptr instead of NULL
Reviewed-by: jsjolen, coleenp, jwaters
2024-01-23 08:49:46 +00:00
Matthias Baesken
3696765b7d 8323964: runtime/Thread/ThreadCountLimit.java fails intermittently on AIX
Reviewed-by: dholmes, stuefe
2024-01-23 08:17:00 +00:00
David Holmes
5a74c2a67e 8323438: Enhance assertions for Windows sync API failures
Reviewed-by: ccheung, jwaters, dcubed
2024-01-23 01:09:14 +00:00
Vladimir Kozlov
52523d33dd 8324050: Issue store-store barrier after re-materializing objects during deoptimization
Reviewed-by: dlong, shade
2024-01-22 22:50:32 +00:00
Y. Srinivas Ramakrishna
df370d725e 8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot
AgeTable changes:
1. add CHeap allocation spec
2. add a non-product const is_clear() method to check if the age table has only zero entries
3. relax the assertion that the 0th index of the age table is never used, to allow use of that slot

Reviewed-by: wkemper, kdnilsen, ayang, shade
2024-01-22 19:51:47 +00:00
Naoto Sato
0d8543d677 8324065: Daylight saving information for Africa/Casablanca are incorrect
Reviewed-by: iris, joehw, jlu
2024-01-22 17:15:53 +00:00
Jan Lahoda
c9cacfb25d 8323657: Compilation of snippet results in VerifyError at runtime with --release 9 (and above)
Reviewed-by: vromero
2024-01-22 13:06:19 +00:00
Aleksey Shipilev
bde650f21e 8322282: Incorrect LoaderConstraintTable::add_entry after JDK-8298468
Reviewed-by: dholmes, simonis, coleenp
2024-01-22 12:30:36 +00:00
Tobias Holenstein
be943a9fd6 8321984: IGV: Upgrade to Netbeans Platform 20
Reviewed-by: rcastanedalo, chagedorn
2024-01-22 12:18:22 +00:00
Johan Sjölen
d3b2ac1507 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"
Reviewed-by: lkorinth, dholmes
2024-01-22 11:03:39 +00:00
Jan Lahoda
72f199024d 8323057: Recoverable errors may be reported before unrecoverable errors when annotation processing is skipped
Reviewed-by: vromero
2024-01-22 10:55:10 +00:00
Emanuel Peter
c84af49386 8324129: C2: Remove some ttyLocker usages in preparation for JDK-8306767
Reviewed-by: kvn, vlivanov, dholmes
2024-01-22 10:41:36 +00:00
Hamlin Li
fd372629f7 8323748: RISC-V: Add Zfh probe code
Reviewed-by: fyang
2024-01-22 10:14:25 +00:00
Cesar Soares Lucas
76afa02dab 8322572: AllocationMergesTests.java fails with "IRViolationException: There were one or multiple IR rule failures."
Reviewed-by: kvn, thartmann
2024-01-22 08:22:33 +00:00
Martin Desruisseaux
2003610b3b 8323108: BufferedImage.setData(Raster) should not cast float and double values to integers
Reviewed-by: prr, bpb, serb
2024-01-21 23:47:51 +00:00
Kim Barrett
a474b37212 8324240: Remove unused GrowableArrayView::EMPTY
Reviewed-by: dcubed
2024-01-21 02:28:54 +00:00
Erik Gahlin
68b5aab020 8324229: JFR: Temporarily disable assertion for missing object reference
Reviewed-by: mgronlun
2024-01-20 18:21:45 +00:00
Jonathan Gibbons
f54a336cb7 8324231: bad command-line option in make/Docs.gmk
Reviewed-by: erikj
2024-01-20 18:12:44 +00:00
Sam James
f4d08ccf80 8318696: Do not use LFS64 symbols on Linux
Reviewed-by: ihse, dholmes, kbarrett, mbaesken
2024-01-20 09:49:44 +00:00
Magnus Ihse Bursie
9049402a1b 8323675: Race in jdk.javadoc-gendata
Reviewed-by: erikj, jlahoda
2024-01-19 22:31:23 +00:00
Harshitha Onkar
f1b73350c2 8320113: [macos14] : ShapeNotSetSometimes.java fails intermittently on macOS 14
Reviewed-by: dnguyen, azvegint, kizune
2024-01-19 21:42:34 +00:00
Serguei Spitsyn
8700de66e4 8322744: VirtualThread.notifyJvmtiDisableSuspend should be static
Reviewed-by: pchilanomate, alanb
2024-01-19 18:40:55 +00:00
Mandy Chung
6c0bebccb0 8159927: Add a test to verify JMOD files created in the images do not have debug symbols
Reviewed-by: jlaskey
2024-01-19 17:42:55 +00:00
Calvin Cheung
437342b93e 8323556: CDS archive space addresses should be randomized with ArchiveRelocationMode=1
Reviewed-by: iklam, matsaave
2024-01-19 17:11:01 +00:00
Calvin Cheung
39005e27d6 8324041: ModuleOption.java failed with update release versioning scheme
Reviewed-by: dholmes, mbaesken
2024-01-19 17:02:29 +00:00
Coleen Phillimore
2865afe759 8323685: PrintSystemDictionaryAtExit has mutex rank assert
Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org>
Reviewed-by: tschatzl, ayang
2024-01-19 16:54:03 +00:00
Christian Hagedorn
6997bfc68d 8323154: C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test
Reviewed-by: roland, thartmann, qamai
2024-01-19 15:49:02 +00:00
Roman Kennke
16be38887f 8322383: G1: Only preserve marks on objects that are actually moved
Reviewed-by: ayang, tschatzl
2024-01-19 12:59:21 +00:00
Albert Mingkun Yang
0081d8c07f 8324147: Serial: Remove generation::compute_new_size
Reviewed-by: ehelin
2024-01-19 11:48:34 +00:00
Matthias Baesken
5f7141982c 8322366: Add IEEE rounding mode corruption check to JNI checks
Reviewed-by: dholmes, lucy
2024-01-19 09:10:37 +00:00
Matthias Baesken
05330227be 8222719: libperfstat on AIX - cleanup old API versions
Reviewed-by: goetz, clanger
2024-01-19 08:14:13 +00:00
Tejesh R
05dad67cc2 8295804: javax/swing/JFileChooser/JFileChooserSetLocationTest.java failed with "setLocation() is not working properly"
Reviewed-by: prr, serb
2024-01-19 05:57:02 +00:00
Pavel Rappo
9efdd242fb 8324053: Use the blessed modifier order for sealed in java.base
Reviewed-by: naoto, darcy, ihse, dfuchs
2024-01-18 22:28:23 +00:00
Hannes Wallnöfer
81df265e41 8320458: Improve structural navigation in API documentation
Reviewed-by: erikj, jjg
2024-01-18 19:06:26 +00:00
Joe Darcy
a6c0b10704 8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
Reviewed-by: jjg
2024-01-18 19:04:26 +00:00
Daniel D. Daugherty
5c874c19cb 8324161: validate-source fails after JDK-8275338
Reviewed-by: darcy
2024-01-18 17:42:55 +00:00
Matthew Donovan
b6233c3de7 8321925: sun/security/mscapi/KeytoolChangeAlias.java fails with "Alias <246810> does not exist"
Reviewed-by: rhalade
2024-01-18 17:33:31 +00:00
Raffaello Giulietti
bfd2afe5ad 8275338: Add JFR events for notable serialization situations
Reviewed-by: rriggs, egahlin
2024-01-18 17:05:35 +00:00
Claes Redestad
4c1a0fc58f 8323995: Suppress notes generated on incremental microbenchmark builds
Reviewed-by: erikj, ihse
2024-01-18 15:40:39 +00:00
Albert Mingkun Yang
a2b117ae02 8324132: G1: Remove unimplemented G1MonitoringSupport::recalculate_eden_size
Reviewed-by: tschatzl
2024-01-18 15:23:11 +00:00
Albert Mingkun Yang
8e534598b5 8323993: Serial: Refactor gc_prologue and gc_epilogue
Reviewed-by: stefank, ehelin
2024-01-18 15:22:56 +00:00
Daniel D. Daugherty
aeb304b29e 8324074: increase timeout for jvmci test TestResolvedJavaMethod.java
Reviewed-by: stuefe, thartmann
2024-01-18 13:16:05 +00:00
Daniel D. Daugherty
a22ae909bc 8321938: java/foreign/critical/TestCriticalUpcall.java does not need a core file
Reviewed-by: dholmes
2024-01-18 13:15:55 +00:00
Daniel D. Daugherty
806ffb1085 8324082: more monitoring test timeout adjustments
Reviewed-by: kevinw, sspitsyn
2024-01-18 13:15:45 +00:00
Patricio Chilano Mateo
52f787f675 8323595: is_aligned(p, alignof(OopT))) assertion fails in Jetty without compressed OOPs
Reviewed-by: fparain, dlong
2024-01-18 12:16:26 +00:00
Song Pham
cbfddf4e1d 8317287: [macos14] InterJVMGetDropSuccessTest.java: Child VM: abnormal termination
Reviewed-by: honkar, aivanov, shurailine
2024-01-18 10:03:47 +00:00
Andrew Leonard
57fad67781 8323667: Library debug files contain non-reproducible full gcc include paths
Reviewed-by: erikj, ihse
2024-01-18 09:56:54 +00:00
Gui Cao
ff8cc268fd 8323694: RISC-V: Unnecessary ResourceMark in NativeCall::set_destination_mt_safe
Reviewed-by: fyang, rehn
2024-01-18 02:28:54 +00:00
Renjith Kannath Pariyangad
dadd9cd1e8 8316497: ColorConvertOp - typo for non-ICC conversions needs one-line fix
Co-authored-by: Sergey Bylokhov <serb@openjdk.org>
Co-authored-by: Alexey Ivanov <aivanov@openjdk.org>
Reviewed-by: aivanov, serb
2024-01-18 01:23:30 +00:00
Sergey Bylokhov
de237fb058 8323554: The typos in Javadoc: "@return if "
Reviewed-by: prr
2024-01-17 19:35:05 +00:00
Anthony Scarpino
51dbd36c74 8322100: Fix GCMIncrementByte4 & GCMIncrementDirect4, and increase overlap testing
Reviewed-by: jnimeh
2024-01-17 18:08:38 +00:00
Artem Semenov
ffa33d7b80 8317771: [macos14] Expand/collapse a JTree using keyboard freezes the application in macOS 14 Sonoma
Reviewed-by: kizune
2024-01-17 16:44:27 +00:00
Brian Burkhalter
4e5323538c 8323710: (fc) FileChannel.lock creates a FileKey with a poor hashCode after JDK-8321429 (win)
Reviewed-by: alanb
2024-01-17 16:34:48 +00:00
Brian Burkhalter
19287eeeb2 8321561: (fs) Clarify non-atomic behavior of Files.move
Reviewed-by: alanb
2024-01-17 16:34:33 +00:00
Claes Redestad
8b29e127c2 8323794: Remove unused jimage compressor plugin configuration
Reviewed-by: jlaskey, mchung
2024-01-17 15:41:13 +00:00
Aleksey Shipilev
7be9f1d054 8321137: Reconsider ICStub alignment
Reviewed-by: dlong, eosterlund, mdoerr, fyang, aph
2024-01-17 12:48:37 +00:00
Alan Bateman
b8dafa642e 8323612: IOVecWrapper should be changed to be TerminatingThreadLocal
Reviewed-by: bpb
2024-01-17 10:56:17 +00:00
Albert Mingkun Yang
f2a4ed680b 8323779: Serial: Remove Generation::promotion_attempt_is_safe
Reviewed-by: stefank, cjplummer
2024-01-17 10:25:00 +00:00
Joachim Kern
22642ff0aa 8319382: com/sun/jdi/JdwpAllowTest.java shows failures on AIX if prefixLen of mask is larger than 32 in IPv6 case
Reviewed-by: mbaesken, amenkov
2024-01-17 09:34:09 +00:00
Tobias Holenstein
b89172149d 8316756: C2 EA fails with "missing memory path" when encountering unsafe_arraycopy stub call
Co-authored-by: Vladimir Kozlov <kvn@openjdk.org>
Reviewed-by: kvn, thartmann, chagedorn
2024-01-17 08:07:04 +00:00
Roberto Castañeda Lozano
bf666bc0c7 8322692: ZGC: avoid over-unrolling due to hidden barrier size
Reviewed-by: eosterlund, kvn
2024-01-17 07:50:03 +00:00
Richard Reingruber
de97c0eb4b 8290965: PPC64: Implement post-call NOPs
Reviewed-by: mdoerr
2024-01-17 06:50:32 +00:00
Prasanta Sadhukhan
f70667ea68 8318112: CSS percentage values are capped at 100%
Reviewed-by: tr, prr
2024-01-17 02:28:36 +00:00
Henry Jen
2063bb8ffa Merge
Reviewed-by: erikj
2024-01-17 01:41:52 +00:00
Joe Darcy
d8b63370f3 8323839: Expand use of Messager convenience methods in langtools regression tests
Reviewed-by: jjg
2024-01-17 00:29:05 +00:00
John Jiang
43d2d68da5 8320449: ECDHKeyAgreement should validate parameters before using them
Reviewed-by: mullan
2024-01-16 22:54:45 +00:00
Joshua Cao
b058063c40 8323820: [MacOS] build failure: non-void function does not return a value
Reviewed-by: shade, lucy
2024-01-16 22:01:21 +00:00
Doug Simon
19c9388c20 8323616: [JVMCI] TestInvalidJVMCIOption.java fails intermittently with NPE
Reviewed-by: thartmann, never
2024-01-16 19:31:04 +00:00
Jonathan Gibbons
b533272ecb 8299627: Fix/improve handling of "missing" element-list file
Reviewed-by: hannesw
2024-01-16 18:41:25 +00:00
Thomas Schatzl
1007618f6f 8323731: Unproblemlist gc/stress/TestStressG1Humongous.java
Reviewed-by: ehelin
2024-01-16 14:42:32 +00:00
Albert Mingkun Yang
790871e908 8323800: Serial: Fix include guard macro in generation.hpp
Reviewed-by: stefank
2024-01-16 14:26:22 +00:00
Stefan Karlsson
0216f5de55 8323730: Tweak TestZAllocationStallEvent.java to allocate smaller objects
Reviewed-by: aboldtch, sjohanss
2024-01-16 14:26:10 +00:00
Erik Gahlin
21f647310b 8322675: JFR: Fail-fast mode when constants cannot be resolved
Reviewed-by: mgronlun
2024-01-16 13:59:29 +00:00
Markus Grönlund
e2d6023cb9 8323631: JfrTypeSet::write_klass can enqueue a CLD klass that is unloading
Reviewed-by: egahlin
2024-01-16 13:31:03 +00:00
Jorn Vernee
2fd775f69c 8323651: compiler/c2/irTests/TestPrunedExHandler.java fails with -XX:+DeoptimizeALot
Reviewed-by: alanb, kvn
2024-01-16 13:25:49 +00:00
Chris Hegarty
ee4d9aa4c1 8323659: LinkedTransferQueue add and put methods call overridable offer
Reviewed-by: alanb
2024-01-16 12:13:57 +00:00
Thomas Schatzl
5045839cb2 8323635: Test gc/g1/TestHumongousAllocConcurrentStart.java fails with -XX:TieredStopAtLevel=3
Reviewed-by: shade, lmesnik
2024-01-16 12:00:57 +00:00
Albert Mingkun Yang
44a9392eca 8323780: Serial: Remove unused _full_collections_completed
Reviewed-by: ehelin, stefank
2024-01-16 11:56:10 +00:00
Stefan Karlsson
59062402b9 8323716: Only print ZGC Phase Switch events in hs_err files when running with ZGC
Reviewed-by: aboldtch, tschatzl, shade
2024-01-16 10:30:32 +00:00
Emanuel Peter
e01f6da1b8 8320175: [BACKOUT] 8316533: C2 compilation fails with assert(verify(phase)) failed: missing Value() optimization
Reviewed-by: thartmann, chagedorn
2024-01-16 10:15:00 +00:00
Albert Mingkun Yang
8abaf11965 8323715: Serial: Move genMemoryPools to serial folder
Reviewed-by: stefank, tschatzl
2024-01-16 08:39:07 +00:00
Albert Mingkun Yang
67204994dc 8323738: Serial: Remove unreachable methods in Generation
Reviewed-by: tschatzl, stefank
2024-01-16 08:38:53 +00:00
Ferenc Rakoczi
bf7bd9a16c 8317547: Enhance TLS connection support
Reviewed-by: ahgross, rhalade, weijun, valeriep
2024-01-16 05:55:56 +00:00
Christian Hagedorn
c1a568c9c4 8314307: Improve loop handling
Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Co-authored-by: Roland Westrelin <rwestrel@redhat.com>
Co-authored-by: Emanuel Peter <epeter@openjdk.org>
Reviewed-by: mschoene, rhalade, thartmann, epeter
2024-01-16 05:55:56 +00:00
Tobias Hartmann
1cc6fbd9b0 8318588: Windows build failure after JDK-8314468 due to ambiguous call
Reviewed-by: epeter
2024-01-16 05:55:56 +00:00
Tobias Hartmann
ed238e8b88 8314468: Improve Compiler loops
Co-authored-by: Dean Long <dlong@openjdk.org>
Reviewed-by: rhalade, mschoene, iveresov, kvn
2024-01-16 05:55:55 +00:00
Coleen Phillimore
fac49b8375 8317331: Solaris build failed with "declaration can not follow a statement (E_DECLARATION_IN_CODE)"
Backport-of: 852276d1f833d49802693f2a5a82ba6eb2722de6
2024-01-16 05:55:55 +00:00
Coleen Phillimore
fff750c99d 8314295: Enhance verification of verifier
Reviewed-by: mschoene, rhalade, dholmes, dlong
2024-01-16 05:55:55 +00:00
Sean Mullan
a2544568f9 8308204: Enhanced certificate processing
Reviewed-by: mschoene, rhalade, jnimeh
2024-01-16 05:55:55 +00:00
Yude Lin
36f4b34f19 8323122: AArch64: Increase itable stub size estimate
Reviewed-by: aph, eastigeevich
2024-01-16 05:15:22 +00:00
Hamlin Li
b363472265 8318227: RISC-V: C2 ConvHF2F
Reviewed-by: fyang
2024-01-15 18:41:53 +00:00
Per Minborg
edc0ebb780 8323745: Missing comma in copyright header in TestScope
Reviewed-by: alanb
2024-01-15 16:30:59 +00:00
Glavo
a03eb6d3f6 8321620: Optimize JImage decompressors
Reviewed-by: mchung, redestad
2024-01-15 16:10:35 +00:00
Per Minborg
f5b757ced6 8323159: Consider adding some text re. memory zeroing in Arena::allocate
Reviewed-by: mcimadamore, jvernee
2024-01-15 16:07:56 +00:00
Albert Mingkun Yang
1f4474f677 8323726: Serial: Remove unused definitions in Generation
Reviewed-by: stefank
2024-01-15 15:21:09 +00:00
Andrew Leonard
dd0694b9cb 8323671: DevKit build gcc libraries contain full paths to source location
Reviewed-by: erikj, ihse
2024-01-15 14:39:28 +00:00
Guoxiong Li
bf813be0f3 8322279: Generational ZGC: Use ZFragmentationLimit and ZYoungCompactionLimit as percentage instead of multiples
Reviewed-by: eosterlund
2024-01-15 14:34:14 +00:00
Magnus Ihse Bursie
c84c0ab52d 8323637: Capture hotspot replay files in GHA
Reviewed-by: shade
2024-01-15 14:14:13 +00:00
Rajat Mahajan
f368a0c12e 8320328: Restore interrupted flag in ImageIcon.loadImage
Reviewed-by: aivanov, serb
2024-01-15 13:09:00 +00:00
Albert Mingkun Yang
a45b5b4921 8323722: Serial: Remove unused no_gc_in_progress
Reviewed-by: stefank, tschatzl
2024-01-15 12:58:23 +00:00
Christian Hagedorn
7e0a4ed629 8323101: C2: assert(n->in(0) == nullptr) failed: divisions with zero check should already have bailed out earlier in split-if
Reviewed-by: kvn, thartmann
2024-01-15 12:16:10 +00:00
Aleksey Shipilev
34f85ee94e 8323584: AArch64: Unnecessary ResourceMark in NativeCall::set_destination_mt_safe
Reviewed-by: tholenstein, fyang, aph
2024-01-15 12:03:01 +00:00
Jan Kratochvil
62fd26f094 8323700: Add fontconfig requirement to building.md for Alpine Linux
Reviewed-by: ihse
2024-01-15 11:20:44 +00:00
Kevin Walls
8c238eddce 8318707: Remove the Java Management Extension (JMX) Management Applet (m-let) feature
Reviewed-by: sspitsyn, dfuchs
2024-01-15 11:12:38 +00:00
Emanuel Peter
cd0fe37741 8323641: Test compiler/loopopts/superword/TestAlignVectorFuzzer.java timed out
Reviewed-by: chagedorn, kvn
2024-01-15 10:44:01 +00:00
Emanuel Peter
45c65e6b1a 8323577: C2 SuperWord: remove AlignVector restrictions on IR tests added in JDK-8305055
Reviewed-by: rcastanedalo, chagedorn
2024-01-15 10:41:05 +00:00
Thomas Schatzl
8643cc2133 8323610: G1: HeapRegion pin count should be size_t to avoid overflows
Reviewed-by: kbarrett, ayang
2024-01-15 09:35:50 +00:00
Lei Zaakjyu
e66a76f524 8323660: Serial: Fix header ordering and indentation
Reviewed-by: ayang, cjplummer, kbarrett
2024-01-15 09:13:47 +00:00
Aleksey Shipilev
ba3c3bbd87 8323519: Add applications/ctw/modules to Hotspot tiered testing
Reviewed-by: xliu, kvn
2024-01-15 09:10:11 +00:00
Lei Zaakjyu
922f8e44ee 8323693: Update some copyright announcements in the new files created in 8234502
Reviewed-by: cjplummer, dholmes
2024-01-15 07:40:49 +00:00
Zhiqiang Zang
1515bd7c9d 8322077: Add Ideal transformation: (~a) | (~b) => ~(a & b)
Reviewed-by: thartmann, epeter
2024-01-15 06:48:00 +00:00
Sergey Bylokhov
bdee968e3e 4760025: sRGB conversions to and from CIE XYZ incorrect
Reviewed-by: prr, aivanov
2024-01-14 23:05:47 +00:00
David Holmes
71d9a83dec 8323243: JNI invocation of an abstract instance method corrupts the stack
Reviewed-by: coleenp, shade
2024-01-14 22:01:44 +00:00
Varada M
d83ea92085 8301466: [AIX] Revisit CommittedVirtualMemoryTest
Reviewed-by: mdoerr
2024-01-13 14:12:44 +00:00
Sergey Bylokhov
5cf7947ccd 8323562: SaslInputStream.read() may return wrong value
Co-authored-by: Aleksey Shipilev <shade@openjdk.org>
Reviewed-by: shade, dfuchs
2024-01-12 23:50:28 +00:00
Alisen Chung
dc7d3b182d 8321489: Update LCMS to 2.16
Reviewed-by: serb, dnguyen, prr
2024-01-12 22:16:09 +00:00
Alex Menkov
84cf4cb350 8318563: GetClassFields should not use random access to field
Reviewed-by: sspitsyn, cjplummer, fparain
2024-01-12 20:41:49 +00:00
Joe Darcy
9e9c05f0ee 8322979: Add informative discussion to Modifier
Reviewed-by: alanb
2024-01-12 19:40:55 +00:00
Harshitha Onkar
c54bca6f7f 8323617: Add missing null checks to GetMousePositionWithPopup.java test
Reviewed-by: serb, aivanov, dnguyen
2024-01-12 19:21:52 +00:00
William Kemper
95a91682c3 8323627: Shenandoah: Refactor init logger
Reviewed-by: ysr, kdnilsen, shade, phh
2024-01-12 18:57:36 +00:00
Harshitha Onkar
999e556be4 8312518: [macos13] setFullScreenWindow() shows black screen on macOS 13 & above
Reviewed-by: serb, tr, azvegint
2024-01-12 17:56:16 +00:00
Rajat Mahajan
8b6293f6bf 8301994: Remove unused code from awt_List.cpp
Reviewed-by: serb, prr, aivanov
2024-01-12 17:14:16 +00:00
William Kemper
e33031b850 8323629: Shenandoah: Fix missing include and declaration
Reviewed-by: ysr, kdnilsen, phh
2024-01-12 17:04:51 +00:00
Denghui Dong
c5e7245096 8322735: C2: minor improvements of bubble sort used in SuperWord::packset_sort
Reviewed-by: epeter, kvn
2024-01-12 15:21:37 +00:00
Axel Boldt-Christmas
65a0672791 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT
Reviewed-by: rkennke, dcubed, thartmann
2024-01-12 14:34:42 +00:00
Albert Mingkun Yang
e22ab10991 8322537: Parallel: Remove experimental adjustment in PSAdaptiveSizePolicy
Reviewed-by: kbarrett, tschatzl
2024-01-12 13:51:29 +00:00
Erik Gahlin
be900f1253 8323425: JFR: Auto-generated filename doesn't work with time-limited recording
Reviewed-by: mgronlun
2024-01-12 13:12:37 +00:00
Matthias Baesken
68c4286026 8323008: filter out harmful -std* flags added by autoconf from CXX
Reviewed-by: erikj, clanger, ihse
2024-01-12 12:29:07 +00:00
Lei Zaakjyu
7dc9dd6fdf 8234502: Merge GenCollectedHeap and SerialHeap
Reviewed-by: ayang, cjplummer
2024-01-12 10:56:50 +00:00
Cesar Soares Lucas
ed18222365 8323190: Segfault during deoptimization of C2-compiled code
Reviewed-by: thartmann, chagedorn
2024-01-12 10:43:16 +00:00
Claes Redestad
3e19bf88d5 8323529: Relativize test image dependencies in microbenchmarks
Reviewed-by: mcimadamore, jvernee, erikj
2024-01-12 10:00:37 +00:00
Stefan Karlsson
ba23025cd8 8322957: Generational ZGC: Relocation selection must join the STS
Co-authored-by: Axel Boldt-Christmas <aboldtch@openjdk.org>
Reviewed-by: eosterlund, aboldtch
2024-01-12 09:32:50 +00:00
Stefan Karlsson
7c3a39f400 8323297: Fix incorrect placement of precompiled.hpp include lines
Reviewed-by: kbarrett, dholmes, shade, ysr
2024-01-12 08:57:09 +00:00
Alan Bateman
e72723dc5c 8323296: java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java#id1 timed out
Reviewed-by: jpai
2024-01-12 08:33:27 +00:00
Afshin Zafari
66520be7a7 8280056: gtest/LargePageGtests.java#use-large-pages failed "os.release_one_mapping_multi_commits_vm"
Reviewed-by: stuefe, gziemski
2024-01-12 08:21:42 +00:00
Abhishek Kumar
82a63a03c0 8258979: The image didn't show correctly with GTK LAF
Reviewed-by: psadhukhan, tr
2024-01-12 07:53:41 +00:00
Kim Barrett
8d9814a521 8322757: Enable -Wparentheses warnings
Reviewed-by: dholmes, jwaters, erikj, ihse
2024-01-12 06:12:20 +00:00
Renjith Kannath Pariyangad
0ff2deab5d 8320673: PageFormat/CustomPaper.java has no Pass/Fail buttons; multiple instructions
Reviewed-by: serb, aivanov
2024-01-12 02:55:22 +00:00
Alexey Semenyuk
8e12053e03 8322799: Test JPKG003-013: ServiceTest fails because the user cannot uninstall the "servicetest" package on OEL 9.2 x64 and OEL 9.2 64-bit Arm (aarch64)
Reviewed-by: almatvee
2024-01-11 22:58:20 +00:00
Joe Wang
e4389d8dc2 8323571: Regression in source resolution process
Reviewed-by: lancea, naoto
2024-01-11 22:38:39 +00:00
Pavel Rappo
49e6121347 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger
Reviewed-by: rriggs, redestad, rgiulietti
2024-01-11 21:48:58 +00:00
Justin Lu
4ea7b36447 8322235: Split up and improve LocaleProvidersRun
Reviewed-by: naoto
2024-01-11 20:59:53 +00:00
Chris Plummer
93bedd7aba 8323213: Fix some javadoc broken links in ObjectReference, and other misc javadoc cleanups
Reviewed-by: sspitsyn, amenkov
2024-01-11 18:13:11 +00:00
Tim Prinzing
b78896b9aa 8319571: Update jni/nullCaller/NullCallerTest.java to accept flags or mark as flagless
Reviewed-by: mchung
2024-01-11 17:37:30 +00:00
Sandhya Viswanathan
e10d14004f 8321712: C2: "failed: Multiple uses of register" in C2_MacroAssembler::vminmax_fp
Co-authored-by: Volodymyr Paprotski <vpaprotski@openjdk.org>
Reviewed-by: kvn, thartmann, epeter, jbhateja
2024-01-11 16:54:16 +00:00
Matthew Donovan
c2e77e2f17 8319128: sun/security/pkcs11 tests fail on OL 7.9 aarch64
Reviewed-by: mbaesken
2024-01-11 15:19:48 +00:00
Weijun Wang
9fd855ed47 8322971: KEM.getInstance() should check if a 3rd-party security provider is signed
Reviewed-by: mullan, valeriep
2024-01-11 13:45:40 +00:00
Joachim Kern
b8ae4a8c09 8320890: [AIX] Find a better way to mimic dl handle equality
Reviewed-by: stuefe, mdoerr
2024-01-11 13:12:32 +00:00
Varada M
e5aed6be7a 8323276: StressDirListings.java fails on AIX
Reviewed-by: jpai, dfuchs
2024-01-11 12:17:35 +00:00
Roland Westrelin
b922f8d459 8319793: C2 compilation fails with "Bad graph detected in build_loop_late" after JDK-8279888
Reviewed-by: chagedorn, epeter
2024-01-11 09:00:44 +00:00
Viktor Klang
35e9662767 8314515: java/util/concurrent/SynchronousQueue/Fairness.java failed with "Error: fair=false i=8 j=0"
Reviewed-by: alanb
2024-01-11 08:16:28 +00:00
Matthias Baesken
cb1d25fcfa 8323330: [BACKOUT] JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows
Reviewed-by: prr, stuefe
2024-01-11 08:13:28 +00:00
Tejesh R
2b7fc0506a 8264102: JTable Keyboards Navigation differs with Test Instructions.
Reviewed-by: psadhukhan, abhiscxk
2024-01-11 07:34:14 +00:00
Denghui Dong
af942a693b 8323188: JFR: Needless RESOURCE_ARRAY when sending EventOSInformation
Reviewed-by: mgronlun
2024-01-11 07:17:28 +00:00
Eirik Bjørsnøs
26de9e247a 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile
8322830: Add test case for ZipFile opening a ZIP with no entries

Reviewed-by: lancea
2024-01-11 06:32:24 +00:00
Alex Menkov
b530c0281b 8317804: com/sun/jdi/JdwpAllowTest.java fails on Alpine 3.17 / 3.18
Reviewed-by: cjplummer, mbaesken
2024-01-11 00:36:16 +00:00
Eirik Bjørsnøs
e70cb4e6c7 8322565: (zipfs) Files.setPosixPermissions should preserve 'external file attributes' bits
Reviewed-by: clanger, lancea
2024-01-10 21:42:23 +00:00
Xin Liu
d89602a53f 8322982: CTW fails to build after 8308753
Reviewed-by: shade, phh
2024-01-10 19:42:03 +00:00
Naoto Sato
3bd9042054 8320788: The system properties page is missing some properties
Reviewed-by: iris, rriggs, bpb, joehw
2024-01-10 18:54:02 +00:00
Joe Darcy
525063be90 8322878: Including sealing information Class.toGenericString()
Co-authored-by: Pavel Rappo <prappo@openjdk.org>
Reviewed-by: rriggs
2024-01-10 18:46:56 +00:00
Markus Grönlund
c1282b57f5 8323540: assert((!((((method)->is_trace_flag_set(((1 << 4) << 8))))))) failed: invariant
Reviewed-by: mikael
2024-01-10 18:37:33 +00:00
Vicente Romero
5ba69e1734 8322477: order of subclasses in the permits clause can differ between compilations
Reviewed-by: jlahoda
2024-01-10 17:52:50 +00:00
Gerard Ziemski
c96cbe481c 8313083: Print 'rss' and 'cache' as part of the container information
Reviewed-by: sgehwolf
2024-01-10 17:29:55 +00:00
William Kemper
a7db4feceb 8323428: Shenandoah: Unused memory in regions compacted during a full GC should be mangled
Reviewed-by: ysr, kdnilsen, shade
2024-01-10 17:10:39 +00:00
Viktor Klang
b86c3b7a68 8309218: java/util/concurrent/locks/Lock/OOMEInAQS.java still times out with ZGC, Generational ZGC, and SerialGC
Reviewed-by: jpai, dholmes, alanb
2024-01-10 16:42:30 +00:00
Brian Burkhalter
475306b757 7057369: (fs spec) FileStore getUsableSpace and getUnallocatedSpace could be clearer
Reviewed-by: alanb
2024-01-10 16:34:06 +00:00
Albert Mingkun Yang
f016934184 8323518: Parallel: Remove unused methods in psParallelCompact.hpp
Reviewed-by: tschatzl
2024-01-10 15:19:09 +00:00
Albert Mingkun Yang
2174f6646e 8323005: Parallel: Refactor PSPromotionManager::claim_or_forward_depth
Reviewed-by: tschatzl, rrich
2024-01-10 15:18:57 +00:00
Matthias Baesken
16170678a7 8323331: fix typo hpage_pdm_size
Reviewed-by: shade, mdoerr
2024-01-10 15:03:21 +00:00
Serguei Spitsyn
2806adee2d 8321685: Missing ResourceMark in code called from JvmtiEnvBase::get_vthread_jvf
Reviewed-by: amenkov, cjplummer
2024-01-10 14:07:57 +00:00
Stefan Karlsson
ec38505720 8323508: Remove TestGCLockerWithShenandoah.java line from TEST.groups
Reviewed-by: dholmes, shade, tschatzl
2024-01-10 13:25:43 +00:00
Jorn Vernee
d2d58dd6a8 8322324: java/foreign/TestStubAllocFailure.java times out while waiting for forked process
8322637: java/foreign/critical/TestCriticalUpcall.java timed out

Reviewed-by: mcimadamore
2024-01-10 13:13:32 +00:00
Markus Grönlund
b2a39c5767 8316241: Test jdk/jdk/jfr/jvm/TestChunkIntegrity.java failed
Reviewed-by: egahlin
2024-01-10 13:03:36 +00:00
Guoxiong Li
679f526d89 8322278: Generational ZGC: Adjust the comment of ZHeuristics::use_per_cpu_shared_small_pages
Reviewed-by: eosterlund
2024-01-10 12:18:12 +00:00
Richard Reingruber
2e472fe7ea 8322294: Cleanup NativePostCallNop
Reviewed-by: mdoerr, aph
2024-01-10 12:18:01 +00:00
Guoxiong Li
88dafe564f 8314629: Generational ZGC: Clearing All SoftReferences log line lacks GCId
Reviewed-by: eosterlund, tschatzl
2024-01-10 12:15:38 +00:00
Albert Mingkun Yang
8d9479910f 8322828: Parallel: Rename ParallelCompactData::_region_start
Reviewed-by: tschatzl, ehelin
2024-01-10 11:28:51 +00:00
Albert Mingkun Yang
9847086466 8323499: Remove unused methods in space.hpp
Reviewed-by: tschatzl
2024-01-10 10:56:24 +00:00
Thomas Schatzl
40861761c2 8322987: Remove gc/stress/gclocker/TestGCLocker* since they always fail with OOME
Reviewed-by: ayang, lmesnik
2024-01-10 09:57:16 +00:00
Tobias Holenstein
88378ed058 8277869: Maven POMs are using HTTP links where HTTPS is available
Reviewed-by: kvn, thartmann
2024-01-10 08:30:47 +00:00
Zhiqiang Zang
8569227473 8322589: Add Ideal transformation: (~a) & (~b) => ~(a | b)
Reviewed-by: thartmann, epeter
2024-01-10 07:31:56 +00:00
Kim Barrett
f4ca41ad75 8322816: RISC-V: Incorrect guarantee in patch_vtype
Reviewed-by: fyang, luhenry
2024-01-10 00:19:05 +00:00
Naoto Sato
376051a9be 8320919: Clarify Locale related system properties
Reviewed-by: smarks, rriggs
2024-01-09 23:11:21 +00:00
Kim Barrett
a5071e010b 8322817: RISC-V: Eliminate -Wparentheses warnings in riscv code
Reviewed-by: fyang, luhenry
2024-01-09 22:47:36 +00:00
Kim Barrett
28d8149c69 8323115: x86-32: Incorrect predicates for cmov instruct transforms with UseSSE
Reviewed-by: shade, thartmann
2024-01-09 22:33:13 +00:00
Kim Barrett
e9f7db3045 8322880: Eliminate -Wparentheses warnings in arm32 code
Reviewed-by: shade, dholmes
2024-01-09 22:26:17 +00:00
Sergey Bylokhov
aba19334ea 8323210: Update the usage of cmsFLAGS_COPY_ALPHA
Reviewed-by: prr
2024-01-09 22:05:37 +00:00
Mandy Chung
f3be138eb8 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order
Reviewed-by: alanb
2024-01-09 22:04:02 +00:00
Albert Mingkun Yang
bc05893f82 8323318: Remove unused Space::is_free_block
Reviewed-by: tschatzl
2024-01-09 19:37:28 +00:00
Alex Menkov
dd8ae61643 8322237: Heap dump contains duplicate thread records for mounted virtual threads
Reviewed-by: dholmes, sspitsyn
2024-01-09 19:31:03 +00:00
Thomas Schatzl
ee98d26218 8323066: gc/g1/TestSkipRebuildRemsetPhase.java fails with 'Skipping Remembered Set Rebuild.' missing
Reviewed-by: ayang, iwalulya
2024-01-09 17:03:28 +00:00
Lei Zaakjyu
886386c039 8322890: Directly return in OldPLABSizeConstraintFunc
Reviewed-by: ayang, tschatzl
2024-01-09 15:52:39 +00:00
Albert Mingkun Yang
438ab7c115 8323284: Remove unused FilteringClosure declaration
Reviewed-by: stefank, tschatzl
2024-01-09 14:23:42 +00:00
Thomas Schatzl
52c7ff1d81 8322330: JavadocHelperTest.java OOMEs with Parallel GC and ZGC
Reviewed-by: ayang, aboldtch
2024-01-09 13:47:32 +00:00
Lei Zaakjyu
ff499ef79f 8233443: G1 DetailedUsage class names overly generic for global namespace
Reviewed-by: ayang, gli, tschatzl
2024-01-09 13:26:38 +00:00
Pavel Rappo
37a61720b6 8322936: Update blessed-modifier-order.sh for default, sealed, and non-sealed
Reviewed-by: erikj, rriggs, martin
2024-01-09 11:36:36 +00:00
Pavel Rappo
7d42aa1513 8310277: jdk/javadoc/doclet/testMethodCommentAlgorithm/TestMethodCommentsAlgorithm.java fails with IllegalStateException
Reviewed-by: jjg
2024-01-09 11:31:50 +00:00
Albert Mingkun Yang
6e9671a8a8 8323264: Serial: Remove unused GenerationBlockSizeClosure
Reviewed-by: stefank
2024-01-09 10:37:02 +00:00
Boris Ulasevich
52a6c37558 8322858: compiler/c2/aarch64/TestFarJump.java fails on AArch64 due to unexpected PrintAssembly output
Reviewed-by: aph, thartmann
2024-01-09 10:33:52 +00:00
David Holmes
075fed91bd 8323241: jcmd manpage should use lists for argument lists
Reviewed-by: alanb
2024-01-09 08:19:57 +00:00
Robbin Ehn
30f93a29c2 8320069: RISC-V: Add Zcb instructions
Reviewed-by: fyang, vkempik
2024-01-09 07:34:50 +00:00
Ludovic Henry
4cf131a101 8319716: RISC-V: Add SHA-2
Co-authored-by: Robbin Ehn <rehn@openjdk.org>
Reviewed-by: fyang, mli, luhenry
2024-01-09 07:26:35 +00:00
Alan Bateman
7286f5291d 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock
Reviewed-by: jpai
2024-01-09 07:05:27 +00:00
Albert Mingkun Yang
07fce8eff2 8320864: Serial: Extract out Full GC related fields from ContiguousSpace
Reviewed-by: kbarrett, sjohanss
2024-01-09 06:11:44 +00:00
Athijegannathan Sundararajan
176606d0cb 8310995: missing @since tags in 36 jdk.dynalink classes
Reviewed-by: jlaskey, iris, attila
2024-01-09 04:36:30 +00:00
Weibing Xiao
8ae309ebac 8318971: Better Error Handling for Jar Tool When Processing Non-existent Files
Reviewed-by: alanb, jpai
2024-01-09 04:04:12 +00:00
Calvin Cheung
841ab487f8 8322657: CDS filemap fastdebug assert while loading Graal CE Polyglot in isolated classloader
Reviewed-by: matsaave, dholmes
2024-01-08 23:53:06 +00:00
Calvin Cheung
61ebe3b0c4 8323032: OptimizedModuleHandlingTest failed in dynamic CDS archive mode
Reviewed-by: dholmes, matsaave
2024-01-08 22:41:07 +00:00
Kim Barrett
ca9635df33 8322759: Eliminate -Wparentheses warnings in compiler code
Reviewed-by: kvn, shade
2024-01-08 21:26:18 +00:00
Mikael Vidstedt
8a4dc79e1a 8274300: Address dsymutil warning by excluding platform specific files
Reviewed-by: erikj
2024-01-08 20:17:29 +00:00
Rajat Mahajan
d78e8dab93 8322545: Declare newInsets as static in ThemeReader.cpp
Reviewed-by: serb, aivanov
2024-01-08 19:58:32 +00:00
Joshua Cao
24823ba647 8323095: Expand TraceOptoParse block output abbreviations
Reviewed-by: thartmann, chagedorn, xliu
2024-01-08 19:46:04 +00:00
Xin Liu
d47393bd82 8320128: Clean up Parse constructor for OSR
Reviewed-by: thartmann, shade
2024-01-08 18:53:41 +00:00
Chris Plummer
387828a3f7 8322980: Debug agent's dumpThread() API should update thread's name before printing it
Reviewed-by: kevinw, sspitsyn
2024-01-08 16:56:44 +00:00
William Kemper
c4a83bd6f6 8323086: Shenandoah: Heap could be corrupted by oom during evacuation
Reviewed-by: kdnilsen, shade
2024-01-08 16:44:28 +00:00
Emanuel Peter
827c71dac9 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs
Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Reviewed-by: kvn, chagedorn
2024-01-08 16:10:21 +00:00
Ilya Gavrilin
2acb5bd992 8322790: RISC-V: Tune costs for shuffles with no conversion
Reviewed-by: rehn, fyang
2024-01-08 15:53:58 +00:00
Jorn Vernee
c8fa3e21e6 8320310: CompiledMethod::has_monitors flag can be incorrect
Reviewed-by: vlivanov, thartmann
2024-01-08 14:55:17 +00:00
Jan Lahoda
57a65fe436 8322003: JShell - Incorrect type inference in lists of records implementing interfaces
Reviewed-by: vromero
2024-01-08 14:09:27 +00:00
Thomas Stuefe
c90768c93b 8318444: Write details about compilation bailouts into crash reports
Reviewed-by: thartmann, chagedorn
2024-01-08 13:47:43 +00:00
Fredrik Bredberg
29397d29ba 8320317: ObjectMonitor NotRunnable is not really an optimization
Reviewed-by: eosterlund, dholmes, shade, dcubed
2024-01-08 13:32:17 +00:00
Fredrik Bredberg
fc04750817 8321371: SpinPause() not implemented for bsd_aarch64/macOS
Reviewed-by: eosterlund, dholmes, dcubed, eastigeevich, shade
2024-01-08 13:30:23 +00:00
Christian Hagedorn
458e563cd9 8310711: [IR Framework] Remove safepoint while printing handling
Reviewed-by: thartmann, epeter
2024-01-08 12:57:55 +00:00
Matthias Baesken
71aac7a5fb 8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows
Reviewed-by: rschmelter, stuefe
2024-01-08 11:45:18 +00:00
Markus Grönlund
09c6c4ff02 8322489: 22-b27: Up to 7% regression in all Footprint3-*-G1/ZGC
Reviewed-by: egahlin
2024-01-08 11:41:51 +00:00
Aleksey Shipilev
eb9e754b3a 8323065: Unneccesary CodeBlob lookup in CompiledIC::internal_set_ic_destination
Reviewed-by: dlong, thartmann
2024-01-08 10:27:00 +00:00
Kim Barrett
a40d397d5d 8323110: Eliminate -Wparentheses warnings in ppc code
Reviewed-by: dholmes
2024-01-08 09:01:33 +00:00
Per Minborg
7edd10e5fa 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario
Reviewed-by: mcimadamore
2024-01-08 08:20:07 +00:00
Kim Barrett
d75d876edd 8322806: Eliminate -Wparentheses warnings in aarch64 code
Reviewed-by: stefank, dholmes
2024-01-08 07:30:21 +00:00
Prasanta Sadhukhan
e44276989f 8322754: click JComboBox when dialog about to close causes IllegalComponentStateException
Reviewed-by: abhiscxk, serb
2024-01-08 02:46:10 +00:00
Kim Barrett
3560e680bc 8322815: Eliminate -Wparentheses warnings in shenandoah code
Reviewed-by: shade, zgu
2024-01-08 02:37:10 +00:00
Alan Bateman
faa9c6909d 8322846: Running with -Djdk.tracePinnedThreads set can hang
Reviewed-by: jpai
2024-01-06 18:24:28 +00:00
Alan Bateman
ace010b38a 8319757: java/nio/channels/DatagramChannel/InterruptibleOrNot.java failed: wrong exception thrown
Reviewed-by: jpai, bpb
2024-01-06 08:52:27 +00:00
Jonathan Gibbons
be4614eb5e 8323016: Improve reporting for bad options
Reviewed-by: prappo
2024-01-05 22:16:52 +00:00
David Leopoldseder
35a1b77da5 8322636: [JVMCI] HotSpotSpeculationLog can be inconsistent across a single compile
Reviewed-by: dnsimon, never
2024-01-05 19:00:18 +00:00
Chris Plummer
46965a096c 8322981: Fix 2 locations in JDI that throw IOException without using the "Caused by" exception
Reviewed-by: dholmes, lmesnik
2024-01-05 17:53:45 +00:00
Aleksey Shipilev
700c25f5b4 8322954: Shenandoah: Convert evac-update closures asserts to rich asserts
Reviewed-by: wkemper, kdnilsen, ysr
2024-01-05 17:04:32 +00:00
Daniel D. Daugherty
631a9f60f3 8323073: ProblemList gc/g1/TestSkipRebuildRemsetPhase.java on linux-aarch64
8323075: ProblemList runtime/cds/appcds/jigsaw/modulepath/OptimizeModuleHandlingTest.java

Reviewed-by: thartmann
2024-01-05 16:26:02 +00:00
Tobias Hartmann
ed9f3243f0 8322985: [BACKOUT] 8318562: Computational test more than 2x slower when AVX instructions are used
Reviewed-by: chagedorn, shade
2024-01-05 15:40:32 +00:00
Tobias Hartmann
ade21a965f 8310844: [AArch64] C1 compilation fails because monitor offset in OSR buffer is too large for immediate
Reviewed-by: aph, chagedorn
2024-01-05 13:48:31 +00:00
Jan Lahoda
f0cfd361bd 8322532: JShell : Unnamed variable issue
Reviewed-by: asotona
2024-01-05 11:34:03 +00:00
Tobias Hartmann
78623c95f2 8323012: C2 fails with fatal error: no reachable node should have no use
Reviewed-by: chagedorn
2024-01-05 11:13:34 +00:00
William Kemper
f0e2e4311b 8323021: Shenandoah: Encountered reference count always attributed to first worker thread
Reviewed-by: kdnilsen, ysr, shade
2024-01-05 10:39:08 +00:00
Denghui Dong
3dc4bd8581 8322989: New test serviceability/HeapDump/FullGCHeapDumpLimitTest.java fails
Reviewed-by: stefank, dholmes
2024-01-05 09:23:42 +00:00
Stefan Karlsson
1d1cd32bc3 8321812: Update GC tests to use execute[Limited]TestJava
Reviewed-by: tschatzl, aboldtch
2024-01-05 09:12:24 +00:00
Stefan Karlsson
868f8745fa 8322920: Some ProcessTools.execute* functions are declared to throw Throwable
Reviewed-by: dholmes, lmesnik
2024-01-05 09:07:03 +00:00
Johny Jose
2a9c3589d9 8322725: (tz) Update Timezone Data to 2023d
Reviewed-by: coffeys, naoto
2024-01-05 08:12:59 +00:00
Gui Cao
5235cc987d 8322583: RISC-V: Enable fast class initialization checks
Reviewed-by: rehn, fyang, fjiang
2024-01-05 04:39:55 +00:00
Calvin Cheung
3b1e56a427 8322322: Support archived full module graph when -Xbootclasspath/a is used
Reviewed-by: alanb, mchung
2024-01-05 00:00:24 +00:00
Chris Plummer
3fbccb01dc 8322978: Remove debug agent debugMonitorTimedWait() function. It is no longer used.
Reviewed-by: dholmes, sspitsyn
2024-01-04 17:22:49 +00:00
Naoto Sato
ad31ec5c5f 8322647: Short name for the Europe/Lisbon time zone is incorrect
Reviewed-by: joehw, iris
2024-01-04 17:16:33 +00:00
Justin Lu
15cf8f8531 8319626: Override toString() for ZipFile
Reviewed-by: jpai, alanb, coffeys
2024-01-04 17:16:22 +00:00
Joshua Cao
ade40741ca 8322976: Remove reference to transform_no_reclaim
Reviewed-by: shade, thartmann
2024-01-04 16:55:04 +00:00
Daniel D. Daugherty
ea19e9c6aa 8323011: ProblemList serviceability/HeapDump/FullGCHeapDumpLimitTest.java
Reviewed-by: azvegint, ctornqvi
2024-01-04 16:28:52 +00:00
Alan Bateman
d33dfe5cb2 8323002: test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java times out on macosx-x64
Reviewed-by: pchilanomate
2024-01-04 15:20:23 +00:00
Denghui Dong
27d5f5c237 8322781: C1: Debug build crash in GraphBuilder::vmap() when print stats
Reviewed-by: kvn, thartmann, shade
2024-01-04 13:11:47 +00:00
Jim Laskey
df22fb322e 8322512: StringBuffer.repeat does not work correctly after toString() was called
Reviewed-by: rriggs, jpai
2024-01-04 12:46:31 +00:00
Albert Mingkun Yang
c3cd1f1814 8323000: Parallel: Remove unused class declarations in psScavenge
Reviewed-by: stefank
2024-01-04 11:35:56 +00:00
Aleksey Shipilev
dd517c6404 8237842: Separate definitions for default cache line and padding sizes
Reviewed-by: stefank, kvn, stuefe, tschatzl
2024-01-04 08:39:50 +00:00
Albert Mingkun Yang
83564ea5f3 8322888: Parallel: Remove unused variables in PSPromotionManager
Reviewed-by: kbarrett
2024-01-04 08:32:00 +00:00
Albert Mingkun Yang
bbe0079d98 8322298: Obsolete unused AdaptiveSizePolicyCollectionCostMargin
Reviewed-by: tschatzl, sjohanss, kbarrett, gli
2024-01-04 08:31:50 +00:00
Matthias Baesken
730663649f 8322945: Problemlist runtime/CompressedOops/CompressedClassPointers.java on AIX
Reviewed-by: mdoerr
2024-01-04 08:21:57 +00:00
Matthias Baesken
1369c545ac 8322782: Clean up usages of unnecessary fully qualified class name "java.util.Arrays"
Reviewed-by: alanb, aivanov
2024-01-04 08:06:14 +00:00
Alan Bateman
4db7a1c3bb 8322818: Thread::getStackTrace can fail with InternalError if virtual thread is timed-parked when pinned
Reviewed-by: pchilanomate
2024-01-04 05:59:52 +00:00
Joe Wang
755722ced6 8322214: Return value of XMLInputFactory.getProperty() changed from boolean to String in JDK 22 early access builds
Reviewed-by: lancea
2024-01-04 05:04:45 +00:00
Denghui Dong
1cf9335b24 8321404: Limit the number of heap dumps triggered by HeapDumpBeforeFullGC/AfterFullGC
Reviewed-by: dholmes, cjplummer
2024-01-04 03:20:06 +00:00
Scott Gibbons
13c11487f7 8321599: Data loss in AVX3 Base64 decoding
Reviewed-by: sviswanathan, kvn
2024-01-04 01:36:28 +00:00
David Holmes
028ec7e744 8319948: jcmd man page needs to be updated
Co-authored-by: Thomas Stuefe <stuefe@openjdk.org>
Reviewed-by: kevinw, alanb
2024-01-03 22:30:54 +00:00
Brian Burkhalter
54b3ceeca2 8322877: java/io/BufferedInputStream/TransferTo.java failed with IndexOutOfBoundsException
Reviewed-by: alanb, stsypanov
2024-01-03 21:23:06 +00:00
Kim Barrett
30a0c61de0 8322879: Eliminate -Wparentheses warnings in x86-32 code
Reviewed-by: kvn, shade
2024-01-03 20:13:57 +00:00
Matias Saavedra Silva
409a39ec8d 8320276: Improve class initialization barrier in TemplateTable::_new
Reviewed-by: dholmes, fparain
2024-01-03 20:10:59 +00:00
Mikael Vidstedt
296c5b645a 8322873: Duplicate -ljava -ljvm options for libinstrument
Reviewed-by: dholmes, jwaters, erikj
2024-01-03 19:23:43 +00:00
Daniel D. Daugherty
cc9ab5f197 8322963: ProblemList java/io/BufferedInputStream/TransferTo.java
Reviewed-by: bpb
2024-01-03 17:17:24 +00:00
Carter Kozak
1551928502 8322142: JFR: Periodic tasks aren't orphaned between recordings
Reviewed-by: egahlin
2024-01-03 15:09:06 +00:00
Alan Bateman
b67b71cd87 8320707: Virtual thread test updates
Reviewed-by: jpai
2024-01-03 14:59:03 +00:00
Denghui Dong
7eb25ec7b3 8322853: Should use ConditionalMutexLocker in NativeHeapTrimmerThread::print_state
Reviewed-by: dholmes, shade
2024-01-03 13:10:22 +00:00
Denghui Dong
539da24863 8322779: C1: Remove the unused counter 'totalInstructionNodes'
Reviewed-by: kvn, thartmann
2024-01-03 13:08:48 +00:00
Matthias Baesken
a8e4229852 8322783: prioritize /etc/os-release over /etc/SuSE-release in hs_err/info output
Reviewed-by: dholmes, mdoerr
2024-01-03 09:15:07 +00:00
Stefan Karlsson
cbe329b90a 8321713: Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder
Reviewed-by: lkorinth, lmesnik
2024-01-03 08:53:01 +00:00
John Jiang
06dd735342 8322766: Micro bench SSLHandshake should use default algorithms
Reviewed-by: djelinski
2024-01-03 08:27:42 +00:00
Stefan Karlsson
9ab29f8dcd 8321718: ProcessTools.executeProcess calls waitFor before logging
Reviewed-by: dholmes, jpai
2024-01-03 07:48:57 +00:00
Albert Mingkun Yang
ba426d6887 8322841: Parallel: Remove unused using-declaration in MutableNUMASpace
Reviewed-by: kbarrett
2024-01-03 06:12:00 +00:00
Guoxiong Li
18cdc903cf 8322801: RISC-V: The riscv path of the debian sysroot had been changed
Reviewed-by: rehn, erikj
2024-01-03 04:17:15 +00:00
Joe Darcy
fcf8368eb1 8322248: Fix inconsistent wording in ElementFilter.typesIn
Reviewed-by: jjg, iris
2024-01-02 23:05:58 +00:00
Kim Barrett
a678416994 8322805: Eliminate -Wparentheses warnings in x86 code
Reviewed-by: dholmes, kvn
2024-01-02 22:47:18 +00:00
Kim Barrett
122bc7770e 8322758: Eliminate -Wparentheses warnings in C2 code
Reviewed-by: aph, kvn
2024-01-02 22:32:58 +00:00
Patricio Chilano Mateo
e9e694f4ef 8320275: assert(_chunk->bitmap().at(index)) failed: Bit not set at index
Reviewed-by: dlong, fparain
2024-01-02 22:22:03 +00:00
Kim Barrett
da1091eed9 8322807: Eliminate -Wparentheses warnings in gc code
Reviewed-by: ayang
2024-01-02 21:57:45 +00:00
Brian Burkhalter
c2477a5cad 8322868: java/io/BufferedInputStream/TransferToTrusted.java has bad copyright header
Reviewed-by: dcubed
2024-01-02 20:35:09 +00:00
Eirik Bjørsnøs
2cf5f01397 8322802: Add testing for ZipFile.getEntry respecting the 'Language encoding' flag
Reviewed-by: lancea, jpai
2024-01-02 20:31:38 +00:00
Sergey Tsypanov
38042ad4e9 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted
Reviewed-by: alanb, bpb
2024-01-02 20:05:31 +00:00
William Kemper
51238c4bdb 8322503: Shenandoah: Clarify gc state usage
Reviewed-by: ysr, gli
2024-01-02 17:08:36 +00:00
Renjith Kannath Pariyangad
9481d06e62 8320343: Generate GIF images for AbstractButton/5049549/bug5049549.java
Reviewed-by: aivanov
2024-01-02 16:16:20 +00:00
Adam Sotona
a5cf4210cd 8320360: ClassFile.parse: Some defect class files cause unexpected exceptions to be thrown
Reviewed-by: jpai
2024-01-02 12:58:53 +00:00
Adam Sotona
f9aec02f3c 8321540: ClassSignature.parseFrom() throws StringIndexOutOfBoundsException for invalid signatures
Reviewed-by: jpai
2024-01-02 12:39:41 +00:00
Jan Lahoda
7455b1b527 8322159: ThisEscapeAnalyzer crashes for erroneous code
Reviewed-by: vromero
2024-01-02 11:15:12 +00:00
ANUPAM DEV
d4fb30885b 8317846: Typo in API documentation of classes IdentityHashMap
Reviewed-by: mli, jpai
2024-01-02 11:10:15 +00:00
Guoxiong Li
d786c49525 8322751: ZGC: Fix comments about marking roots
Reviewed-by: eosterlund
2024-01-02 10:34:25 +00:00
Archie Cobbs
5852f3eafe 8322027: One XMLStreamException constructor fails to initialize cause
Reviewed-by: joehw, jpai
2024-01-02 10:13:37 +00:00
Lei Zaakjyu
be0e1c7b14 8297573: Parallel: Rename do_oop_nv to do_oop_work in subclasses of OopClosure
Reviewed-by: ayang, gli
2024-01-02 08:45:55 +00:00
Kim Barrett
7c1d481d6d 8322765: Eliminate -Wparentheses warnings in runtime code
Reviewed-by: dholmes
2024-01-02 03:06:13 +00:00
Kim Barrett
518ec97114 8322747: StringTable should be AllStatic
Reviewed-by: eosterlund
2023-12-31 17:26:57 +00:00
Christoph Langer
32d80e2caf 8322772: Clean up code after JDK-8322417
Reviewed-by: mdoerr, goetz, mbaesken, vtewari
2023-12-29 21:49:06 +00:00
Olga Mikhaltsova
19147f326c 8318158: RISC-V: implement roundD/roundF intrinsics
Co-authored-by: Vladimir Kempik <vkempik@openjdk.org>
Reviewed-by: luhenry, fyang, mli
2023-12-29 18:33:43 +00:00
John Jiang
2a59243cba 8322734: A redundant return in method padWithLen
Reviewed-by: jiefu
2023-12-27 02:31:50 +00:00
Eamonn McManus
4fc6b0ffa4 8068958: Timestamp.from(Instant) should throw when conversion is not possible
Reviewed-by: rgiulietti, rriggs
2023-12-23 22:53:23 +00:00
Jie Fu
28c82bf18d 8322661: Build broken due to missing jvmtiExport.hpp after JDK-8320139
Reviewed-by: chagedorn, never
2023-12-22 23:53:42 +00:00
Joshua Cao
7263e25d9b 8322490: cleanup CastNode construction
Reviewed-by: chagedorn, phh
2023-12-22 21:08:45 +00:00
Rajat Mahajan
f695ca5884 8321151: JDK-8294427 breaks Windows L&F on all older Windows versions
Reviewed-by: aivanov, achung
2023-12-22 20:16:45 +00:00
Eirik Bjørsnøs
93fedc12db 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem
Reviewed-by: alanb, lancea
2023-12-22 16:09:22 +00:00
Matthias Baesken
1230853343 8322163: runtime/Unsafe/InternalErrorTest.java fails on Alpine after JDK-8320886
Reviewed-by: mdoerr, clanger
2023-12-22 13:30:05 +00:00
Stefan Karlsson
dce7a5732e 8321683: Tests fail with AssertionError in RangeWithPageSize
Reviewed-by: stuefe, mbaesken
2023-12-22 13:25:39 +00:00
Albert Mingkun Yang
c53f845ec9 8322539: Parallel: Remove duplicated methods in PSAdaptiveSizePolicy
Reviewed-by: tschatzl, kbarrett
2023-12-22 07:58:09 +00:00
Raphael Mosaner
84c2379285 8320139: [JVMCI] VmObjectAlloc is not generated by intrinsics methods which allocate objects
Reviewed-by: never, dnsimon
2023-12-21 19:22:48 +00:00
Evgeny Astigeevich
3b908c4781 8319795: Static huge pages are not used for CodeCache
Reviewed-by: shade, simonis, thartmann, stuefe
2023-12-21 18:51:50 +00:00
Lei Zaakjyu
1802601a12 8293623: Simplify G1ConcurrentRefineThreadControl
Reviewed-by: kbarrett, tschatzl
2023-12-21 15:20:01 +00:00
Goetz Lindenmaier
6de23bf36e 8322418: Problem list gc/TestAllocHumongousFragment.java subtests for 8298781
Reviewed-by: mbaesken
2023-12-21 11:40:30 +00:00
Serguei Spitsyn
aff659aaf7 8322538: remove fatal from JVM_VirtualThread functions for !INCLUDE_JVMTI
Reviewed-by: dholmes, alanb
2023-12-21 10:07:31 +00:00
Thomas Schatzl
05745e3f1d 8319548: Unexpected internal name for Filler array klass causes error in VisualVM
Co-authored-by: Tomáš Hůrka <tomas.hurka@oracle.com>
Reviewed-by: ayang, dholmes
2023-12-21 09:17:31 +00:00
Gui Cao
e8768ae08d 8321972: test runtime/Unsafe/InternalErrorTest.java timeout on linux-riscv64 platform
Co-authored-by: Fei Yang <fyang@openjdk.org>
Reviewed-by: fyang
2023-12-21 01:28:48 +00:00
Sean Coffey
f6fe39ff11 8322078: ZipSourceCache.testKeySourceMapping() test fails with The process cannot access the file because it is being used by another process
Reviewed-by: lancea
2023-12-20 22:03:10 +00:00
Matthias Baesken
e204242118 8321017: Record in JFR that IEEE rounding mode was corrupted by loading a library
Reviewed-by: stuefe, jbechberger
2023-12-20 17:32:23 +00:00
Markus KARG
2d609557ff 8322141: SequenceInputStream.transferTo should not return as soon as Long.MAX_VALUE bytes have been transferred
Reviewed-by: vsitnikov, bpb, jpai
2023-12-20 17:00:44 +00:00
Albert Mingkun Yang
e0bad5153b 8322543: Parallel: Remove unused _major_pause_old_slope_counter
Reviewed-by: tschatzl
2023-12-20 15:56:50 +00:00
Weijun Wang
424c58f3e9 8187634: keystore.getCertificateAlias(cert) returns original alias, inconsistent with fix of JDK-6483657
Reviewed-by: mullan
2023-12-20 15:45:33 +00:00
Albert Mingkun Yang
14dab319a8 8322377: Parallel: Remove unused arg in adjust_promo_for_pause_time and adjust_eden_for_pause_time
Reviewed-by: tschatzl
2023-12-20 09:41:33 +00:00
Albert Mingkun Yang
5fcac7c846 8322364: Parallel: Remove unused SizePolicyTrueValues enum members
Reviewed-by: tschatzl
2023-12-20 09:41:24 +00:00
Goetz Lindenmaier
2f917bff5c 8322417: Console read line with zero out should zero out when throwing exception
Reviewed-by: mbaesken, stuefe, naoto
2023-12-20 08:01:08 +00:00
bobpengxie
7db69e6a12 8322513: Build failure with minimal
Reviewed-by: dholmes, rehn
2023-12-20 07:46:11 +00:00
Ioi Lam
f7dc257a20 8322321: Add man page doc for -XX:+VerifySharedSpaces
Reviewed-by: dholmes, ccheung
2023-12-20 05:50:45 +00:00
Guoxiong Li
97db670956 8321688: Build on linux with GCC 7.5.0 fails after 8319577
Reviewed-by: kbarrett, sviswanathan
2023-12-20 03:58:12 +00:00
Brian Burkhalter
51be857f3c 8322166: Files.isReadable/isWritable/isExecutable expensive when file does not exist
Reviewed-by: alanb
2023-12-19 18:27:06 +00:00
Serguei Spitsyn
0f8e4e0a81 8311218: fatal error: stuck in JvmtiVTMSTransitionDisabler::VTMS_transition_disable
Reviewed-by: lmesnik, alanb
2023-12-19 17:26:55 +00:00
Ludovic Henry
6313223bcd 8315856: RISC-V: Use Zacas extension for cmpxchg
Reviewed-by: rehn, fyang
2023-12-19 14:15:24 +00:00
Frederic Thevenet
3bc5679cab 8322309: Fix an inconsistancy in spacing style in spec.gmk.template
Reviewed-by: sgehwolf, erikj
2023-12-19 13:54:49 +00:00
Erik Österlund
be49dabd0d 8321619: Generational ZGC: ZColorStoreGoodOopClosure is only valid for young objects
Reviewed-by: stefank, sjohanss
2023-12-19 13:49:01 +00:00
Quan Anh Mai
ac968c36d7 8319451: PhaseIdealLoop::conditional_move is too conservative
Reviewed-by: redestad, thartmann, kvn
2023-12-19 10:39:50 +00:00
Guoxiong Li
0ad6c9e3d9 8322255: Generational ZGC: ZPageSizeMedium should be set before MaxTenuringThreshold
Reviewed-by: tschatzl, eosterlund
2023-12-19 10:39:37 +00:00
Hamlin Li
fff2e580cd 8322195: RISC-V: Minor improvement of MD5 instrinsic
Reviewed-by: luhenry, fyang
2023-12-19 08:45:15 +00:00
Albert Mingkun Yang
7b4d62c794 8322300: Remove redundant arg in PSAdaptiveSizePolicy::adjust_promo_for_pause_time
Reviewed-by: tschatzl
2023-12-19 08:39:45 +00:00
Jatin Bhateja
76637c53c5 8321648: Integral gather optimized mask computation.
Reviewed-by: thartmann, sviswanathan
2023-12-19 07:51:52 +00:00
Gui Cao
59073fa3eb 8322154: RISC-V: JDK-8315743 missed change in MacroAssembler::load_reserved
Reviewed-by: fyang, rehn, luhenry
2023-12-19 07:45:59 +00:00
William Kemper
808a03927c 8321815: Shenandoah: gc state should be synchronized to java threads only once per safepoint
Reviewed-by: kdnilsen, ysr
2023-12-19 00:09:31 +00:00
Alex Menkov
459957f30a 8322062: com/sun/jdi/JdwpAllowTest.java does not performs negative testing with prefix length
Reviewed-by: cjplummer, sspitsyn
2023-12-18 21:14:09 +00:00
Brian Burkhalter
b98d13fc3c 8259637: java.io.File.getCanonicalPath() returns different values for same path
Reviewed-by: alanb
2023-12-18 18:10:34 +00:00
Ioi Lam
4f3de09672 8321940: Improve CDSHeapVerifier in handling of interned strings
Reviewed-by: ccheung, matsaave
2023-12-18 17:56:07 +00:00
Matias Saavedra Silva
1fde8b868a 8321933: TestCDSVMCrash.java spawns two processes
Reviewed-by: ccheung, iklam
2023-12-18 17:05:22 +00:00
Afshin Zafari
66aeb89469 8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)"
Reviewed-by: gziemski, stuefe
2023-12-18 16:52:36 +00:00
Yi-Fan Tsai
a5122d7f6c 8314029: Add file name parameter to Compiler.perfmap
Reviewed-by: cjplummer, eastigeevich
2023-12-18 15:20:59 +00:00
Yi-Fan Tsai
c0a3b76958 8316197: Make tracing of inline cache available in unified logging
Reviewed-by: kvn, dholmes
2023-12-18 15:19:16 +00:00
Albert Mingkun Yang
7e1d26dd5c 8322287: Parallel: Remove unused arg in adjust_eden_for_pause_time and adjust_eden_for_minor_pause_time
Reviewed-by: tschatzl
2023-12-18 14:29:00 +00:00
Albert Mingkun Yang
5584ba36c6 8322097: Serial: Refactor CardTableRS::find_first_clean_card
Reviewed-by: tschatzl, iwalulya
2023-12-18 13:30:34 +00:00
Albert Mingkun Yang
75d382d3db 8322204: Parallel: Remove unused _collection_cost_margin_fraction
Reviewed-by: tschatzl
2023-12-18 12:57:12 +00:00
Albert Mingkun Yang
febf8af4b5 8322089: Parallel: Remove PSAdaptiveSizePolicy::set_survivor_size
Reviewed-by: tschatzl
2023-12-18 12:57:01 +00:00
Alexander Scherbatiy
10335f60f9 7001133: OutOfMemoryError by CustomMediaSizeName implementation
Reviewed-by: psadhukhan
2023-12-18 12:11:41 +00:00
Lei Zaakjyu
ecff9c1ef7 8315040: Remove redundant check in WorkerPolicy::parallel_worker_threads
Reviewed-by: ayang, tschatzl
2023-12-18 11:05:48 +00:00
Hamlin Li
a247d0c74b 8322209: RISC-V: Enable some tests related to MD5 instrinsic
Reviewed-by: luhenry, fyang
2023-12-18 10:31:29 +00:00
Johan Sjölen
341b4e09b7 8321975: Print when add_reserved_region fails even in product mode
Reviewed-by: dholmes, stuefe
2023-12-18 09:45:26 +00:00
Ivan Walulya
f696796e88 8280087: G1: Handle out-of-mark stack situations during reference processing more gracefully
Reviewed-by: tschatzl, ayang
2023-12-18 09:43:53 +00:00
Lei Zaakjyu
413dbf8757 8322205: Parallel: Remove unused arg in PSCardTable::pre_scavenge
Reviewed-by: ayang, tschatzl
2023-12-18 09:31:13 +00:00
Thomas Schatzl
f553819502 8317007: Add bulk removal of dead nmethods during class unloading
Reviewed-by: ayang, iwalulya
2023-12-18 08:44:43 +00:00
Steven Schlansker
34351b7a79 8321892: Typo in log message logged by src/hotspot/share/nmt/virtualMemoryTracker.cpp
Reviewed-by: dholmes, azafari
2023-12-16 01:40:19 +00:00
Alisen Chung
b061b6678f 8322041: JDK 22 RDP1 L10n resource files update
Reviewed-by: almatvee, cstein, asemenyuk, joehw, jjg
2023-12-16 01:03:09 +00:00
Calvin Cheung
dcdcd48d8f 8321479: java -D-D crashes
Reviewed-by: dholmes, iklam
2023-12-15 19:04:42 +00:00
Naoto Sato
87ef73329f 8321958: @param/@return descriptions of ZoneRules#isDaylightSavings() are incorrect
Reviewed-by: jlu, joehw, jpai
2023-12-15 17:33:50 +00:00
Tom Rodriguez
05f7f0ade2 8321288: [JVMCI] HotSpotJVMCIRuntime doesn't clean up WeakReferences in resolvedJavaTypes
Reviewed-by: dnsimon, kvn
2023-12-15 17:25:24 +00:00
Roger Riggs
6311dabe68 8322018: Test java/lang/String/CompactString/MaxSizeUTF16String.java fails with -Xcomp
Reviewed-by: jpai
2023-12-15 16:13:36 +00:00
Liam Miller-Cushon
bdebf198bb 8322175: test/langtools/tools/javac/classreader/BadMethodParameter.java doesn't compile
Reviewed-by: jlahoda
2023-12-15 12:18:01 +00:00
Liam Miller-Cushon
20de541b13 8322040: Missing array bounds check in ClassReader.parameter
Reviewed-by: vromero
2023-12-15 10:16:35 +00:00
Matthias Baesken
b31454e362 8322098: os::Linux::print_system_memory_info enhance the THP output with /sys/kernel/mm/transparent_hugepage/hpage_pmd_size
Reviewed-by: mdoerr, lucy
2023-12-15 07:42:39 +00:00
Gui Cao
0be0775a76 8320397: RISC-V: Avoid passing t0 as temp register to MacroAssembler:: cmpxchg_obj_header/cmpxchgptr
Reviewed-by: rehn, fyang
2023-12-15 07:23:50 +00:00
Joshua Cao
6dfb8120c2 8321823: Remove redundant PhaseGVN transform_no_reclaim
Reviewed-by: chagedorn, phh
2023-12-15 00:35:37 +00:00
Zhengyu Gu
a7dde578a8 8322057: Memory leaks in creating jfr symbol array
Reviewed-by: mgronlun
2023-12-14 22:33:34 +00:00
David Holmes
692be57738 8322065: Initial nroff manpage generation for JDK 23
Reviewed-by: alanb
2023-12-14 21:26:10 +00:00
David Holmes
d02bc873f8 8309981: Remove expired flags in JDK 23
Reviewed-by: alanb, kvn
2023-12-14 21:24:17 +00:00
Justin Lu
8b24851b9d 8321480: ISO 4217 Amendment 176 Update
Reviewed-by: naoto
2023-12-14 21:16:19 +00:00
Ben Perez
c328f9589d 8296787: Unify debug printing format of X.509 cert serial numbers
Reviewed-by: mullan, coffeys
2023-12-14 17:57:36 +00:00
Aleksei Voitylov
fde5b16817 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled
Co-authored-by: Roger Riggs <rriggs@openjdk.org>
Reviewed-by: rriggs
2023-12-14 14:39:04 +00:00
Weijun Wang
45a9ade337 8202598: keytool -certreq output contains inconsistent line separators
Reviewed-by: hchao, mullan
2023-12-14 14:37:15 +00:00
Darragh Clarke
62b7c5eaed 8319647: Few java/lang/System/LoggerFinder/modules tests ignore vm flags
Reviewed-by: lmesnik
2023-12-14 13:24:19 +00:00
Daniel Lundén
69014cd55b 8320682: [AArch64] C1 compilation fails with "Field too big for insn"
Reviewed-by: thartmann, aph, dlong
2023-12-14 13:09:39 +00:00
Albert Mingkun Yang
5a97dbf606 8322034: Parallel: Remove unused methods in PSAdaptiveSizePolicy
Reviewed-by: kbarrett
2023-12-14 12:30:47 +00:00
Adam Sotona
2838a916ab 8288989: Make tests not depend on the source code
Reviewed-by: mcimadamore
2023-12-14 11:36:57 +00:00
Jaikiran Pai
d2ba3b1ef7 8312150: Remove -Xnoagent option
Reviewed-by: dholmes, alanb
2023-12-14 10:36:23 +00:00
Daniel Lundén
d632d743e0 8321820: TestLoadNIdeal fails on 32-bit because -XX:+UseCompressedOops is not recognized
Reviewed-by: rcastanedalo, chagedorn, shade
2023-12-14 09:29:34 +00:00
Joe Wang
ddbbd36e4b 8320279: Link issues in java.xml module-info.java
Reviewed-by: iris, lancea, naoto
2023-12-14 07:45:02 +00:00
Tobias Hartmann
c8ad7b7f84 8321974: Crash in ciKlass::is_subtype_of because TypeAryPtr::_klass is not initialized
Reviewed-by: roland, kvn
2023-12-14 07:23:21 +00:00
1513 changed files with 36556 additions and 19118 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -44,8 +44,8 @@ for test in $failures $errors; do
base_path="$(echo "$test" | tr '#' '_')"
report_file="$report_dir/$base_path.jtr"
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
echo "#### <a id="$anchor">$test"
echo '<details><summary>View test results</summary>'
echo ''
echo '```'
@@ -73,6 +73,20 @@ for test in $failures $errors; do
echo ''
fi
if [[ "$replay_files" != "" ]]; then
echo '<details><summary>View HotSpot replay file</summary>'
echo ''
for replay in $replay_files; do
echo '```'
echo "$replay:"
echo ''
cat "$replay"
echo '```'
done
echo '</details>'
echo ''
fi
done >> $GITHUB_STEP_SUMMARY
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github

View File

@@ -1,5 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright 2015 Google, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@@ -26,12 +27,17 @@ usage() {
echo "$0 DIR ..."
echo "Modifies in place all the java source files found"
echo "in the given directories so that all java language modifiers"
echo "are in the canonical order given by Modifier#toString()."
echo "are in the canonical order."
echo "Tries to get it right even within javadoc comments,"
echo "and even if the list of modifiers spans 2 lines."
echo
echo "See:"
echo "https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#toString-int-"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.3.1"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.3"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.8.3"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.1.1"
echo "https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.4"
echo
echo "Example:"
echo "$0 jdk/src/java.base jdk/test/java/{util,io,lang}"
@@ -46,7 +52,7 @@ for dir in "${dirs[@]}"; do [[ -d "$dir" ]] || usage; done
declare -ar modifiers=(
public protected private
abstract static final transient
abstract default static final sealed non-sealed transient
volatile synchronized native strictfp
)
declare -r SAVE_IFS="$IFS"

View File

@@ -753,6 +753,8 @@ macOS.</p>
<code>sudo apt-get install libfontconfig-dev</code>.</li>
<li>To install on an rpm-based Linux, try running
<code>sudo yum install fontconfig-devel</code>.</li>
<li>To install on Alpine Linux, try running
<code>sudo apk add fontconfig-dev</code>.</li>
</ul>
<p>Use <code>--with-fontconfig-include=&lt;path&gt;</code> and
<code>--with-fontconfig=&lt;path&gt;</code> if <code>configure</code>
@@ -1499,9 +1501,7 @@ like this:</p>
--resolve-deps \
buster \
~/sysroot-arm64 \
https://httpredir.debian.org/debian/</code></pre>
<p>If the target architecture is <code>riscv64</code>, the path should
be <code>debian-ports</code> instead of <code>debian</code>.</p></li>
https://httpredir.debian.org/debian/</code></pre></li>
<li><p>To create an Ubuntu-based chroot:</p>
<pre><code>sudo debootstrap \
--arch=arm64 \

View File

@@ -572,6 +572,7 @@ required on all platforms except Windows and macOS.
libfontconfig-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
fontconfig-devel`.
* To install on Alpine Linux, try running `sudo apk add fontconfig-dev`.
Use `--with-fontconfig-include=<path>` and `--with-fontconfig=<path>` if
`configure` does not automatically locate the platform Fontconfig files.
@@ -1316,9 +1317,6 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
https://httpredir.debian.org/debian/
```
If the target architecture is `riscv64`, the path should be `debian-ports`
instead of `debian`.
* To create an Ubuntu-based chroot:
```

View File

@@ -139,11 +139,6 @@ ifeq ($(IS_DRAFT), true)
endif
DRAFT_TEXT := This specification is not final and is subject to change. \
Use is subject to <a href="$(LICENSE_URL)">license terms</a>.
# Workaround stylesheet bug
HEADER_STYLE := style="margin-top: 9px;"
else
HEADER_STYLE := style="margin-top: 14px;"
endif
# $1 - Relative prefix to COPYRIGHT_URL
@@ -339,7 +334,7 @@ define SetupApiDocsGenerationBody
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
Specification
$1_WINDOW_TITLE := $$(subst &amp;,&,$$($1_SHORT_NAME))$$(DRAFT_MARKER_TITLE)
$1_HEADER_TITLE := <div $$(HEADER_STYLE)><strong>$$($1_SHORT_NAME)</strong> \
$1_HEADER_TITLE := <div><strong>$$($1_SHORT_NAME)</strong> \
$$(DRAFT_MARKER_STR)</div>
ifneq ($$($1_OTHER_VERSIONS), )
$1_JAVADOC_BOTTOM := $$(call JAVADOC_BOTTOM, <a href="$$($1_OTHER_VERSIONS)">Other versions.</a>)
@@ -647,7 +642,7 @@ ifeq ($(ENABLE_PANDOC), true)
GLOBAL_SPECS_DEFAULT_CSS_FILE := $(DOCS_OUTPUTDIR)/resources/jdk-default.css
# Unset the following to suppress the link to the tool guides
NAV_LINK_GUIDES := --nav-link-guides
HEADER_RIGHT_SIDE_INFO := <strong>$(subst &amp;,&,$(JDK_SHORT_NAME))$(DRAFT_MARKER_STR)</strong>
HEADER_RIGHT_SIDE_INFO := <strong>$(subst &amp;,&,$(JDK_SHORT_NAME))</strong>$(DRAFT_MARKER_STR)
$(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \

View File

@@ -969,20 +969,28 @@ else
jdk.jdeps-gendata: java
# The ct.sym generation uses all the moduleinfos as input
jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS) $(JAVA_TARGETS)
# jdk.compiler-gendata needs the BUILD_JDK. If the BUILD_JDK was supplied
# externally, no extra prerequisites are needed.
# jdk.compiler gendata generates ct.sym, which requires all generated
# java source and compiled classes present.
jdk.compiler-gendata: $(JAVA_TARGETS)
# jdk.javadoc gendata generates element-list, which requires all java sources
# but not compiled classes.
jdk.javadoc-gendata: $(GENSRC_TARGETS)
# ct.sym and element-list generation also needs the BUILD_JDK. If the
# BUILD_JDK was supplied externally, no extra prerequisites are needed.
ifeq ($(CREATE_BUILDJDK), true)
ifneq ($(CREATING_BUILDJDK), true)
# When cross compiling and an external BUILD_JDK wasn't supplied, it's
# produced by the create-buildjdk target.
jdk.compiler-gendata: create-buildjdk
jdk.javadoc-gendata: create-buildjdk
endif
else ifeq ($(EXTERNAL_BUILDJDK), false)
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
# the javac launcher is needed.
jdk.compiler-gendata: jdk.compiler-launchers
jdk.javadoc-gendata: jdk.compiler-launchers
endif
# Declare dependencies between jmod targets.

View File

@@ -620,11 +620,16 @@ define SetupRunMicroTestBody
$1_MICRO_WARMUP_TIME := -w $$(MICRO_WARMUP_TIME)
endif
# Microbenchmarks are executed from the root of the test image directory.
# This enables JMH tests to add dependencies using relative paths such as
# -Djava.library.path=micro/native
run-test-$1: pre-run-test
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, ( \
$$(CD) $$(TEST_IMAGE_DIR) && \
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \
-jar $$($1_MICRO_BENCHMARKS_JAR) \
$$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -117,6 +117,11 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}],
IF_FALSE: [
DEBUG_PREFIX_CFLAGS=
],
IF_TRUE: [
# Add debug prefix map gcc system include paths, as they cause
# non-deterministic debug paths depending on gcc path location.
DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS
]
)
fi
@@ -158,6 +163,55 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
AC_SUBST(ASFLAGS_DEBUG_SYMBOLS)
])
# gcc will embed the full system include paths in the debug info
# resulting in non-deterministic debug symbol files and thus
# non-reproducible native libraries if gcc includes are located
# in different paths.
# Add -fdebug-prefix-map'ings for root and gcc include paths,
# pointing to a common set of folders so that the binaries are deterministic:
# root include : /usr/include
# gcc include : /usr/local/gcc_include
# g++ include : /usr/local/gxx_include
AC_DEFUN([DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS],
[
# Determine gcc system include paths.
# Assume default roots to start with:
GCC_ROOT_INCLUDE="/usr/include"
# Determine is sysroot or devkit specified?
if test "x$SYSROOT" != "x"; then
GCC_ROOT_INCLUDE="${SYSROOT%/}/usr/include"
fi
# Add root include mapping => /usr/include
GCC_INCLUDE_DEBUG_MAP_FLAGS="-fdebug-prefix-map=${GCC_ROOT_INCLUDE}/=/usr/include/"
# Add gcc system include mapping => /usr/local/gcc_include
# Find location of stddef.h using build C compiler
GCC_SYSTEM_INCLUDE=`$ECHO "#include <stddef.h>" | \
$CC $CFLAGS -v -E - 2>&1 | \
$GREP stddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
if test "x$GCC_SYSTEM_INCLUDE" != "x"; then
GCC_SYSTEM_INCLUDE=`$DIRNAME $GCC_SYSTEM_INCLUDE`
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
-fdebug-prefix-map=${GCC_SYSTEM_INCLUDE}/=/usr/local/gcc_include/"
fi
# Add g++ system include mapping => /usr/local/gxx_include
# Find location of cstddef using build C++ compiler
GXX_SYSTEM_INCLUDE=`$ECHO "#include <cstddef>" | \
$CXX $CXXFLAGS -v -E -x c++ - 2>&1 | \
$GREP cstddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
if test "x$GXX_SYSTEM_INCLUDE" != "x"; then
GXX_SYSTEM_INCLUDE=`$DIRNAME $GXX_SYSTEM_INCLUDE`
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
-fdebug-prefix-map=${GXX_SYSTEM_INCLUDE}/=/usr/local/gxx_include/"
fi
# Add to debug prefix cflags
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS $GCC_INCLUDE_DEBUG_MAP_FLAGS"
])
AC_DEFUN([FLAGS_SETUP_WARNINGS],
[
# Set default value.
@@ -425,7 +479,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
[
#### OS DEFINES, these should be independent on toolchain
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CFLAGS_OS_DEF_JVM="-DLINUX"
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"

View File

@@ -191,7 +191,7 @@ PRODUCT_NAME := @PRODUCT_NAME@
PRODUCT_SUFFIX := @PRODUCT_SUFFIX@
JDK_RC_PLATFORM_NAME := @JDK_RC_PLATFORM_NAME@
JDK_RC_NAME := @JDK_RC_NAME@
JDK_RC_COMPANY_NAME:=@JDK_RC_COMPANY_NAME@
JDK_RC_COMPANY_NAME := @JDK_RC_COMPANY_NAME@
COMPANY_NAME := @COMPANY_NAME@
HOTSPOT_VM_DISTRO := @HOTSPOT_VM_DISTRO@
MACOSX_BUNDLE_NAME_BASE := @MACOSX_BUNDLE_NAME_BASE@

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -389,6 +389,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
CFLAGS="$ORG_CFLAGS"
CXXFLAGS="$ORG_CXXFLAGS"
# filter out some unwanted additions autoconf may add to CXX; we saw this on macOS with autoconf 2.72
UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11)
CXX="$cxx_filtered"
])
# Check if a compiler is of the toolchain type we expect, and save the version

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -199,7 +199,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
if test -z "$legal_values"; then
$1="$2"
else
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
result=`$GREP -Fvx -- "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
$1=${result//$'\n'/ }
fi
])
@@ -226,7 +226,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
if test -z "$illegal_values"; then
$1=""
else
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
result=`$GREP -Fx -- "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
$1=${result//$'\n'/ }
fi
])

View File

@@ -223,6 +223,7 @@ JVM_VirtualThreadEnd
JVM_VirtualThreadMount
JVM_VirtualThreadUnmount
JVM_VirtualThreadHideFrames
JVM_VirtualThreadDisableSuspend
# Scoped values
JVM_EnsureMaterializedForStackWalk_func

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -548,6 +548,7 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
$(CONFIG) \
--with-sysroot=$(SYSROOT) \
--with-debug-prefix-map=$(OUTPUT_ROOT)=devkit \
--enable-languages=c,c++ \
--enable-shared \
--disable-nls \

View File

@@ -85,7 +85,7 @@ CFLAGS_VM_VERSION := \
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
empty-body implicit-fallthrough int-in-bool-context \
maybe-uninitialized missing-field-initializers parentheses \
maybe-uninitialized missing-field-initializers \
shift-negative-value unknown-pragmas
DISABLED_WARNINGS_clang := sometimes-uninitialized \

View File

@@ -48,9 +48,6 @@ ifneq ($(FDLIBM_CFLAGS), )
endif
ifeq ($(call isTargetOs, linux), true)
BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1289,25 +1289,58 @@ public class CLDRConverter {
*/
private static void generateTZDBShortNamesMap() throws IOException {
Files.walk(Path.of(tzDataDir), 1, FileVisitOption.FOLLOW_LINKS)
.filter(p -> p.toFile().isFile())
.filter(p -> p.toFile().isFile() && !p.endsWith("jdk11_backward"))
.forEach(p -> {
try {
String zone = null;
String rule = null;
String format = null;
boolean inVanguard = false;
boolean inRearguard = false;
for (var line : Files.readAllLines(p)) {
if (line.contains("#STDOFF")) continue;
// Interpret the line in rearguard mode so that STD/DST
// correctly handles negative DST cases, such as "GMT/IST"
// vs. "IST/GMT" case for Europe/Dublin
if (inVanguard) {
if (line.startsWith("# Rearguard")) {
inVanguard = false;
inRearguard = true;
}
continue;
} else if (line.startsWith("# Vanguard")) {
inVanguard = true;
continue;
}
if (inRearguard) {
if (line.startsWith("# End of rearguard")) {
inRearguard = false;
continue;
} else {
if (line.startsWith("#\t")) {
line = line.substring(1); // omit #
}
}
}
if (line.isBlank() || line.matches("^[ \t]*#.*")) {
// ignore blank/comment lines
continue;
}
// remove comments in-line
line = line.replaceAll("[ \t]*#.*", "");
// Zone line
if (line.startsWith("Zone")) {
if (zone != null) {
tzdbShortNamesMap.put(zone, format + NBSP + rule);
}
var zl = line.split("[ \t]+", -1);
zone = zl[1];
rule = zl[3];
format = zl[4];
} else {
if (zone != null) {
if (line.isBlank()) {
if (line.startsWith("Rule") ||
line.startsWith("Link")) {
tzdbShortNamesMap.put(zone, format + NBSP + rule);
zone = null;
rule = null;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
@@ -339,9 +340,15 @@ public class GenerateCurrencyData {
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
checkCurrencyCode(currencyCode);
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
if (tableEntry == INVALID_COUNTRY_ENTRY ||
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {
// Do not allow a future currency to be classified as an otherCurrency,
// otherwise it will leak out into Currency:getAvailableCurrencies
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');
// If neither a simple currency, or one defined in the future
// then the current currency is applicable to be added to the otherTable
if (!futureCurrency && !simpleCurrency) {
if (otherCurrenciesCount == maxOtherCurrencies) {
throw new RuntimeException("too many other currencies");
}

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
LDFLAGS_macosx := -L$(call FindLibDirForModule, java.base), \
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
LIBS := $(JDKLIB_LIBS), \
LIBS_unix := -ljava -ljvm $(LIBZ_LIBS), \
LIBS_unix := $(LIBZ_LIBS), \
LIBS_linux := -ljli $(LIBDL), \
LIBS_aix := -liconv -ljli_static $(LIBDL), \
LIBS_macosx := -ljli -liconv -framework Cocoa -framework Security \

View File

@@ -107,6 +107,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
--enable-preview \
-XDsuppressNotes \
-processor org.openjdk.jmh.generators.BenchmarkProcessor, \
JAVA_FLAGS := \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,10 @@ BUILD_LIBTEST_OUTPUT_DIR := $(OUTPUTDIR)/support/test/lib/native
BUILD_LIBTEST_IMAGE_DIR := $(TEST_IMAGE_DIR)/lib
ifeq ($(call isTargetOs, windows), false)
BUILD_LIBTEST_LIBRARIES_EXCLUDE += libFileUtils.c
endif
# This evaluation is expensive and should only be done if this target was
# explicitly called.
ifneq ($(filter build-test-lib-native, $(MAKECMDGOALS)), )

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -857,6 +857,11 @@ else
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
endif
ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, aarch64)), false)
BUILD_HOTSPOT_JTREG_EXCLUDE += libTestSVEWithJNI.c
endif
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
ifeq ($(call isTargetOs, windows), true)

View File

@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1716,7 +1716,7 @@ public class Intro extends JPanel {
this.beginning = beg;
this.ending = end;
fm = surf.getMetrics(font);
java.util.Arrays.sort(members);
Arrays.sort(members);
cast.add("CONTRIBUTORS");
cast.add(" ");
cast.addAll(Arrays.asList(members));

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2014, 2021, Red Hat, Inc. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
@@ -8237,6 +8237,24 @@ instruct popCountL_mem(iRegINoSp dst, memory8 mem, vRegD tmp) %{
ins_pipe(pipe_class_default);
%}
// ============================================================================
// VerifyVectorAlignment Instruction
instruct verify_vector_alignment(iRegP addr, immL_positive_bitmaskI mask, rFlagsReg cr) %{
match(Set addr (VerifyVectorAlignment addr mask));
effect(KILL cr);
format %{ "verify_vector_alignment $addr $mask \t! verify alignment" %}
ins_encode %{
Label Lskip;
// check if masked bits of addr are zero
__ tst($addr$$Register, $mask$$constant);
__ br(Assembler::EQ, Lskip);
__ stop("verify_vector_alignment found a misaligned vector memory access");
__ bind(Lskip);
%}
ins_pipe(pipe_slow);
%}
// ============================================================================
// MemBar Instruction

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -282,7 +282,8 @@ void LIR_Assembler::osr_entry() {
__ bind(L);
}
#endif
__ ldp(r19, r20, Address(OSR_buf, slot_offset));
__ ldr(r19, Address(OSR_buf, slot_offset));
__ ldr(r20, Address(OSR_buf, slot_offset + BytesPerWord));
__ str(r19, frame_map()->address_for_monitor_lock(i));
__ str(r20, frame_map()->address_for_monitor_object(i));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -111,10 +111,10 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
// Handle existing monitor.
bind(object_has_monitor);
// The object's monitor m is unlocked iff m->owner == NULL,
// The object's monitor m is unlocked iff m->owner == nullptr,
// otherwise m->owner may contain a thread or a stack address.
//
// Try to CAS m->owner from NULL to current thread.
// Try to CAS m->owner from null to current thread.
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
/*release*/ true, /*weak*/ false, tmp3Reg); // Sets flags for result

View File

@@ -28,6 +28,7 @@
#include "code/compiledIC.hpp"
#include "code/icBuffer.hpp"
#include "code/nmethod.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
@@ -90,9 +91,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023, Red Hat, Inc. All rights reserved.
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
0x7ffc, 0x7ffe, 0x7fff
};
static constexpr int num_immediates = sizeof(immediates) / sizeof(immediates[0]);
const int start_index = aslr ? os::random() : 0;
const int start_index = aslr ? os::next_random((int)os::javaTimeNanos()) : 0;
constexpr int max_tries = 64;
for (int ntry = 0; result == nullptr && ntry < max_tries; ntry ++) {
// As in os::attempt_reserve_memory_between, we alternate between higher and lower

View File

@@ -156,8 +156,6 @@
static void verify_deopt_original_pc( CompiledMethod* nm, intptr_t* unextended_sp);
#endif
const ImmutableOopMap* get_oop_map() const;
public:
// Constructors

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -195,7 +195,7 @@ inline bool frame::equal(frame other) const {
&& unextended_sp() == other.unextended_sp()
&& fp() == other.fp()
&& pc() == other.pc();
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
assert(!ret || (cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
return ret;
}
@@ -359,20 +359,6 @@ inline int frame::sender_sp_ret_address_offset() {
return frame::sender_sp_offset - frame::return_addr_offset;
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
//------------------------------------------------------------------------------
// frame::sender
inline frame frame::sender(RegisterMap* map) const {

View File

@@ -42,8 +42,12 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
// and Operational Models for ARMv8"
#define CPU_MULTI_COPY_ATOMIC
// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 64
// The default padding size for data structures to avoid false sharing.
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
// According to the ARMv8 ARM, "Concurrent modification and execution
// of instructions can lead to the resulting instruction performing
// any behavior that can be achieved by executing any sequence of

View File

@@ -28,7 +28,6 @@
#include "code/codeCache.hpp"
#include "code/compiledIC.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_aarch64.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.hpp"
@@ -189,8 +188,6 @@ void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");
ResourceMark rm;
int code_size = NativeInstruction::instruction_size;
address addr_call = addr_at(0);
bool reachable = Assembler::reachable_from_branch_at(addr_call, dest);
assert(NativeCall::is_call_at(addr_call), "unexpected code at call site");
@@ -560,18 +557,23 @@ static bool is_movk_to_zr(uint32_t insn) {
}
#endif
void NativePostCallNop::patch(jint diff) {
bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
if (((oopmap_slot & 0xff) != oopmap_slot) || ((cb_offset & 0xffffff) != cb_offset)) {
return false; // cannot encode
}
uint32_t data = ((uint32_t)oopmap_slot << 24) | cb_offset;
#ifdef ASSERT
assert(diff != 0, "must be");
assert(data != 0, "must be");
uint32_t insn1 = uint_at(4);
uint32_t insn2 = uint_at(8);
assert (is_movk_to_zr(insn1) && is_movk_to_zr(insn2), "must be");
#endif
uint32_t lo = diff & 0xffff;
uint32_t hi = (uint32_t)diff >> 16;
uint32_t lo = data & 0xffff;
uint32_t hi = data >> 16;
Instruction_aarch64::patch(addr_at(4), 20, 5, lo);
Instruction_aarch64::patch(addr_at(8), 20, 5, hi);
return true; // successfully encoded
}
void NativeDeoptInstruction::verify() {

View File

@@ -691,16 +691,20 @@ public:
return (insns & 0xffe0001fffffffff) == 0xf280001fd503201f;
}
jint displacement() const {
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const {
uint64_t movk_insns = *(uint64_t*)addr_at(4);
uint32_t lo = (movk_insns >> 5) & 0xffff;
uint32_t hi = (movk_insns >> (5 + 32)) & 0xffff;
uint32_t result = (hi << 16) | lo;
return (jint)result;
uint32_t data = (hi << 16) | lo;
if (data == 0) {
return false; // no information encoded
}
cb_offset = (data & 0xffffff);
oopmap_slot = (data >> 24) & 0xff;
return true; // decoding succeeded
}
void patch(jint diff);
bool patch(int32_t oopmap_slot, int32_t cb_offset);
void make_deopt();
};

View File

@@ -310,7 +310,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
uint int_args = 0;
uint fp_args = 0;
uint stk_args = 0; // inc by 2 each time
uint stk_args = 0;
for (int i = 0; i < total_args_passed; i++) {
switch (sig_bt[i]) {
@@ -322,8 +322,9 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (int_args < Argument::n_int_register_parameters_j) {
regs[i].set1(INT_ArgReg[int_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set1(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
stk_args += 1;
}
break;
case T_VOID:
@@ -340,6 +341,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (int_args < Argument::n_int_register_parameters_j) {
regs[i].set2(INT_ArgReg[int_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set2(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
}
@@ -348,8 +350,9 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (fp_args < Argument::n_float_register_parameters_j) {
regs[i].set1(FP_ArgReg[fp_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set1(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
stk_args += 1;
}
break;
case T_DOUBLE:
@@ -357,6 +360,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (fp_args < Argument::n_float_register_parameters_j) {
regs[i].set2(FP_ArgReg[fp_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set2(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
}
@@ -367,7 +371,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
}
}
return align_up(stk_args, 2);
return stk_args;
}
// Patch the callers callsite with entry to compiled code if it exists.

View File

@@ -3603,11 +3603,9 @@ void TemplateTable::_new() {
// get InstanceKlass
__ load_resolved_klass_at_offset(r4, r3, r4, rscratch1);
// make sure klass is initialized & doesn't have finalizer
// make sure klass is fully initialized
__ ldrb(rscratch1, Address(r4, InstanceKlass::init_state_offset()));
__ cmp(rscratch1, (u1)InstanceKlass::fully_initialized);
__ br(Assembler::NE, slow_case);
// make sure klass is initialized
assert(VM_Version::supports_fast_class_init_checks(), "Optimization requires support for fast class initialization checks");
__ clinit_barrier(r4, rscratch1, nullptr /*L_fast_path*/, &slow_case);
// get instance_size in InstanceKlass (scaled to a count of bytes)
__ ldrw(r3,

View File

@@ -165,6 +165,7 @@ enum Ampere_CPU_Model {
static int dcache_line_size() { return _dcache_line_size; }
static int get_initial_sve_vector_length() { return _initial_sve_vector_length; };
// Aarch64 supports fast class initialization checks
static bool supports_fast_class_init_checks() { return true; }
constexpr static bool supports_stack_watermark_barrier() { return true; }

View File

@@ -197,7 +197,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
temp_reg, temp_reg2, itable_index, L_no_such_interface);
// Reduce "estimate" such that "padding" does not drop below 8.
const ptrdiff_t estimate = 124;
const ptrdiff_t estimate = 144;
const ptrdiff_t codesize = __ pc() - start_pc;
slop_delta = (int)(estimate - codesize);
slop_bytes += slop_delta;

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -9193,7 +9193,7 @@ instruct clear_array(iRegX cnt, iRegP base, iRegI temp, iRegX zero, Universe dum
ins_encode %{
__ mov($zero$$Register, 0);
__ mov($temp$$Register, $cnt$$Register);
Label(loop);
Label loop;
__ bind(loop);
__ subs($temp$$Register, $temp$$Register, 4);
__ str($zero$$Register, Address($base$$Register, $temp$$Register), ge);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -175,7 +175,7 @@ class Address {
if (_index == noreg) {
assert(-256 < _disp && _disp < 256, "encoding constraint");
return _mode | up(_disp) << 23 | 1 << 22 | _base->encoding() << 16 |
(abs(_disp) & 0xf0) << 4 | abs(_disp) & 0x0f;
(abs(_disp) & 0xf0) << 4 | (abs(_disp) & 0x0f);
} else {
assert(_index != PC && (_mode == basic_offset || _index != _base), "unpredictable instruction");
assert(_disp == 0 && _shift == lsl && _shift_imm == 0, "encoding constraint");

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2640,8 +2640,8 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg
void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) {
assert(src->is_double_cpu() && dest->is_address() ||
src->is_address() && dest->is_double_cpu(),
assert((src->is_double_cpu() && dest->is_address()) ||
(src->is_address() && dest->is_double_cpu()),
"Simple move_op is called for all other cases");
int null_check_offset;

View File

@@ -28,6 +28,7 @@
#include "code/icBuffer.hpp"
#include "code/nativeInst.hpp"
#include "code/nmethod.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
@@ -105,9 +106,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -99,8 +99,6 @@
}
#endif
const ImmutableOopMap* get_oop_map() const;
public:
// Constructors

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@ inline bool frame::equal(frame other) const {
&& unextended_sp() == other.unextended_sp()
&& fp() == other.fp()
&& pc() == other.pc();
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
assert(!ret || (cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
return ret;
}
@@ -218,20 +218,6 @@ inline int frame::frame_size() const {
return sender_sp() - sp();
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
inline int frame::compiled_frame_stack_argsize() const {
Unimplemented();
return 0;

View File

@@ -49,8 +49,12 @@ const bool HaveVFP = true;
// arm32 is not specified as multi-copy-atomic
// So we must not #define CPU_MULTI_COPY_ATOMIC
// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 64
// The default padding size for data structures to avoid false sharing.
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
#define STUBROUTINES_MD_HPP "stubRoutines_arm.hpp"
#define INTERP_MASM_MD_HPP "interp_masm_arm.hpp"
#define TEMPLATETABLE_MD_HPP "templateTable_arm.hpp"

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -162,7 +162,7 @@ void NativeMovConstReg::set_data(intptr_t x, address pc) {
unsigned int hi = (unsigned int)(x >> 16);
this->set_encoding((this->encoding() & 0xfff0f000) | (lo & 0xf000) << 4 | (lo & 0xfff));
next->set_encoding((next->encoding() & 0xfff0f000) | (hi & 0xf000) << 4 | (hi & 0xfff));
} else if (oop_addr == nullptr & metadata_addr == nullptr) {
} else if (oop_addr == nullptr && metadata_addr == nullptr) {
// A static ldr_literal (without oop or metadata relocation)
assert(is_ldr_literal(), "must be");
int offset = ldr_offset();
@@ -341,10 +341,6 @@ void NativePostCallNop::make_deopt() {
NativeDeoptInstruction::insert(addr_at(0));
}
void NativePostCallNop::patch(jint diff) {
// unsupported for now
}
void NativeDeoptInstruction::verify() {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -396,7 +396,7 @@ class NativeMovConstReg: public NativeInstruction {
inline NativeMovConstReg* nativeMovConstReg_at(address address) {
NativeInstruction* ni = nativeInstruction_at(address);
assert(ni->is_ldr_literal() || ni->is_pc_rel() ||
ni->is_movw() && VM_Version::supports_movw(), "must be");
(ni->is_movw() && VM_Version::supports_movw()), "must be");
return (NativeMovConstReg*)address;
}
@@ -438,8 +438,8 @@ inline NativeCall* nativeCall_before(address return_address) {
class NativePostCallNop: public NativeInstruction {
public:
bool check() const { return is_nop(); }
int displacement() const { return 0; }
void patch(jint diff);
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const { return false; }
bool patch(int32_t oopmap_slot, int32_t cb_offset) { return false; }
void make_deopt();
};

View File

@@ -441,7 +441,6 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
}
}
if (slot & 1) slot++;
return slot;
}

View File

@@ -2862,6 +2862,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest,
if (info != nullptr) {
add_call_info_here(info);
}
assert(__ last_calls_return_pc() == __ pc(), "pcn not at return pc");
__ post_call_nop();
}

View File

@@ -167,9 +167,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -350,7 +350,7 @@ inline void Thaw<ConfigT>::patch_caller_links(intptr_t* sp, intptr_t* bottom) {
if (is_entry_frame) {
callers_sp = _cont.entryFP();
} else {
CodeBlob* cb = CodeCache::find_blob(pc);
CodeBlob* cb = CodeCache::find_blob_fast(pc);
callers_sp = sp + cb->frame_size();
}
// set the back link

View File

@@ -136,7 +136,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
// It should be safe to construct the sender though it might not be valid.
frame sender(sender_sp, sender_pc);
frame sender(sender_sp, sender_pc, nullptr /* unextended_sp */, nullptr /* fp */, sender_blob);
// Do we have a valid fp?
address sender_fp = (address) sender.fp();
@@ -196,12 +196,12 @@ frame frame::sender_for_entry_frame(RegisterMap *map) const {
assert(map->include_argument_oops(), "should be set by clear");
if (jfa->last_Java_pc() != nullptr) {
frame fr(jfa->last_Java_sp(), jfa->last_Java_pc());
frame fr(jfa->last_Java_sp(), jfa->last_Java_pc(), kind::code_blob);
return fr;
}
// Last_java_pc is not set, if we come here from compiled code. The
// constructor retrieves the PC from the stack.
frame fr(jfa->last_Java_sp());
frame fr(jfa->last_Java_sp(), nullptr, kind::code_blob);
return fr;
}
@@ -229,7 +229,7 @@ frame frame::sender_for_upcall_stub_frame(RegisterMap* map) const {
assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");
map->clear();
assert(map->include_argument_oops(), "should be set by clear");
frame fr(jfa->last_Java_sp(), jfa->last_Java_pc());
frame fr(jfa->last_Java_sp(), jfa->last_Java_pc(), kind::code_blob);
return fr;
}
@@ -451,7 +451,7 @@ intptr_t *frame::initial_deoptimization_info() {
#ifndef PRODUCT
// This is a generic constructor which is only used by pns() in debug.cpp.
// fp is dropped and gets determined by backlink.
frame::frame(void* sp, void* fp, void* pc) : frame((intptr_t*)sp, (address)pc) {}
frame::frame(void* sp, void* fp, void* pc) : frame((intptr_t*)sp, (address)pc, kind::unknown) {}
#endif
BasicObjectLock* frame::interpreter_frame_monitor_end() const {

View File

@@ -393,18 +393,26 @@
inline common_abi* own_abi() const { return (common_abi*) _sp; }
inline common_abi* callers_abi() const { return (common_abi*) _fp; }
enum class kind {
unknown, // The frame's pc is not necessarily in the CodeCache.
// CodeCache::find_blob_fast(void* pc) can yield wrong results in this case and must not be used.
code_blob, // The frame's pc is known to be in the CodeCache but it is likely not in an nmethod.
// CodeCache::find_blob_fast() will be correct but not faster in this case.
nmethod // This is likely the frame of a nmethod.
// The code cache lookup is optimized based on NativePostCallNops.
};
private:
// Initialize frame members (_pc and _sp must be given)
inline void setup();
inline void setup(kind knd);
public:
const ImmutableOopMap* get_oop_map() const;
// Constructors
inline frame(intptr_t* sp, intptr_t* fp, address pc);
inline frame(intptr_t* sp, address pc, intptr_t* unextended_sp = nullptr, intptr_t* fp = nullptr, CodeBlob* cb = nullptr);
inline frame(intptr_t* sp, address pc, kind knd = kind::nmethod);
inline frame(intptr_t* sp, address pc, intptr_t* unextended_sp, intptr_t* fp = nullptr, CodeBlob* cb = nullptr);
inline frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map);
inline frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool on_heap);

View File

@@ -35,14 +35,14 @@
// Inline functions for ppc64 frames:
// Initialize frame members (_sp must be given)
inline void frame::setup() {
inline void frame::setup(kind knd) {
if (_pc == nullptr) {
_pc = (address)own_abi()->lr;
assert(_pc != nullptr, "must have PC");
}
if (_cb == nullptr) {
_cb = CodeCache::find_blob(_pc);
_cb = (knd == kind::nmethod) ? CodeCache::find_blob_fast(_pc) : CodeCache::find_blob(_pc);
}
if (_unextended_sp == nullptr) {
@@ -78,8 +78,8 @@ inline void frame::setup() {
// Continuation frames on the java heap are not aligned.
// When thawing interpreted frames the sp can be unaligned (see new_stack_frame()).
assert(_on_heap ||
(is_aligned(_sp, alignment_in_bytes) || is_interpreted_frame()) &&
(is_aligned(_fp, alignment_in_bytes) || !is_fully_initialized()),
((is_aligned(_sp, alignment_in_bytes) || is_interpreted_frame()) &&
(is_aligned(_fp, alignment_in_bytes) || !is_fully_initialized())),
"invalid alignment sp:" PTR_FORMAT " unextended_sp:" PTR_FORMAT " fp:" PTR_FORMAT, p2i(_sp), p2i(_unextended_sp), p2i(_fp));
}
@@ -89,21 +89,27 @@ inline void frame::setup() {
inline frame::frame() : _sp(nullptr), _pc(nullptr), _cb(nullptr), _oop_map(nullptr), _deopt_state(unknown),
_on_heap(false), DEBUG_ONLY(_frame_index(-1) COMMA) _unextended_sp(nullptr), _fp(nullptr) {}
inline frame::frame(intptr_t* sp) : frame(sp, nullptr) {}
inline frame::frame(intptr_t* sp) : frame(sp, nullptr, kind::nmethod) {}
inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) : frame(sp, pc, nullptr, fp, nullptr) {}
inline frame::frame(intptr_t* sp, address pc, kind knd)
: _sp(sp), _pc(pc), _cb(nullptr), _oop_map(nullptr),
_on_heap(false), DEBUG_ONLY(_frame_index(-1) COMMA) _unextended_sp(sp), _fp(nullptr) {
setup(knd);
}
inline frame::frame(intptr_t* sp, address pc, intptr_t* unextended_sp, intptr_t* fp, CodeBlob* cb)
: _sp(sp), _pc(pc), _cb(cb), _oop_map(nullptr),
_on_heap(false), DEBUG_ONLY(_frame_index(-1) COMMA) _unextended_sp(unextended_sp), _fp(fp) {
setup();
setup(kind::nmethod);
}
inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map)
: _sp(sp), _pc(pc), _cb(cb), _oop_map(oop_map),
_on_heap(false), DEBUG_ONLY(_frame_index(-1) COMMA) _unextended_sp(unextended_sp), _fp(fp) {
assert(_cb != nullptr, "pc: " INTPTR_FORMAT, p2i(pc));
setup();
setup(kind::nmethod);
}
inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb,
@@ -113,7 +119,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
// In thaw, non-heap frames use this constructor to pass oop_map. I don't know why.
assert(_on_heap || _cb != nullptr, "these frames are always heap frames");
if (cb != nullptr) {
setup();
setup(kind::nmethod);
}
#ifdef ASSERT
// The following assertion has been disabled because it would sometime trap for Continuation.run,
@@ -300,7 +306,7 @@ inline frame frame::sender_raw(RegisterMap* map) const {
// Must be native-compiled frame, i.e. the marshaling code for native
// methods that exists in the core system.
return frame(sender_sp(), sender_pc());
return frame(sender_sp(), sender_pc(), kind::code_blob);
}
inline frame frame::sender(RegisterMap* map) const {
@@ -361,20 +367,6 @@ inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
*result_adr = obj;
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
inline int frame::compiled_frame_stack_argsize() const {
assert(cb()->is_compiled(), "");
return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;

View File

@@ -23,11 +23,10 @@
*
*/
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gc_globals.hpp"
#include "macroAssembler_ppc.hpp"
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/gc_globals.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
@@ -38,6 +37,7 @@
#include "gc/shenandoah/shenandoahThreadLocalData.hpp"
#include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp"
#include "interpreter/interpreter.hpp"
#include "macroAssembler_ppc.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/sharedRuntime.hpp"
#include "utilities/globalDefinitions.hpp"

View File

@@ -22,8 +22,8 @@
* questions.
*/
#include "asm/register.hpp"
#include "precompiled.hpp"
#include "asm/register.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeBlob.hpp"
#include "code/vmreg.inline.hpp"

View File

@@ -48,9 +48,12 @@ const bool CCallingConventionRequiresIntsAsLongs = true;
// PPC64 is not specified as multi-copy-atomic
// So we must not #define CPU_MULTI_COPY_ATOMIC
// The expected size in bytes of a cache line, used to pad data structures.
// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 128
// The default padding size for data structures to avoid false sharing.
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
#define SUPPORT_RESERVED_STACK_AREA
// If UseSIGTRAP is active, we only use the poll bit and no polling page.

View File

@@ -1187,8 +1187,12 @@ void MacroAssembler::post_call_nop() {
if (!Continuations::enabled()) {
return;
}
// We use CMPI/CMPLI instructions to encode post call nops.
// Refer to NativePostCallNop for details.
relocate(post_call_nop_Relocation::spec());
InlineSkippedInstructionsCounter skipCounter(this);
nop();
Assembler::emit_int32(Assembler::CMPLI_OPCODE | Assembler::opp_u_field(1, 9, 9));
assert(is_post_call_nop(*(int*)(pc() - 4)), "post call not not found");
}
void MacroAssembler::call_VM_base(Register oop_result,

View File

@@ -417,6 +417,12 @@ class MacroAssembler: public Assembler {
inline void call_stub_and_return_to(Register function_entry, Register return_pc);
void post_call_nop();
static bool is_post_call_nop(int instr_bits) {
const uint32_t nineth_bit = opp_u_field(1, 9, 9);
const uint32_t opcode_mask = 0b111110 << OPCODE_SHIFT;
const uint32_t pcn_mask = opcode_mask | nineth_bit;
return (instr_bits & pcn_mask) == (Assembler::CMPLI_OPCODE | nineth_bit);
}
//
// Java utilities

View File

@@ -429,8 +429,29 @@ void NativePostCallNop::make_deopt() {
NativeDeoptInstruction::insert(addr_at(0));
}
void NativePostCallNop::patch(jint diff) {
// unsupported for now
bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
int32_t i2, i1;
assert(is_aligned(cb_offset, 4), "cb offset alignment does not match instruction alignment");
assert(!decode(i1, i2), "already patched");
cb_offset = cb_offset >> 2;
if (((oopmap_slot & ppc_oopmap_slot_mask) != oopmap_slot) || ((cb_offset & ppc_cb_offset_mask) != cb_offset)) {
return false; // cannot encode
}
const uint32_t data = oopmap_slot << ppc_cb_offset_bits | cb_offset;
const uint32_t lo_data = data & ppc_data_lo_mask;
const uint32_t hi_data = data >> ppc_data_lo_bits;
const uint32_t nineth_bit = 1 << (31 - 9);
uint32_t instr = Assembler::CMPLI_OPCODE | hi_data << ppc_data_hi_shift | nineth_bit | lo_data;
*(uint32_t*)addr_at(0) = instr;
int32_t oopmap_slot_dec, cb_offset_dec;
assert(is_post_call_nop(), "pcn not recognized");
assert(decode(oopmap_slot_dec, cb_offset_dec), "encoding failed");
assert(oopmap_slot == oopmap_slot_dec, "oopmap slot encoding is wrong");
assert((cb_offset << 2) == cb_offset_dec, "cb offset encoding is wrong");
return true; // encoding succeeded
}
void NativeDeoptInstruction::verify() {

View File

@@ -51,7 +51,7 @@ class NativeInstruction {
friend class Relocation;
public:
bool is_nop() const { return Assembler::is_nop(long_at(0)); }
bool is_post_call_nop() const { return MacroAssembler::is_post_call_nop(long_at(0)); }
bool is_jump() const { return Assembler::is_b(long_at(0)); } // See NativeGeneralJump.
@@ -506,10 +506,50 @@ class NativeMovRegMem: public NativeInstruction {
};
class NativePostCallNop: public NativeInstruction {
// We use CMPI/CMPLI to represent Post Call Nops (PCN)
// Bit |0 5|6 |9 |10|11 |16 31|
// +--------------------------------------------------------------+
// Field |OPCODE |BF |/ |L |RA |SI |
// +--------------------------------------------------------------+
// |0 0 1 0 1|DATA HI| 1| DATA LO |
// | |4 bits | | 22 bits |
//
// Bit 9 is always 1 for PCNs to distinguish them from regular CMPI/CMPLI
//
// Using both, CMPLI (opcode 10 = 0b001010) and CMPI (opcode 11 = 0b001011) for
// PCNs allows using bit 5 from the opcode to encode DATA HI.
enum {
ppc_data_lo_bits = 31 - 9,
ppc_data_lo_mask = right_n_bits(ppc_data_lo_bits),
ppc_data_hi_bits = 9 - 5,
ppc_data_hi_shift = ppc_data_lo_bits + 1,
ppc_data_hi_mask = right_n_bits(ppc_data_hi_bits) << ppc_data_hi_shift,
ppc_data_bits = ppc_data_lo_bits + ppc_data_hi_bits,
ppc_oopmap_slot_bits = 9,
ppc_oopmap_slot_mask = right_n_bits(ppc_oopmap_slot_bits),
ppc_cb_offset_bits = ppc_data_bits - ppc_oopmap_slot_bits,
ppc_cb_offset_mask = right_n_bits(ppc_cb_offset_bits),
};
public:
bool check() const { return is_nop(); }
int displacement() const { return 0; }
void patch(jint diff);
bool check() const { return is_post_call_nop(); }
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const {
uint32_t instr_bits = long_at(0);
uint32_t data_lo = instr_bits & ppc_data_lo_mask;
uint32_t data_hi = (instr_bits & ppc_data_hi_mask) >> 1;
uint32_t data = data_hi | data_lo;
if (data == 0) {
return false; // no data found
}
cb_offset = (data & ppc_cb_offset_mask) << 2;
oopmap_slot = data >> ppc_cb_offset_bits;
return true; // decoding succeeded
}
bool patch(int32_t oopmap_slot, int32_t cb_offset);
void make_deopt();
};

View File

@@ -734,7 +734,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
ShouldNotReachHere();
}
}
return align_up(stk, 2);
return stk;
}
#if defined(COMPILER1) || defined(COMPILER2)

View File

@@ -91,7 +91,7 @@ public:
// Override Abstract_VM_Version implementation
static void print_platform_virtualization_info(outputStream*);
// PPC64 supports fast class initialization checks for static methods.
// PPC64 supports fast class initialization checks
static bool supports_fast_class_init_checks() { return true; }
constexpr static bool supports_stack_watermark_barrier() { return true; }

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -506,7 +506,7 @@ public:
INSN(sllw, 0b0111011, 0b001, 0b0000000);
INSN(sraw, 0b0111011, 0b101, 0b0100000);
INSN(srlw, 0b0111011, 0b101, 0b0000000);
INSN(mul, 0b0110011, 0b000, 0b0000001);
INSN(_mul, 0b0110011, 0b000, 0b0000001);
INSN(mulh, 0b0110011, 0b001, 0b0000001);
INSN(mulhsu,0b0110011, 0b010, 0b0000001);
INSN(mulhu, 0b0110011, 0b011, 0b0000001);
@@ -537,9 +537,9 @@ public:
}
INSN(lb, 0b0000011, 0b000);
INSN(lbu, 0b0000011, 0b100);
INSN(lh, 0b0000011, 0b001);
INSN(lhu, 0b0000011, 0b101);
INSN(_lbu, 0b0000011, 0b100);
INSN(_lh, 0b0000011, 0b001);
INSN(_lhu, 0b0000011, 0b101);
INSN(_lw, 0b0000011, 0b010);
INSN(lwu, 0b0000011, 0b110);
INSN(_ld, 0b0000011, 0b011);
@@ -609,8 +609,8 @@ public:
emit(insn); \
} \
INSN(sb, Register, 0b0100011, 0b000);
INSN(sh, Register, 0b0100011, 0b001);
INSN(_sb, Register, 0b0100011, 0b000);
INSN(_sh, Register, 0b0100011, 0b001);
INSN(_sw, Register, 0b0100011, 0b010);
INSN(_sd, Register, 0b0100011, 0b011);
INSN(fsw, FloatRegister, 0b0100111, 0b010);
@@ -758,6 +758,8 @@ enum Aqrl {relaxed = 0b00, rl = 0b01, aq = 0b10, aqrl = 0b11};
INSN(amomax_d , 0b0101111, 0b011, 0b10100);
INSN(amominu_d, 0b0101111, 0b011, 0b11000);
INSN(amomaxu_d, 0b0101111, 0b011, 0b11100);
INSN(amocas_w, 0b0101111, 0b010, 0b00101);
INSN(amocas_d, 0b0101111, 0b011, 0b00101);
#undef INSN
enum operand_size { int8, int16, int32, uint32, int64 };
@@ -813,6 +815,8 @@ enum operand_size { int8, int16, int32, uint32, int64 };
INSN(fsqrt_s, 0b1010011, 0b00000, 0b0101100);
INSN(fsqrt_d, 0b1010011, 0b00000, 0b0101101);
INSN(fcvt_s_h, 0b1010011, 0b00010, 0b0100000);
INSN(fcvt_h_s, 0b1010011, 0b00000, 0b0100010);
INSN(fcvt_s_d, 0b1010011, 0b00001, 0b0100000);
INSN(fcvt_d_s, 0b1010011, 0b00000, 0b0100001);
#undef INSN
@@ -1069,6 +1073,7 @@ enum operand_size { int8, int16, int32, uint32, int64 };
emit(insn); \
}
INSN(fmv_h_x, 0b1010011, 0b000, 0b00000, 0b1111010);
INSN(fmv_w_x, 0b1010011, 0b000, 0b00000, 0b1111000);
INSN(fmv_d_x, 0b1010011, 0b000, 0b00000, 0b1111001);
@@ -1106,8 +1111,10 @@ enum fclass_mask {
emit(insn); \
}
INSN(fclass_h, 0b1010011, 0b001, 0b00000, 0b1110010);
INSN(fclass_s, 0b1010011, 0b001, 0b00000, 0b1110000);
INSN(fclass_d, 0b1010011, 0b001, 0b00000, 0b1110001);
INSN(fmv_x_h, 0b1010011, 0b000, 0b00000, 0b1110010);
INSN(fmv_x_w, 0b1010011, 0b000, 0b00000, 0b1110000);
INSN(fmv_x_d, 0b1010011, 0b000, 0b00000, 0b1110001);
@@ -1154,10 +1161,8 @@ static Assembler::SEW elemtype_to_sew(BasicType etype) {
}
#define patch_vtype(hsb, lsb, vlmul, vsew, vta, vma, vill) \
if (vill == 1) { \
guarantee((vlmul | vsew | vta | vma == 0), \
"the other bits in vtype shall be zero"); \
} \
/* If vill then other bits of vtype must be zero. */ \
guarantee(!vill, "vill not supported"); \
patch((address)&insn, lsb + 2, lsb, vlmul); \
patch((address)&insn, lsb + 5, lsb + 3, vsew); \
patch((address)&insn, lsb + 6, vta); \
@@ -1332,6 +1337,7 @@ enum VectorMask {
INSN(vsll_vi, 0b1010111, 0b011, 0b100101);
// Vector Slide Instructions
INSN(vslideup_vi, 0b1010111, 0b011, 0b001110);
INSN(vslidedown_vi, 0b1010111, 0b011, 0b001111);
#undef INSN
@@ -1687,7 +1693,6 @@ enum VectorMask {
INSN(vmv_v_x, 0b1010111, 0b100, v0, 0b1, 0b010111);
#undef INSN
#undef patch_VArith
#define INSN(NAME, op, funct13, funct6) \
void NAME(VectorRegister Vd, VectorMask vm = unmasked) { \
@@ -1729,14 +1734,29 @@ enum Nf {
patch_reg((address)&insn, 15, Rs1); \
emit(insn)
#define INSN(NAME, op, lumop, vm, mop, nf) \
void NAME(VectorRegister Vd, Register Rs1, uint32_t width = 0, bool mew = false) { \
#define INSN(NAME, op, width, lumop, vm, mop, mew, nf) \
void NAME(VectorRegister Vd, Register Rs1) { \
guarantee(is_uimm3(width), "width is invalid"); \
patch_VLdSt(op, Vd, width, Rs1, lumop, vm, mop, mew, nf); \
}
// Vector Load/Store Instructions
INSN(vl1re8_v, 0b0000111, 0b01000, 0b1, 0b00, g1);
INSN(vl1re8_v, 0b0000111, 0b000, 0b01000, 0b1, 0b00, 0b0, g1);
INSN(vl1re16_v, 0b0000111, 0b101, 0b01000, 0b1, 0b00, 0b0, g1);
INSN(vl1re32_v, 0b0000111, 0b110, 0b01000, 0b1, 0b00, 0b0, g1);
INSN(vl1re64_v, 0b0000111, 0b111, 0b01000, 0b1, 0b00, 0b0, g1);
INSN(vl2re8_v, 0b0000111, 0b000, 0b01000, 0b1, 0b00, 0b0, g2);
INSN(vl2re16_v, 0b0000111, 0b101, 0b01000, 0b1, 0b00, 0b0, g2);
INSN(vl2re32_v, 0b0000111, 0b110, 0b01000, 0b1, 0b00, 0b0, g2);
INSN(vl2re64_v, 0b0000111, 0b111, 0b01000, 0b1, 0b00, 0b0, g2);
INSN(vl4re8_v, 0b0000111, 0b000, 0b01000, 0b1, 0b00, 0b0, g4);
INSN(vl4re16_v, 0b0000111, 0b101, 0b01000, 0b1, 0b00, 0b0, g4);
INSN(vl4re32_v, 0b0000111, 0b110, 0b01000, 0b1, 0b00, 0b0, g4);
INSN(vl4re64_v, 0b0000111, 0b111, 0b01000, 0b1, 0b00, 0b0, g4);
INSN(vl8re8_v, 0b0000111, 0b000, 0b01000, 0b1, 0b00, 0b0, g8);
INSN(vl8re16_v, 0b0000111, 0b101, 0b01000, 0b1, 0b00, 0b0, g8);
INSN(vl8re32_v, 0b0000111, 0b110, 0b01000, 0b1, 0b00, 0b0, g8);
INSN(vl8re64_v, 0b0000111, 0b111, 0b01000, 0b1, 0b00, 0b0, g8);
#undef INSN
@@ -1747,6 +1767,9 @@ enum Nf {
// Vector Load/Store Instructions
INSN(vs1r_v, 0b0100111, 0b000, 0b01000, 0b1, 0b00, 0b0, g1);
INSN(vs2r_v, 0b0100111, 0b000, 0b01000, 0b1, 0b00, 0b0, g2);
INSN(vs4r_v, 0b0100111, 0b000, 0b01000, 0b1, 0b00, 0b0, g4);
INSN(vs8r_v, 0b0100111, 0b000, 0b01000, 0b1, 0b00, 0b0, g8);
#undef INSN
@@ -1792,9 +1815,11 @@ enum Nf {
}
// Vector unordered indexed load instructions
INSN( vluxei8_v, 0b0000111, 0b000, 0b01, 0b0);
INSN(vluxei32_v, 0b0000111, 0b110, 0b01, 0b0);
// Vector unordered indexed store instructions
INSN( vsuxei8_v, 0b0100111, 0b000, 0b01, 0b0);
INSN(vsuxei32_v, 0b0100111, 0b110, 0b01, 0b0);
#undef INSN
@@ -1818,6 +1843,55 @@ enum Nf {
#undef INSN
#undef patch_VLdSt
// ====================================
// RISC-V Vector Crypto Extension
// ====================================
#define INSN(NAME, op, funct3, funct6) \
void NAME(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1, VectorMask vm = unmasked) { \
patch_VArith(op, Vd, funct3, Vs1->raw_encoding(), Vs2, vm, funct6); \
}
// Vector Bit-manipulation used in Cryptography (Zvkb) Extension
INSN(vandn_vv, 0b1010111, 0b000, 0b000001);
INSN(vandn_vx, 0b1010111, 0b100, 0b000001);
INSN(vandn_vi, 0b1010111, 0b011, 0b000001);
INSN(vclmul_vv, 0b1010111, 0b010, 0b001100);
INSN(vclmul_vx, 0b1010111, 0b110, 0b001100);
INSN(vclmulh_vv, 0b1010111, 0b010, 0b001101);
INSN(vclmulh_vx, 0b1010111, 0b110, 0b001101);
INSN(vror_vv, 0b1010111, 0b000, 0b010100);
INSN(vror_vx, 0b1010111, 0b100, 0b010100);
INSN(vrol_vv, 0b1010111, 0b000, 0b010101);
INSN(vrol_vx, 0b1010111, 0b100, 0b010101);
#undef INSN
#define INSN(NAME, op, funct3, Vs1, funct6) \
void NAME(VectorRegister Vd, VectorRegister Vs2, VectorMask vm = unmasked) { \
patch_VArith(op, Vd, funct3, Vs1, Vs2, vm, funct6); \
}
// Vector Bit-manipulation used in Cryptography (Zvkb) Extension
INSN(vbrev8_v, 0b1010111, 0b010, 0b01000, 0b010010);
INSN(vrev8_v, 0b1010111, 0b010, 0b01001, 0b010010);
#undef INSN
#define INSN(NAME, op, funct3, vm, funct6) \
void NAME(VectorRegister Vd, VectorRegister Vs2, VectorRegister Vs1) { \
patch_VArith(op, Vd, funct3, Vs1->raw_encoding(), Vs2, vm, funct6); \
}
// Vector SHA-2 Secure Hash (Zvknh[ab]) Extension
INSN(vsha2ms_vv, 0b1110111, 0b010, 0b1, 0b101101);
INSN(vsha2ch_vv, 0b1110111, 0b010, 0b1, 0b101110);
INSN(vsha2cl_vv, 0b1110111, 0b010, 0b1, 0b101111);
#undef INSN
#undef patch_VArith
// ====================================
// RISC-V Bit-Manipulation Extension
// Currently only support Zba, Zbb and Zbs bitmanip extensions.
@@ -1867,9 +1941,9 @@ enum Nf {
}
INSN(rev8, 0b0010011, 0b101, 0b011010111000);
INSN(sext_b, 0b0010011, 0b001, 0b011000000100);
INSN(sext_h, 0b0010011, 0b001, 0b011000000101);
INSN(zext_h, 0b0111011, 0b100, 0b000010000000);
INSN(_sext_b, 0b0010011, 0b001, 0b011000000100);
INSN(_sext_h, 0b0010011, 0b001, 0b011000000101);
INSN(_zext_h, 0b0111011, 0b100, 0b000010000000);
INSN(clz, 0b0010011, 0b001, 0b011000000000);
INSN(clzw, 0b0011011, 0b001, 0b011000000000);
INSN(ctz, 0b0010011, 0b001, 0b011000000001);
@@ -2581,6 +2655,15 @@ public:
return UseRVC && in_compressible_region();
}
bool do_compress_zcb(Register reg1 = noreg, Register reg2 = noreg) const {
return do_compress() && VM_Version::ext_Zcb.enabled() &&
(reg1 == noreg || reg1->is_compressed_valid()) && (reg2 == noreg || reg2->is_compressed_valid());
}
bool do_compress_zcb_zbb(Register reg1 = noreg, Register reg2 = noreg) const {
return do_compress_zcb(reg1, reg2) && UseZbb;
}
// --------------------------
// Load/store register
// --------------------------
@@ -2915,6 +2998,238 @@ public:
#undef INSN
// -------------- ZCB Instruction Definitions --------------
// Zcb additional C instructions
private:
// Format CLH, c.lh/c.lhu
template <bool Unsigned>
void c_lh_if(Register Rd_Rs2, Register Rs1, uint32_t uimm) {
assert_cond(uimm == 0 || uimm == 2);
assert_cond(do_compress_zcb(Rd_Rs2, Rs1));
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b00);
c_patch_compressed_reg((address)&insn, 2, Rd_Rs2);
c_patch((address)&insn, 5, 5, (uimm & nth_bit(1)) >> 1);
c_patch((address)&insn, 6, 6, Unsigned ? 0 : 1);
c_patch_compressed_reg((address)&insn, 7, Rs1);
c_patch((address)&insn, 12, 10, 0b001);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
template <bool Unsigned>
void lh_c_mux(Register Rd_Rs2, Register Rs1, const int32_t uimm) {
if (do_compress_zcb(Rd_Rs2, Rs1) &&
(uimm == 0 || uimm == 2)) {
c_lh_if<Unsigned>(Rd_Rs2, Rs1, uimm);
} else {
if (Unsigned) {
_lhu(Rd_Rs2, Rs1, uimm);
} else {
_lh(Rd_Rs2, Rs1, uimm);
}
}
}
// Format CU, c.[sz]ext.*, c.not
template <uint8_t InstructionType>
void c_u_if(Register Rs1) {
assert_cond(do_compress_zcb(Rs1));
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b01);
c_patch((address)&insn, 4, 2, InstructionType);
c_patch((address)&insn, 6, 5, 0b11);
c_patch_compressed_reg((address)&insn, 7, Rs1);
c_patch((address)&insn, 12, 10, 0b111);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
public:
// Prerequisites: Zcb
void c_lh(Register Rd_Rs2, Register Rs1, const int32_t uimm) { c_lh_if<false>(Rd_Rs2, Rs1, uimm); }
void lh(Register Rd_Rs2, Register Rs1, const int32_t uimm) { lh_c_mux<false>(Rd_Rs2, Rs1, uimm); }
// Prerequisites: Zcb
void c_lhu(Register Rd_Rs2, Register Rs1, const int32_t uimm) { c_lh_if<true>(Rd_Rs2, Rs1, uimm); }
void lhu(Register Rd_Rs2, Register Rs1, const int32_t uimm) { lh_c_mux<true>(Rd_Rs2, Rs1, uimm); }
// Prerequisites: Zcb
// Format CLB, single instruction
void c_lbu(Register Rd_Rs2, Register Rs1, uint32_t uimm) {
assert_cond(uimm <= 3);
assert_cond(do_compress_zcb(Rd_Rs2, Rs1));
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b00);
c_patch_compressed_reg((address)&insn, 2, Rd_Rs2);
c_patch((address)&insn, 5, 5, (uimm & nth_bit(1)) >> 1);
c_patch((address)&insn, 6, 6, (uimm & nth_bit(0)) >> 0);
c_patch_compressed_reg((address)&insn, 7, Rs1);
c_patch((address)&insn, 12, 10, 0b000);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
void lbu(Register Rd_Rs2, Register Rs1, const int32_t uimm) {
if (do_compress_zcb(Rd_Rs2, Rs1) &&
uimm >= 0 && uimm <= 3) {
c_lbu(Rd_Rs2, Rs1, uimm);
} else {
_lbu(Rd_Rs2, Rs1, uimm);
}
}
// Prerequisites: Zcb
// Format CSB, single instruction
void c_sb(Register Rd_Rs2, Register Rs1, uint32_t uimm) {
assert_cond(uimm <= 3);
assert_cond(do_compress_zcb(Rd_Rs2, Rs1));
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b00);
c_patch_compressed_reg((address)&insn, 2, Rd_Rs2);
c_patch((address)&insn, 5, 5, (uimm & nth_bit(1)) >> 1);
c_patch((address)&insn, 6, 6, (uimm & nth_bit(0)) >> 0);
c_patch_compressed_reg((address)&insn, 7, Rs1);
c_patch((address)&insn, 12, 10, 0b010);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
void sb(Register Rd_Rs2, Register Rs1, const int32_t uimm) {
if (do_compress_zcb(Rd_Rs2, Rs1) &&
uimm >= 0 && uimm <= 3) {
c_sb(Rd_Rs2, Rs1, uimm);
} else {
_sb(Rd_Rs2, Rs1, uimm);
}
}
// Prerequisites: Zcb
// Format CSH, single instruction
void c_sh(Register Rd_Rs2, Register Rs1, uint32_t uimm) {
assert_cond(uimm == 0 || uimm == 2);
assert_cond(do_compress_zcb(Rd_Rs2, Rs1));
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b00);
c_patch_compressed_reg((address)&insn, 2, Rd_Rs2);
c_patch((address)&insn, 5, 5, (uimm & nth_bit(1)) >> 1);
c_patch((address)&insn, 6, 6, 0);
c_patch_compressed_reg((address)&insn, 7, Rs1);
c_patch((address)&insn, 12, 10, 0b011);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
void sh(Register Rd_Rs2, Register Rs1, const int32_t uimm) {
if (do_compress_zcb(Rd_Rs2, Rs1) &&
(uimm == 0 || uimm == 2)) {
c_sh(Rd_Rs2, Rs1, uimm);
} else {
_sh(Rd_Rs2, Rs1, uimm);
}
}
// Prerequisites: Zcb
// Format CS
void c_zext_b(Register Rs1) {
assert_cond(do_compress_zcb(Rs1));
c_u_if<0b000>(Rs1);
}
// Prerequisites: Zbb
void sext_b(Register Rd_Rs2, Register Rs1) {
assert_cond(UseZbb);
if (do_compress_zcb_zbb(Rd_Rs2, Rs1) && (Rd_Rs2 == Rs1)) {
c_sext_b(Rd_Rs2);
} else {
_sext_b(Rd_Rs2, Rs1);
}
}
// Prerequisites: Zcb, Zbb
// Format CS
void c_sext_b(Register Rs1) {
c_u_if<0b001>(Rs1);
}
// Prerequisites: Zbb
void zext_h(Register Rd_Rs2, Register Rs1) {
assert_cond(UseZbb);
if (do_compress_zcb_zbb(Rd_Rs2, Rs1) && (Rd_Rs2 == Rs1)) {
c_zext_h(Rd_Rs2);
} else {
_zext_h(Rd_Rs2, Rs1);
}
}
// Prerequisites: Zcb, Zbb
// Format CS
void c_zext_h(Register Rs1) {
c_u_if<0b010>(Rs1);
}
// Prerequisites: Zbb
void sext_h(Register Rd_Rs2, Register Rs1) {
assert_cond(UseZbb);
if (do_compress_zcb_zbb(Rd_Rs2, Rs1) && (Rd_Rs2 == Rs1)) {
c_sext_h(Rd_Rs2);
} else {
_sext_h(Rd_Rs2, Rs1);
}
}
// Prerequisites: Zcb, Zbb
// Format CS
void c_sext_h(Register Rs1) {
c_u_if<0b011>(Rs1);
}
// Prerequisites: Zcb, Zba
// Format CS
void c_zext_w(Register Rs1) {
c_u_if<0b100>(Rs1);
}
// Prerequisites: Zcb
// Format CS
void c_not(Register Rs1) {
c_u_if<0b101>(Rs1);
}
// Prerequisites: Zcb (M or Zmmul)
// Format CA, c.mul
void c_mul(Register Rd_Rs1, Register Rs2) {
uint16_t insn = 0;
c_patch((address)&insn, 1, 0, 0b01);
c_patch_compressed_reg((address)&insn, 2, Rs2);
c_patch((address)&insn, 6, 5, 0b10);
c_patch_compressed_reg((address)&insn, 7, Rd_Rs1);
c_patch((address)&insn, 12, 10, 0b111);
c_patch((address)&insn, 15, 13, 0b100);
emit_int16(insn);
}
void mul(Register Rd, Register Rs1, Register Rs2) {
if (Rd != Rs1 && Rd != Rs2) {
// Three registers needed without a mv, emit uncompressed
_mul(Rd, Rs1, Rs2);
return;
}
// Rd is either Rs1 or Rs2
if (!do_compress_zcb(Rs2, Rs1)) {
_mul(Rd, Rs1, Rs2);
} else {
if (Rd == Rs2) {
Rs2 = Rs1;
} else {
assert(Rd == Rs1, "must be");
}
c_mul(Rd, Rs2);
}
}
// Stack overflow checking
virtual void bang_stack_with_offset(int offset) { Unimplemented(); }
@@ -2940,6 +3255,17 @@ public:
return uabs(target - branch) < branch_range;
}
// Decode the given instruction, checking if it's a 16-bit compressed
// instruction and return the address of the next instruction.
static address locate_next_instruction(address inst) {
// Instruction wider than 16 bits has the two least-significant bits set.
if ((0x3 & *inst) == 0x3) {
return inst + instruction_size;
} else {
return inst + compressed_instruction_size;
}
}
Assembler(CodeBuffer* code) : AbstractAssembler(code), _in_compressible_region(true) {}
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -121,10 +121,10 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg,
// Handle existing monitor.
bind(object_has_monitor);
// The object's monitor m is unlocked iff m->owner == NULL,
// The object's monitor m is unlocked iff m->owner == nullptr,
// otherwise m->owner may contain a thread or a stack address.
//
// Try to CAS m->owner from NULL to current thread.
// Try to CAS m->owner from null to current thread.
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset()) - markWord::monitor_value));
cmpxchg(/*memory address*/tmp, /*expected value*/zr, /*new value*/xthread, Assembler::int64, Assembler::aq,
Assembler::rl, /*result*/flag); // cas succeeds if flag == zr(expected)
@@ -1783,6 +1783,95 @@ void C2_MacroAssembler::signum_fp(FloatRegister dst, FloatRegister one, bool is_
bind(done);
}
static void float16_to_float_slow_path(C2_MacroAssembler& masm, C2GeneralStub<FloatRegister, Register, Register>& stub) {
#define __ masm.
FloatRegister dst = stub.data<0>();
Register src = stub.data<1>();
Register tmp = stub.data<2>();
__ bind(stub.entry());
// following instructions mainly focus on NaN, as riscv does not handle
// NaN well with fcvt, but the code also works for Inf at the same time.
// construct a NaN in 32 bits from the NaN in 16 bits,
// we need the payloads of non-canonical NaNs to be preserved.
__ mv(tmp, 0x7f800000);
// sign-bit was already set via sign-extension if necessary.
__ slli(t0, src, 13);
__ orr(tmp, t0, tmp);
__ fmv_w_x(dst, tmp);
__ j(stub.continuation());
#undef __
}
// j.l.Float.float16ToFloat
void C2_MacroAssembler::float16_to_float(FloatRegister dst, Register src, Register tmp) {
auto stub = C2CodeStub::make<FloatRegister, Register, Register>(dst, src, tmp, 20, float16_to_float_slow_path);
// in riscv, NaN needs a special process as fcvt does not work in that case.
// in riscv, Inf does not need a special process as fcvt can handle it correctly.
// but we consider to get the slow path to process NaN and Inf at the same time,
// as both of them are rare cases, and if we try to get the slow path to handle
// only NaN case it would sacrifise the performance for normal cases,
// i.e. non-NaN and non-Inf cases.
// check whether it's a NaN or +/- Inf.
mv(t0, 0x7c00);
andr(tmp, src, t0);
// jump to stub processing NaN and Inf cases.
beq(t0, tmp, stub->entry());
// non-NaN or non-Inf cases, just use built-in instructions.
fmv_h_x(dst, src);
fcvt_s_h(dst, dst);
bind(stub->continuation());
}
static void float_to_float16_slow_path(C2_MacroAssembler& masm, C2GeneralStub<Register, FloatRegister, Register>& stub) {
#define __ masm.
Register dst = stub.data<0>();
FloatRegister src = stub.data<1>();
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);
__ j(stub.continuation());
#undef __
}
// 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);
// in riscv, NaN needs a special process as fcvt does not work in that case.
// check whether it's a NaN.
// replace fclass with feq as performance optimization.
feq_s(t0, src, src);
// jump to stub processing NaN cases.
beqz(t0, stub->entry());
// non-NaN cases, just use built-in instructions.
fcvt_h_s(ftmp, src);
fmv_x_h(dst, ftmp);
bind(stub->continuation());
}
void C2_MacroAssembler::signum_fp_v(VectorRegister dst, VectorRegister one, BasicType bt, int vlen) {
vsetvli_helper(bt, vlen);

View File

@@ -172,8 +172,12 @@
void signum_fp(FloatRegister dst, FloatRegister one, bool is_double);
void float16_to_float(FloatRegister dst, Register src, Register tmp);
void float_to_float16(Register dst, FloatRegister src, FloatRegister ftmp, Register xtmp);
void signum_fp_v(VectorRegister dst, VectorRegister one, BasicType bt, int vlen);
// intrinsic methods implemented by rvv instructions
// compress bits, i.e. j.l.Integer/Long::compress.

View File

@@ -29,6 +29,7 @@
#include "code/compiledIC.hpp"
#include "code/icBuffer.hpp"
#include "code/nmethod.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
@@ -88,9 +89,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -189,8 +189,6 @@
static void verify_deopt_original_pc(CompiledMethod* nm, intptr_t* unextended_sp);
#endif
const ImmutableOopMap* get_oop_map() const;
public:
// Constructors

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -186,7 +186,7 @@ inline bool frame::equal(frame other) const {
unextended_sp() == other.unextended_sp() &&
fp() == other.fp() &&
pc() == other.pc();
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
assert(!ret || (cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
return ret;
}
@@ -345,20 +345,6 @@ inline int frame::sender_sp_ret_address_offset() {
return frame::sender_sp_offset - frame::return_addr_offset;
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
//------------------------------------------------------------------------------
// frame::sender
frame frame::sender(RegisterMap* map) const {

View File

@@ -52,11 +52,11 @@ static void x_load_barrier_slow_path(MacroAssembler& _masm, const MachNode* node
%}
// Load Pointer
instruct xLoadP(iRegPNoSp dst, memory mem)
instruct xLoadP(iRegPNoSp dst, memory mem, iRegPNoSp tmp)
%{
match(Set dst (LoadP mem));
predicate(UseZGC && !ZGenerational && (n->as_Load()->barrier_data() != 0));
effect(TEMP dst);
effect(TEMP dst, TEMP tmp);
ins_cost(4 * DEFAULT_COST);
@@ -65,17 +65,17 @@ instruct xLoadP(iRegPNoSp dst, memory mem)
ins_encode %{
const Address ref_addr (as_Register($mem$$base), $mem$$disp);
__ ld($dst$$Register, ref_addr);
x_load_barrier(_masm, this, ref_addr, $dst$$Register, t0 /* tmp */, barrier_data());
x_load_barrier(_masm, this, ref_addr, $dst$$Register, $tmp$$Register /* tmp */, barrier_data());
%}
ins_pipe(iload_reg_mem);
%}
instruct xCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, rFlagsReg cr) %{
instruct xCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
match(Set res (CompareAndSwapP mem (Binary oldval newval)));
match(Set res (WeakCompareAndSwapP mem (Binary oldval newval)));
predicate(UseZGC && !ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() == XLoadBarrierStrong);
effect(KILL cr, TEMP_DEF res);
effect(TEMP_DEF res, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
@@ -86,17 +86,15 @@ instruct xCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newva
Label failed;
guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::relaxed /* acquire */, Assembler::rl /* release */, $res$$Register,
true /* result_as_bool */);
__ beqz($res$$Register, failed);
__ mv(t0, $oldval$$Register);
__ bind(failed);
Assembler::relaxed /* acquire */, Assembler::rl /* release */, $tmp$$Register);
__ sub(t0, $tmp$$Register, $oldval$$Register);
__ seqz($res$$Register, t0);
if (barrier_data() != XLoadBarrierElided) {
Label good;
__ ld(t1, Address(xthread, XThreadLocalData::address_bad_mask_offset()), t1 /* tmp */);
__ andr(t1, t1, t0);
__ beqz(t1, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), t0 /* ref */, t1 /* tmp */);
__ ld(t0, Address(xthread, XThreadLocalData::address_bad_mask_offset()));
__ andr(t0, t0, $tmp$$Register);
__ beqz(t0, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $tmp$$Register /* ref */, $res$$Register /* tmp */);
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::relaxed /* acquire */, Assembler::rl /* release */, $res$$Register,
true /* result_as_bool */);
@@ -107,11 +105,11 @@ instruct xCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newva
ins_pipe(pipe_slow);
%}
instruct xCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, rFlagsReg cr) %{
instruct xCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
match(Set res (CompareAndSwapP mem (Binary oldval newval)));
match(Set res (WeakCompareAndSwapP mem (Binary oldval newval)));
predicate(UseZGC && !ZGenerational && needs_acquiring_load_reserved(n) && (n->as_LoadStore()->barrier_data() == XLoadBarrierStrong));
effect(KILL cr, TEMP_DEF res);
effect(TEMP_DEF res, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
@@ -122,17 +120,15 @@ instruct xCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP ne
Label failed;
guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::aq /* acquire */, Assembler::rl /* release */, $res$$Register,
true /* result_as_bool */);
__ beqz($res$$Register, failed);
__ mv(t0, $oldval$$Register);
__ bind(failed);
Assembler::aq /* acquire */, Assembler::rl /* release */, $tmp$$Register);
__ sub(t0, $tmp$$Register, $oldval$$Register);
__ seqz($res$$Register, t0);
if (barrier_data() != XLoadBarrierElided) {
Label good;
__ ld(t1, Address(xthread, XThreadLocalData::address_bad_mask_offset()), t1 /* tmp */);
__ andr(t1, t1, t0);
__ beqz(t1, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), t0 /* ref */, t1 /* tmp */);
__ ld(t0, Address(xthread, XThreadLocalData::address_bad_mask_offset()));
__ andr(t0, t0, $tmp$$Register);
__ beqz(t0, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $tmp$$Register /* ref */, $res$$Register /* tmp */);
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::aq /* acquire */, Assembler::rl /* release */, $res$$Register,
true /* result_as_bool */);
@@ -143,10 +139,10 @@ instruct xCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP ne
ins_pipe(pipe_slow);
%}
instruct xCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval) %{
instruct xCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
match(Set res (CompareAndExchangeP mem (Binary oldval newval)));
predicate(UseZGC && !ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() == XLoadBarrierStrong);
effect(TEMP_DEF res);
effect(TEMP_DEF res, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
@@ -161,7 +157,7 @@ instruct xCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP n
__ ld(t0, Address(xthread, XThreadLocalData::address_bad_mask_offset()));
__ andr(t0, t0, $res$$Register);
__ beqz(t0, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $res$$Register /* ref */, t0 /* tmp */);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $res$$Register /* ref */, $tmp$$Register /* tmp */);
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::relaxed /* acquire */, Assembler::rl /* release */, $res$$Register);
__ bind(good);
@@ -171,10 +167,10 @@ instruct xCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP n
ins_pipe(pipe_slow);
%}
instruct xCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval) %{
instruct xCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
match(Set res (CompareAndExchangeP mem (Binary oldval newval)));
predicate(UseZGC && !ZGenerational && needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() == XLoadBarrierStrong);
effect(TEMP_DEF res);
effect(TEMP_DEF res, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
@@ -189,7 +185,7 @@ instruct xCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iReg
__ ld(t0, Address(xthread, XThreadLocalData::address_bad_mask_offset()));
__ andr(t0, t0, $res$$Register);
__ beqz(t0, good);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $res$$Register /* ref */, t0 /* tmp */);
x_load_barrier_slow_path(_masm, this, Address($mem$$Register), $res$$Register /* ref */, $tmp$$Register /* tmp */);
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register, Assembler::int64,
Assembler::aq /* acquire */, Assembler::rl /* release */, $res$$Register);
__ bind(good);
@@ -199,10 +195,10 @@ instruct xCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iReg
ins_pipe(pipe_slow);
%}
instruct xGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
instruct xGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, iRegPNoSp tmp) %{
match(Set prev (GetAndSetP mem newv));
predicate(UseZGC && !ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP_DEF prev, KILL cr);
effect(TEMP_DEF prev, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
@@ -210,16 +206,16 @@ instruct xGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
ins_encode %{
__ atomic_xchg($prev$$Register, $newv$$Register, as_Register($mem$$base));
x_load_barrier(_masm, this, Address(noreg, 0), $prev$$Register, t0 /* tmp */, barrier_data());
x_load_barrier(_masm, this, Address(noreg, 0), $prev$$Register, $tmp$$Register /* tmp */, barrier_data());
%}
ins_pipe(pipe_serial);
%}
instruct xGetAndSetPAcq(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
instruct xGetAndSetPAcq(indirect mem, iRegP newv, iRegPNoSp prev, iRegPNoSp tmp) %{
match(Set prev (GetAndSetP mem newv));
predicate(UseZGC && !ZGenerational && needs_acquiring_load_reserved(n) && (n->as_LoadStore()->barrier_data() != 0));
effect(TEMP_DEF prev, KILL cr);
effect(TEMP_DEF prev, TEMP tmp);
ins_cost(VOLATILE_REF_COST);
@@ -227,7 +223,7 @@ instruct xGetAndSetPAcq(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr)
ins_encode %{
__ atomic_xchgal($prev$$Register, $newv$$Register, as_Register($mem$$base));
x_load_barrier(_masm, this, Address(noreg, 0), $prev$$Register, t0 /* tmp */, barrier_data());
x_load_barrier(_masm, this, Address(noreg, 0), $prev$$Register, $tmp$$Register /* tmp */, barrier_data());
%}
ins_pipe(pipe_serial);
%}

View File

@@ -79,7 +79,7 @@ static void z_load_barrier(MacroAssembler& _masm, const MachNode* node, Address
static void z_store_barrier(MacroAssembler& _masm, const MachNode* node, Address ref_addr, Register rnew_zaddress, Register rnew_zpointer, Register tmp, bool is_atomic) {
if (node->barrier_data() == ZBarrierElided) {
z_color(_masm, node, rnew_zpointer, rnew_zaddress, t0);
z_color(_masm, node, rnew_zpointer, rnew_zaddress, tmp);
} else {
bool is_native = (node->barrier_data() & ZBarrierNative) != 0;
ZStoreBarrierStubC2* const stub = ZStoreBarrierStubC2::create(node, ref_addr, rnew_zaddress, rnew_zpointer, is_native, is_atomic);
@@ -90,11 +90,11 @@ static void z_store_barrier(MacroAssembler& _masm, const MachNode* node, Address
%}
// Load Pointer
instruct zLoadP(iRegPNoSp dst, memory mem)
instruct zLoadP(iRegPNoSp dst, memory mem, iRegPNoSp tmp)
%{
match(Set dst (LoadP mem));
predicate(UseZGC && ZGenerational && n->as_Load()->barrier_data() != 0);
effect(TEMP dst);
effect(TEMP dst, TEMP tmp);
ins_cost(4 * DEFAULT_COST);
@@ -103,34 +103,35 @@ instruct zLoadP(iRegPNoSp dst, memory mem)
ins_encode %{
const Address ref_addr(as_Register($mem$$base), $mem$$disp);
__ ld($dst$$Register, ref_addr);
z_load_barrier(_masm, this, ref_addr, $dst$$Register, t0);
z_load_barrier(_masm, this, ref_addr, $dst$$Register, $tmp$$Register);
%}
ins_pipe(iload_reg_mem);
%}
// Store Pointer
instruct zStoreP(memory mem, iRegP src, iRegPNoSp tmp, rFlagsReg cr)
instruct zStoreP(memory mem, iRegP src, iRegPNoSp tmp1, iRegPNoSp tmp2)
%{
predicate(UseZGC && ZGenerational && n->as_Store()->barrier_data() != 0);
match(Set mem (StoreP mem src));
effect(TEMP tmp, KILL cr);
effect(TEMP tmp1, TEMP tmp2);
ins_cost(125); // XXX
format %{ "sd $mem, $src\t# ptr" %}
ins_encode %{
const Address ref_addr(as_Register($mem$$base), $mem$$disp);
z_store_barrier(_masm, this, ref_addr, $src$$Register, $tmp$$Register, t1, false /* is_atomic */);
__ sd($tmp$$Register, ref_addr);
z_store_barrier(_masm, this, ref_addr, $src$$Register, $tmp1$$Register, $tmp2$$Register, false /* is_atomic */);
__ sd($tmp1$$Register, ref_addr);
%}
ins_pipe(pipe_serial);
%}
instruct zCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, rFlagsReg cr) %{
instruct zCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval,
iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, iRegPNoSp tmp1) %{
match(Set res (CompareAndSwapP mem (Binary oldval newval)));
match(Set res (WeakCompareAndSwapP mem (Binary oldval newval)));
predicate(UseZGC && ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP oldval_tmp, TEMP newval_tmp, KILL cr, TEMP_DEF res);
effect(TEMP oldval_tmp, TEMP newval_tmp, TEMP tmp1, TEMP_DEF res);
ins_cost(2 * VOLATILE_REF_COST);
@@ -140,19 +141,20 @@ instruct zCompareAndSwapP(iRegINoSp res, indirect mem, iRegP oldval, iRegP newva
ins_encode %{
guarantee($mem$$disp == 0, "impossible encoding");
Address ref_addr($mem$$Register);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, t0);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, t1, true /* is_atomic */);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, $tmp1$$Register);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, $tmp1$$Register, true /* is_atomic */);
__ cmpxchg($mem$$Register, $oldval_tmp$$Register, $newval_tmp$$Register, Assembler::int64, Assembler::relaxed /* acquire */, Assembler::rl /* release */, $res$$Register, true /* result_as_bool */);
%}
ins_pipe(pipe_slow);
%}
instruct zCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, rFlagsReg cr) %{
instruct zCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval,
iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, iRegPNoSp tmp1) %{
match(Set res (CompareAndSwapP mem (Binary oldval newval)));
match(Set res (WeakCompareAndSwapP mem (Binary oldval newval)));
predicate(UseZGC && ZGenerational && needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP oldval_tmp, TEMP newval_tmp, KILL cr, TEMP_DEF res);
effect(TEMP oldval_tmp, TEMP newval_tmp, TEMP tmp1, TEMP_DEF res);
ins_cost(2 * VOLATILE_REF_COST);
@@ -162,18 +164,19 @@ instruct zCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP ne
ins_encode %{
guarantee($mem$$disp == 0, "impossible encoding");
Address ref_addr($mem$$Register);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, t0);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, t1, true /* is_atomic */);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, $tmp1$$Register);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, $tmp1$$Register, true /* is_atomic */);
__ cmpxchg($mem$$Register, $oldval_tmp$$Register, $newval_tmp$$Register, Assembler::int64, Assembler::aq /* acquire */, Assembler::rl /* release */, $res$$Register, true /* result_as_bool */);
%}
ins_pipe(pipe_slow);
%}
instruct zCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, rFlagsReg cr) %{
instruct zCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval,
iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, iRegPNoSp tmp1) %{
match(Set res (CompareAndExchangeP mem (Binary oldval newval)));
predicate(UseZGC && ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP oldval_tmp, TEMP newval_tmp, KILL cr, TEMP_DEF res);
effect(TEMP oldval_tmp, TEMP newval_tmp, TEMP tmp1, TEMP_DEF res);
ins_cost(2 * VOLATILE_REF_COST);
@@ -182,8 +185,8 @@ instruct zCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP n
ins_encode %{
guarantee($mem$$disp == 0, "impossible encoding");
Address ref_addr($mem$$Register);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, t0);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, t1, true /* is_atomic */);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, $tmp1$$Register);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, $tmp1$$Register, true /* is_atomic */);
__ cmpxchg($mem$$Register, $oldval_tmp$$Register, $newval_tmp$$Register, Assembler::int64, Assembler::relaxed /* acquire */, Assembler::rl /* release */, $res$$Register);
z_uncolor(_masm, this, $res$$Register);
%}
@@ -191,10 +194,11 @@ instruct zCompareAndExchangeP(iRegPNoSp res, indirect mem, iRegP oldval, iRegP n
ins_pipe(pipe_slow);
%}
instruct zCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval, iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, rFlagsReg cr) %{
instruct zCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval,
iRegPNoSp oldval_tmp, iRegPNoSp newval_tmp, iRegPNoSp tmp1) %{
match(Set res (CompareAndExchangeP mem (Binary oldval newval)));
predicate(UseZGC && ZGenerational && needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP oldval_tmp, TEMP newval_tmp, KILL cr, TEMP_DEF res);
effect(TEMP oldval_tmp, TEMP newval_tmp, TEMP tmp1, TEMP_DEF res);
ins_cost(2 * VOLATILE_REF_COST);
@@ -203,8 +207,8 @@ instruct zCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iReg
ins_encode %{
guarantee($mem$$disp == 0, "impossible encoding");
Address ref_addr($mem$$Register);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, t0);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, t1, true /* is_atomic */);
z_color(_masm, this, $oldval_tmp$$Register, $oldval$$Register, $tmp1$$Register);
z_store_barrier(_masm, this, ref_addr, $newval$$Register, $newval_tmp$$Register, $tmp1$$Register, true /* is_atomic */);
__ cmpxchg($mem$$Register, $oldval_tmp$$Register, $newval_tmp$$Register, Assembler::int64, Assembler::aq /* acquire */, Assembler::rl /* release */, $res$$Register);
z_uncolor(_masm, this, $res$$Register);
%}
@@ -212,17 +216,17 @@ instruct zCompareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iReg
ins_pipe(pipe_slow);
%}
instruct zGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
instruct zGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, iRegPNoSp tmp) %{
match(Set prev (GetAndSetP mem newv));
predicate(UseZGC && ZGenerational && !needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP_DEF prev, KILL cr);
effect(TEMP_DEF prev, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchg $prev, $newv, [$mem], #@zGetAndSetP" %}
ins_encode %{
z_store_barrier(_masm, this, Address($mem$$Register), $newv$$Register, $prev$$Register, t1, true /* is_atomic */);
z_store_barrier(_masm, this, Address($mem$$Register), $newv$$Register, $prev$$Register, $tmp$$Register, true /* is_atomic */);
__ atomic_xchg($prev$$Register, $prev$$Register, $mem$$Register);
z_uncolor(_masm, this, $prev$$Register);
%}
@@ -230,17 +234,17 @@ instruct zGetAndSetP(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
ins_pipe(pipe_serial);
%}
instruct zGetAndSetPAcq(indirect mem, iRegP newv, iRegPNoSp prev, rFlagsReg cr) %{
instruct zGetAndSetPAcq(indirect mem, iRegP newv, iRegPNoSp prev, iRegPNoSp tmp) %{
match(Set prev (GetAndSetP mem newv));
predicate(UseZGC && ZGenerational && needs_acquiring_load_reserved(n) && n->as_LoadStore()->barrier_data() != 0);
effect(TEMP_DEF prev, KILL cr);
effect(TEMP_DEF prev, TEMP tmp);
ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchg_acq $prev, $newv, [$mem], #@zGetAndSetPAcq" %}
ins_encode %{
z_store_barrier(_masm, this, Address($mem$$Register), $newv$$Register, $prev$$Register, t1, true /* is_atomic */);
z_store_barrier(_masm, this, Address($mem$$Register), $newv$$Register, $prev$$Register, $tmp$$Register, true /* is_atomic */);
__ atomic_xchgal($prev$$Register, $prev$$Register, $mem$$Register);
z_uncolor(_masm, this, $prev$$Register);
%}

View File

@@ -50,6 +50,10 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#define USE_POINTERS_TO_REGISTER_IMPL_ARRAY
// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 64
// The default padding size for data structures to avoid false sharing.
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
#endif // CPU_RISCV_GLOBALDEFINITIONS_RISCV_HPP

View File

@@ -105,6 +105,8 @@ define_pd_global(intx, InlineSmallCode, 1000);
product(bool, UseZba, false, "Use Zba instructions") \
product(bool, UseZbb, false, "Use Zbb instructions") \
product(bool, UseZbs, false, "Use Zbs instructions") \
product(bool, UseZfh, false, "Use Zfh instructions") \
product(bool, UseZacas, false, EXPERIMENTAL, "Use Zacas instructions") \
product(bool, UseZic64b, false, EXPERIMENTAL, "Use Zic64b instructions") \
product(bool, UseZicbom, false, EXPERIMENTAL, "Use Zicbom instructions") \
product(bool, UseZicbop, false, EXPERIMENTAL, "Use Zicbop instructions") \
@@ -112,6 +114,8 @@ define_pd_global(intx, InlineSmallCode, 1000);
product(bool, UseZtso, false, EXPERIMENTAL, "Assume Ztso memory model") \
product(bool, UseZihintpause, false, EXPERIMENTAL, \
"Use Zihintpause instructions") \
product(bool, UseZvkn, false, EXPERIMENTAL, \
"Use Zvkn group extension, Zvkned, Zvknhb, Zvkb, Zvkt") \
product(bool, UseRVVForBigIntegerShiftIntrinsics, true, \
"Use RVV instructions for left/right shift of BigInteger")

View File

@@ -777,7 +777,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
assert(lock_offset == 0,
"displached header must be first word in BasicObjectLock");
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, t0, count, /*fallthrough*/nullptr);
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, tmp, count, /*fallthrough*/nullptr);
// Test if the oopMark is an obvious stack pointer, i.e.,
// 1) (mark & 7) == 0, and
@@ -891,7 +891,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
beqz(header_reg, count);
// Atomic swap back the old header
cmpxchg_obj_header(swap_reg, header_reg, obj_reg, t0, count, /*fallthrough*/nullptr);
cmpxchg_obj_header(swap_reg, header_reg, obj_reg, tmp_reg, count, /*fallthrough*/nullptr);
}
// Call the runtime routine for slow case.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2725,27 +2725,36 @@ void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acqui
void MacroAssembler::cmpxchgptr(Register oldv, Register newv, Register addr, Register tmp,
Label &succeed, Label *fail) {
assert_different_registers(addr, tmp);
assert_different_registers(newv, tmp);
assert_different_registers(oldv, tmp);
assert_different_registers(addr, tmp, t0);
assert_different_registers(newv, tmp, t0);
assert_different_registers(oldv, tmp, t0);
// oldv holds comparison value
// newv holds value to write in exchange
// addr identifies memory word to compare against/update
Label retry_load, nope;
bind(retry_load);
// Load reserved from the memory location
load_reserved(tmp, addr, int64, Assembler::aqrl);
// Fail and exit if it is not what we expect
bne(tmp, oldv, nope);
// If the store conditional succeeds, tmp will be zero
store_conditional(tmp, newv, addr, int64, Assembler::rl);
beqz(tmp, succeed);
// Retry only when the store conditional failed
j(retry_load);
if (UseZacas) {
mv(tmp, oldv);
atomic_cas(tmp, newv, addr, Assembler::int64, Assembler::aq, Assembler::rl);
beq(tmp, oldv, succeed);
} else {
Label retry_load, nope;
bind(retry_load);
// Load reserved from the memory location
load_reserved(tmp, addr, int64, Assembler::aqrl);
// Fail and exit if it is not what we expect
bne(tmp, oldv, nope);
// If the store conditional succeeds, tmp will be zero
store_conditional(tmp, newv, addr, int64, Assembler::rl);
beqz(tmp, succeed);
// Retry only when the store conditional failed
j(retry_load);
bind(nope);
bind(nope);
}
// neither amocas nor lr/sc have an implied barrier in the failing case
membar(AnyAny);
mv(oldv, tmp);
if (fail != nullptr) {
j(*fail);
@@ -2771,7 +2780,7 @@ void MacroAssembler::load_reserved(Register dst,
break;
case uint32:
lr_w(dst, addr, acquire);
zero_extend(t0, t0, 32);
zero_extend(dst, dst, 32);
break;
default:
ShouldNotReachHere();
@@ -2819,7 +2828,7 @@ void MacroAssembler::cmpxchg_narrow_value_helper(Register addr, Register expecte
}
sll(mask, mask, shift);
xori(not_mask, mask, -1);
notr(not_mask, mask);
sll(expected, expected, shift);
andr(expected, expected, mask);
@@ -2829,7 +2838,7 @@ void MacroAssembler::cmpxchg_narrow_value_helper(Register addr, Register expecte
}
// cmpxchg_narrow_value will kill t0, t1, expected, new_val and tmps.
// It's designed to implement compare and swap byte/boolean/char/short by lr.w/sc.w,
// It's designed to implement compare and swap byte/boolean/char/short by lr.w/sc.w or amocas.w,
// which are forced to work with 4-byte aligned address.
void MacroAssembler::cmpxchg_narrow_value(Register addr, Register expected,
Register new_val,
@@ -2844,14 +2853,29 @@ void MacroAssembler::cmpxchg_narrow_value(Register addr, Register expected,
Label retry, fail, done;
bind(retry);
lr_w(old, aligned_addr, acquire);
andr(tmp, old, mask);
bne(tmp, expected, fail);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
sc_w(tmp, tmp, aligned_addr, release);
bnez(tmp, retry);
if (UseZacas) {
lw(old, aligned_addr);
// if old & mask != expected
andr(tmp, old, mask);
bne(tmp, expected, fail);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
atomic_cas(old, tmp, aligned_addr, operand_size::int32, acquire, release);
bne(tmp, old, retry);
} else {
lr_w(old, aligned_addr, acquire);
andr(tmp, old, mask);
bne(tmp, expected, fail);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
sc_w(tmp, tmp, aligned_addr, release);
bnez(tmp, retry);
}
if (result_as_bool) {
mv(result, 1);
@@ -2891,14 +2915,28 @@ void MacroAssembler::weak_cmpxchg_narrow_value(Register addr, Register expected,
Label fail, done;
lr_w(old, aligned_addr, acquire);
andr(tmp, old, mask);
bne(tmp, expected, fail);
if (UseZacas) {
lw(old, aligned_addr);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
sc_w(tmp, tmp, aligned_addr, release);
bnez(tmp, fail);
// if old & mask != expected
andr(tmp, old, mask);
bne(tmp, expected, fail);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
atomic_cas(tmp, new_val, addr, operand_size::int32, acquire, release);
bne(tmp, old, fail);
} else {
lr_w(old, aligned_addr, acquire);
andr(tmp, old, mask);
bne(tmp, expected, fail);
andr(tmp, old, not_mask);
orr(tmp, tmp, new_val);
sc_w(tmp, tmp, aligned_addr, release);
bnez(tmp, fail);
}
// Success
mv(result, 1);
@@ -2921,6 +2959,19 @@ void MacroAssembler::cmpxchg(Register addr, Register expected,
assert_different_registers(expected, t0);
assert_different_registers(new_val, t0);
if (UseZacas) {
if (result_as_bool) {
mv(t0, expected);
atomic_cas(t0, new_val, addr, size, acquire, release);
xorr(t0, t0, expected);
seqz(result, t0);
} else {
mv(result, expected);
atomic_cas(result, new_val, addr, size, acquire, release);
}
return;
}
Label retry_load, done, ne_done;
bind(retry_load);
load_reserved(t0, addr, size, acquire);
@@ -2952,6 +3003,11 @@ void MacroAssembler::cmpxchg_weak(Register addr, Register expected,
enum operand_size size,
Assembler::Aqrl acquire, Assembler::Aqrl release,
Register result) {
if (UseZacas) {
cmpxchg(addr, expected, new_val, size, acquire, release, result, true);
return;
}
assert_different_registers(addr, t0);
assert_different_registers(expected, t0);
assert_different_registers(new_val, t0);
@@ -3018,6 +3074,89 @@ ATOMIC_XCHGU(xchgalwu, xchgalw)
#undef ATOMIC_XCHGU
#define ATOMIC_CAS(OP, AOP, ACQUIRE, RELEASE) \
void MacroAssembler::atomic_##OP(Register prev, Register newv, Register addr) { \
assert(UseZacas, "invariant"); \
prev = prev->is_valid() ? prev : zr; \
AOP(prev, addr, newv, (Assembler::Aqrl)(ACQUIRE | RELEASE)); \
return; \
}
ATOMIC_CAS(cas, amocas_d, Assembler::relaxed, Assembler::relaxed)
ATOMIC_CAS(casw, amocas_w, Assembler::relaxed, Assembler::relaxed)
ATOMIC_CAS(casl, amocas_d, Assembler::relaxed, Assembler::rl)
ATOMIC_CAS(caslw, amocas_w, Assembler::relaxed, Assembler::rl)
ATOMIC_CAS(casal, amocas_d, Assembler::aq, Assembler::rl)
ATOMIC_CAS(casalw, amocas_w, Assembler::aq, Assembler::rl)
#undef ATOMIC_CAS
#define ATOMIC_CASU(OP1, OP2) \
void MacroAssembler::atomic_##OP1(Register prev, Register newv, Register addr) { \
atomic_##OP2(prev, newv, addr); \
zero_extend(prev, prev, 32); \
return; \
}
ATOMIC_CASU(caswu, casw)
ATOMIC_CASU(caslwu, caslw)
ATOMIC_CASU(casalwu, casalw)
#undef ATOMIC_CASU
void MacroAssembler::atomic_cas(
Register prev, Register newv, Register addr, enum operand_size size, Assembler::Aqrl acquire, Assembler::Aqrl release) {
switch (size) {
case int64:
switch ((Assembler::Aqrl)(acquire | release)) {
case Assembler::relaxed:
atomic_cas(prev, newv, addr);
break;
case Assembler::rl:
atomic_casl(prev, newv, addr);
break;
case Assembler::aqrl:
atomic_casal(prev, newv, addr);
break;
default:
ShouldNotReachHere();
}
break;
case int32:
switch ((Assembler::Aqrl)(acquire | release)) {
case Assembler::relaxed:
atomic_casw(prev, newv, addr);
break;
case Assembler::rl:
atomic_caslw(prev, newv, addr);
break;
case Assembler::aqrl:
atomic_casalw(prev, newv, addr);
break;
default:
ShouldNotReachHere();
}
break;
case uint32:
switch ((Assembler::Aqrl)(acquire | release)) {
case Assembler::relaxed:
atomic_caswu(prev, newv, addr);
break;
case Assembler::rl:
atomic_caslwu(prev, newv, addr);
break;
case Assembler::aqrl:
atomic_casalwu(prev, newv, addr);
break;
default:
ShouldNotReachHere();
}
break;
default:
ShouldNotReachHere();
}
}
void MacroAssembler::far_jump(const Address &entry, Register tmp) {
assert(ReservedCodeCacheSize < 4*G, "branch out of range");
assert(CodeCache::find_blob(entry.target()) != nullptr,
@@ -4342,6 +4481,57 @@ void MacroAssembler::zero_dcache_blocks(Register base, Register cnt, Register tm
bge(cnt, tmp1, loop);
}
// java.lang.Math.round(float a)
// Returns the closest int to the argument, with ties rounding to positive infinity.
void MacroAssembler::java_round_float(Register dst, FloatRegister src, FloatRegister ftmp) {
// this instructions calling sequence provides performance improvement on all tested devices;
// don't change it without re-verification
Label done;
mv(t0, jint_cast(0.5f));
fmv_w_x(ftmp, t0);
// dst = 0 if NaN
feq_s(t0, src, src); // replacing fclass with feq as performance optimization
mv(dst, zr);
beqz(t0, done);
// dst = (src + 0.5f) rounded down towards negative infinity
// Adding 0.5f to some floats exceeds the precision limits for a float and rounding takes place.
// RDN is required for fadd_s, RNE gives incorrect results:
// --------------------------------------------------------------------
// fadd.s rne (src + 0.5f): src = 8388609.000000 ftmp = 8388610.000000
// fcvt.w.s rdn: ftmp = 8388610.000000 dst = 8388610
// --------------------------------------------------------------------
// fadd.s rdn (src + 0.5f): src = 8388609.000000 ftmp = 8388609.000000
// fcvt.w.s rdn: ftmp = 8388609.000000 dst = 8388609
// --------------------------------------------------------------------
fadd_s(ftmp, src, ftmp, RoundingMode::rdn);
fcvt_w_s(dst, ftmp, RoundingMode::rdn);
bind(done);
}
// java.lang.Math.round(double a)
// Returns the closest long to the argument, with ties rounding to positive infinity.
void MacroAssembler::java_round_double(Register dst, FloatRegister src, FloatRegister ftmp) {
// this instructions calling sequence provides performance improvement on all tested devices;
// don't change it without re-verification
Label done;
mv(t0, julong_cast(0.5));
fmv_d_x(ftmp, t0);
// dst = 0 if NaN
feq_d(t0, src, src); // replacing fclass with feq as performance optimization
mv(dst, zr);
beqz(t0, done);
// dst = (src + 0.5) rounded down towards negative infinity
fadd_d(ftmp, src, ftmp, RoundingMode::rdn); // RDN is required here otherwise some inputs produce incorrect results
fcvt_l_d(dst, ftmp, RoundingMode::rdn);
bind(done);
}
#define FCVT_SAFE(FLOATCVT, FLOATSIG) \
void MacroAssembler::FLOATCVT##_safe(Register dst, FloatRegister src, Register tmp) { \
Label done; \
@@ -4488,41 +4678,54 @@ void MacroAssembler::shadd(Register Rd, Register Rs1, Register Rs2, Register tmp
}
void MacroAssembler::zero_extend(Register dst, Register src, int bits) {
if (UseZba && bits == 32) {
zext_w(dst, src);
return;
}
if (UseZbb && bits == 16) {
zext_h(dst, src);
return;
}
if (bits == 8) {
zext_b(dst, src);
} else {
slli(dst, src, XLEN - bits);
srli(dst, dst, XLEN - bits);
switch (bits) {
case 32:
if (UseZba) {
zext_w(dst, src);
return;
}
break;
case 16:
if (UseZbb) {
zext_h(dst, src);
return;
}
break;
case 8:
if (UseZbb) {
zext_b(dst, src);
return;
}
break;
default:
break;
}
slli(dst, src, XLEN - bits);
srli(dst, dst, XLEN - bits);
}
void MacroAssembler::sign_extend(Register dst, Register src, int bits) {
if (UseZbb) {
if (bits == 8) {
sext_b(dst, src);
switch (bits) {
case 32:
sext_w(dst, src);
return;
} else if (bits == 16) {
sext_h(dst, src);
return;
}
}
if (bits == 32) {
sext_w(dst, src);
} else {
slli(dst, src, XLEN - bits);
srai(dst, dst, XLEN - bits);
case 16:
if (UseZbb) {
sext_h(dst, src);
return;
}
break;
case 8:
if (UseZbb) {
sext_b(dst, src);
return;
}
break;
default:
break;
}
slli(dst, src, XLEN - bits);
srai(dst, dst, XLEN - bits);
}
void MacroAssembler::cmp_x2i(Register dst, Register src1, Register src2,
@@ -4701,9 +4904,9 @@ void MacroAssembler::object_move(OopMap* map,
// A float arg may have to do float reg int reg conversion
void MacroAssembler::float_move(VMRegPair src, VMRegPair dst, Register tmp) {
assert(src.first()->is_stack() && dst.first()->is_stack() ||
src.first()->is_reg() && dst.first()->is_reg() ||
src.first()->is_stack() && dst.first()->is_reg(), "Unexpected error");
assert((src.first()->is_stack() && dst.first()->is_stack()) ||
(src.first()->is_reg() && dst.first()->is_reg()) ||
(src.first()->is_stack() && dst.first()->is_reg()), "Unexpected error");
if (src.first()->is_stack()) {
if (dst.first()->is_stack()) {
lwu(tmp, Address(fp, reg2offset_in(src.first())));
@@ -4745,9 +4948,9 @@ void MacroAssembler::long_move(VMRegPair src, VMRegPair dst, Register tmp) {
// A double move
void MacroAssembler::double_move(VMRegPair src, VMRegPair dst, Register tmp) {
assert(src.first()->is_stack() && dst.first()->is_stack() ||
src.first()->is_reg() && dst.first()->is_reg() ||
src.first()->is_stack() && dst.first()->is_reg(), "Unexpected error");
assert((src.first()->is_stack() && dst.first()->is_stack()) ||
(src.first()->is_reg() && dst.first()->is_reg()) ||
(src.first()->is_stack() && dst.first()->is_reg()), "Unexpected error");
if (src.first()->is_stack()) {
if (dst.first()->is_stack()) {
ld(tmp, Address(fp, reg2offset_in(src.first())));

View File

@@ -473,7 +473,11 @@ class MacroAssembler: public Assembler {
}
inline void notr(Register Rd, Register Rs) {
xori(Rd, Rs, -1);
if (do_compress_zcb(Rd, Rs) && (Rd == Rs)) {
c_not(Rd);
} else {
xori(Rd, Rs, -1);
}
}
inline void neg(Register Rd, Register Rs) {
@@ -489,7 +493,11 @@ class MacroAssembler: public Assembler {
}
inline void zext_b(Register Rd, Register Rs) {
andi(Rd, Rs, 0xFF);
if (do_compress_zcb(Rd, Rs) && (Rd == Rs)) {
c_zext_b(Rd);
} else {
andi(Rd, Rs, 0xFF);
}
}
inline void seqz(Register Rd, Register Rs) {
@@ -511,7 +519,12 @@ class MacroAssembler: public Assembler {
// Bit-manipulation extension pseudo instructions
// zero extend word
inline void zext_w(Register Rd, Register Rs) {
add_uw(Rd, Rs, zr);
assert(UseZba, "must be");
if (do_compress_zcb(Rd, Rs) && (Rd == Rs)) {
c_zext_w(Rd);
} else {
add_uw(Rd, Rs, zr);
}
}
// Floating-point data-processing pseudo instructions
@@ -1063,6 +1076,19 @@ public:
void atomic_xchgwu(Register prev, Register newv, Register addr);
void atomic_xchgalwu(Register prev, Register newv, Register addr);
void atomic_cas(Register prev, Register newv, Register addr);
void atomic_casw(Register prev, Register newv, Register addr);
void atomic_casl(Register prev, Register newv, Register addr);
void atomic_caslw(Register prev, Register newv, Register addr);
void atomic_casal(Register prev, Register newv, Register addr);
void atomic_casalw(Register prev, Register newv, Register addr);
void atomic_caswu(Register prev, Register newv, Register addr);
void atomic_caslwu(Register prev, Register newv, Register addr);
void atomic_casalwu(Register prev, Register newv, Register addr);
void atomic_cas(Register prev, Register newv, Register addr, enum operand_size size,
Assembler::Aqrl acquire = Assembler::relaxed, Assembler::Aqrl release = Assembler::relaxed);
// Emit a far call/jump. Only invalidates the tmp register which
// is used to keep the entry address for jalr.
// The address must be inside the code cache.
@@ -1252,6 +1278,9 @@ public:
void fcvt_w_d_safe(Register dst, FloatRegister src, Register tmp = t0);
void fcvt_l_d_safe(Register dst, FloatRegister src, Register tmp = t0);
void java_round_float(Register dst, FloatRegister src, FloatRegister ftmp);
void java_round_double(Register dst, FloatRegister src, FloatRegister ftmp);
// vector load/store unit-stride instructions
void vlex_v(VectorRegister vd, Register base, Assembler::SEW sew, VectorMask vm = unmasked) {
switch (sew) {
@@ -1345,6 +1374,16 @@ public:
vmfle_vv(vd, vs1, vs2, vm);
}
inline void vmsltu_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) {
guarantee(imm >= 1 && imm <= 16, "imm is invalid");
vmsleu_vi(Vd, Vs2, imm-1, vm);
}
inline void vmsgeu_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) {
guarantee(imm >= 1 && imm <= 16, "imm is invalid");
vmsgtu_vi(Vd, Vs2, imm-1, vm);
}
// Copy mask register
inline void vmmv_m(VectorRegister vd, VectorRegister vs) {
vmand_mm(vd, vs, vs);
@@ -1360,6 +1399,10 @@ public:
vmxnor_mm(vd, vd, vd);
}
inline void vnot_v(VectorRegister Vd, VectorRegister Vs, VectorMask vm = unmasked) {
vxor_vi(Vd, Vs, -1, vm);
}
static const int zero_words_block_size;
void cast_primitive_type(BasicType type, Register Rt) {

View File

@@ -27,7 +27,6 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_riscv.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.hpp"
@@ -157,7 +156,6 @@ void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");
ResourceMark rm;
address addr_call = addr_at(0);
assert(NativeCall::is_call_at(addr_call), "unexpected code at call site");
@@ -451,16 +449,27 @@ void NativePostCallNop::make_deopt() {
NativeDeoptInstruction::insert(addr_at(0));
}
int NativePostCallNop::displacement() const {
bool NativePostCallNop::decode(int32_t& oopmap_slot, int32_t& cb_offset) const {
// Discard the high 32 bits
return (int)(intptr_t)MacroAssembler::get_target_of_li32(addr_at(4));
int32_t data = (int32_t)(intptr_t)MacroAssembler::get_target_of_li32(addr_at(4));
if (data == 0) {
return false; // no information encoded
}
cb_offset = (data & 0xffffff);
oopmap_slot = (data >> 24) & 0xff;
return true; // decoding succeeded
}
void NativePostCallNop::patch(jint diff) {
assert(diff != 0, "must be");
bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
if (((oopmap_slot & 0xff) != oopmap_slot) || ((cb_offset & 0xffffff) != cb_offset)) {
return false; // cannot encode
}
int32_t data = (oopmap_slot << 24) | cb_offset;
assert(data != 0, "must be");
assert(is_lui_to_zr_at(addr_at(4)) && is_addiw_to_zr_at(addr_at(8)), "must be");
MacroAssembler::patch_imm_in_li32(addr_at(4), diff);
MacroAssembler::patch_imm_in_li32(addr_at(4), data);
return true; // successfully encoded
}
void NativeDeoptInstruction::verify() {

View File

@@ -591,8 +591,8 @@ public:
// an addiw as well.
return is_nop() && is_lui_to_zr_at(addr_at(4));
}
int displacement() const;
void patch(jint diff);
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const;
bool patch(int32_t oopmap_slot, int32_t cb_offset);
void make_deopt();
};

View File

@@ -1001,6 +1001,7 @@ definitions %{
int_def LOAD_COST ( 300, 3 * DEFAULT_COST); // load, fpload
int_def STORE_COST ( 100, 1 * DEFAULT_COST); // store, fpstore
int_def XFER_COST ( 300, 3 * DEFAULT_COST); // mfc, mtc, fcvt, fmove, fcmp
int_def FMVX_COST ( 100, 1 * DEFAULT_COST); // shuffles with no conversion
int_def BRANCH_COST ( 200, 2 * DEFAULT_COST); // branch, jmp, call
int_def IMUL_COST ( 1000, 10 * DEFAULT_COST); // imul
int_def IDIVSI_COST ( 3400, 34 * DEFAULT_COST); // idivsi
@@ -1931,6 +1932,10 @@ bool Matcher::match_rule_supported(int opcode) {
case Op_FmaVF:
case Op_FmaVD:
return UseFMA;
case Op_ConvHF2F:
case Op_ConvF2HF:
return UseZfh;
}
return true; // Per default match rules are supported.
@@ -8274,6 +8279,32 @@ instruct convD2F_reg(fRegF dst, fRegD src) %{
ins_pipe(fp_d2f);
%}
// single <-> half precision
instruct convHF2F_reg_reg(fRegF dst, iRegINoSp src, iRegINoSp tmp) %{
match(Set dst (ConvHF2F src));
effect(TEMP tmp);
format %{ "fmv.h.x $dst, $src\t# move source from $src to $dst\n\t"
"fcvt.s.h $dst, $dst\t# convert half to single precision"
%}
ins_encode %{
__ float16_to_float($dst$$FloatRegister, $src$$Register, $tmp$$Register);
%}
ins_pipe(pipe_slow);
%}
instruct convF2HF_reg_reg(iRegINoSp dst, fRegF src, fRegF ftmp, iRegINoSp xtmp) %{
match(Set dst (ConvF2HF src));
effect(TEMP_DEF dst, TEMP ftmp, TEMP xtmp);
format %{ "fcvt.h.s $ftmp, $src\t# convert single precision to half\n\t"
"fmv.x.h $dst, $ftmp\t# move result from $ftmp to $dst"
%}
ins_encode %{
__ float_to_float16($dst$$Register, $src$$FloatRegister, $ftmp$$FloatRegister, $xtmp$$Register);
%}
ins_pipe(pipe_slow);
%}
// float <-> int
instruct convF2I_reg_reg(iRegINoSp dst, fRegF src) %{
@@ -8417,6 +8448,34 @@ instruct convN2I(iRegINoSp dst, iRegN src)
ins_pipe(ialu_reg);
%}
instruct round_double_reg(iRegLNoSp dst, fRegD src, fRegD ftmp) %{
match(Set dst (RoundD src));
ins_cost(XFER_COST + BRANCH_COST);
effect(TEMP ftmp);
format %{ "java_round_double $dst, $src\t#@round_double_reg" %}
ins_encode %{
__ java_round_double($dst$$Register, as_FloatRegister($src$$reg), as_FloatRegister($ftmp$$reg));
%}
ins_pipe(pipe_slow);
%}
instruct round_float_reg(iRegINoSp dst, fRegF src, fRegF ftmp) %{
match(Set dst (RoundF src));
ins_cost(XFER_COST + BRANCH_COST);
effect(TEMP ftmp);
format %{ "java_round_float $dst, $src\t#@round_float_reg" %}
ins_encode %{
__ java_round_float($dst$$Register, as_FloatRegister($src$$reg), as_FloatRegister($ftmp$$reg));
%}
ins_pipe(pipe_slow);
%}
// Convert oop pointer into compressed form
instruct encodeHeapOop(iRegNNoSp dst, iRegP src) %{
match(Set dst (EncodeP src));
@@ -8646,7 +8705,7 @@ instruct MoveF2I_reg_reg(iRegINoSp dst, fRegF src) %{
effect(DEF dst, USE src);
ins_cost(XFER_COST);
ins_cost(FMVX_COST);
format %{ "fmv.x.w $dst, $src\t#@MoveF2I_reg_reg" %}
@@ -8664,7 +8723,7 @@ instruct MoveI2F_reg_reg(fRegF dst, iRegI src) %{
effect(DEF dst, USE src);
ins_cost(XFER_COST);
ins_cost(FMVX_COST);
format %{ "fmv.w.x $dst, $src\t#@MoveI2F_reg_reg" %}
@@ -8682,7 +8741,7 @@ instruct MoveD2L_reg_reg(iRegLNoSp dst, fRegD src) %{
effect(DEF dst, USE src);
ins_cost(XFER_COST);
ins_cost(FMVX_COST);
format %{ "fmv.x.d $dst, $src\t#@MoveD2L_reg_reg" %}
@@ -8700,7 +8759,7 @@ instruct MoveL2D_reg_reg(fRegD dst, iRegL src) %{
effect(DEF dst, USE src);
ins_cost(XFER_COST);
ins_cost(FMVX_COST);
format %{ "fmv.d.x $dst, $src\t#@MoveL2D_reg_reg" %}

View File

@@ -266,7 +266,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
uint int_args = 0;
uint fp_args = 0;
uint stk_args = 0; // inc by 2 each time
uint stk_args = 0;
for (int i = 0; i < total_args_passed; i++) {
switch (sig_bt[i]) {
@@ -278,8 +278,9 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (int_args < Argument::n_int_register_parameters_j) {
regs[i].set1(INT_ArgReg[int_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set1(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
stk_args += 1;
}
break;
case T_VOID:
@@ -295,6 +296,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (int_args < Argument::n_int_register_parameters_j) {
regs[i].set2(INT_ArgReg[int_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set2(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
}
@@ -303,8 +305,9 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (fp_args < Argument::n_float_register_parameters_j) {
regs[i].set1(FP_ArgReg[fp_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set1(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
stk_args += 1;
}
break;
case T_DOUBLE:
@@ -312,6 +315,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
if (fp_args < Argument::n_float_register_parameters_j) {
regs[i].set2(FP_ArgReg[fp_args++]->as_VMReg());
} else {
stk_args = align_up(stk_args, 2);
regs[i].set2(VMRegImpl::stack2reg(stk_args));
stk_args += 2;
}
@@ -321,7 +325,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
}
}
return align_up(stk_args, 2);
return stk_args;
}
// Patch the callers callsite with entry to compiled code if it exists.
@@ -1675,7 +1679,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
__ sd(swap_reg, Address(lock_reg, mark_word_offset));
// src -> dest if dest == x10 else x10 <- dest
__ cmpxchg_obj_header(x10, lock_reg, obj_reg, t0, count, /*fallthrough*/nullptr);
__ cmpxchg_obj_header(x10, lock_reg, obj_reg, lock_tmp, count, /*fallthrough*/nullptr);
// Test if the oopMark is an obvious stack pointer, i.e.,
// 1) (mark & 3) == 0, and
@@ -1815,7 +1819,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Atomic swap old header if oop still contains the stack lock
Label count;
__ cmpxchg_obj_header(x10, old_hdr, obj_reg, t0, count, &slow_path_unlock);
__ cmpxchg_obj_header(x10, old_hdr, obj_reg, lock_tmp, count, &slow_path_unlock);
__ bind(count);
__ decrement(Address(xthread, JavaThread::held_monitor_count_offset()));
} else {

View File

@@ -3659,8 +3659,394 @@ class StubGenerator: public StubCodeGenerator {
return entry;
}
};
#endif // COMPILER2
#undef __
#define __ this->
class Sha2Generator : public MacroAssembler {
StubCodeGenerator* _cgen;
public:
Sha2Generator(MacroAssembler* masm, StubCodeGenerator* cgen) : MacroAssembler(masm->code()), _cgen(cgen) {}
address generate_sha256_implCompress(bool multi_block) {
return generate_sha2_implCompress(Assembler::e32, multi_block);
}
address generate_sha512_implCompress(bool multi_block) {
return generate_sha2_implCompress(Assembler::e64, multi_block);
}
private:
void vleXX_v(Assembler::SEW vset_sew, VectorRegister vr, Register sr) {
if (vset_sew == Assembler::e32) __ vle32_v(vr, sr);
else __ vle64_v(vr, sr);
}
void vseXX_v(Assembler::SEW vset_sew, VectorRegister vr, Register sr) {
if (vset_sew == Assembler::e32) __ vse32_v(vr, sr);
else __ vse64_v(vr, sr);
}
// Overview of the logic in each "quad round".
//
// The code below repeats 16/20 times the logic implementing four rounds
// of the SHA-256/512 core loop as documented by NIST. 16/20 "quad rounds"
// to implementing the 64/80 single rounds.
//
// // Load four word (u32/64) constants (K[t+3], K[t+2], K[t+1], K[t+0])
// // Output:
// // vTmp1 = {K[t+3], K[t+2], K[t+1], K[t+0]}
// vl1reXX.v vTmp1, ofs
//
// // Increment word constant address by stride (16/32 bytes, 4*4B/8B, 128b/256b)
// addi ofs, ofs, 16/32
//
// // Add constants to message schedule words:
// // Input
// // vTmp1 = {K[t+3], K[t+2], K[t+1], K[t+0]}
// // vW0 = {W[t+3], W[t+2], W[t+1], W[t+0]}; // Vt0 = W[3:0];
// // Output
// // vTmp0 = {W[t+3]+K[t+3], W[t+2]+K[t+2], W[t+1]+K[t+1], W[t+0]+K[t+0]}
// vadd.vv vTmp0, vTmp1, vW0
//
// // 2 rounds of working variables updates.
// // vState1[t+4] <- vState1[t], vState0[t], vTmp0[t]
// // Input:
// // vState1 = {c[t],d[t],g[t],h[t]} " = vState1[t] "
// // vState0 = {a[t],b[t],e[t],f[t]}
// // vTmp0 = {W[t+3]+K[t+3], W[t+2]+K[t+2], W[t+1]+K[t+1], W[t+0]+K[t+0]}
// // Output:
// // vState1 = {f[t+2],e[t+2],b[t+2],a[t+2]} " = vState0[t+2] "
// // = {h[t+4],g[t+4],d[t+4],c[t+4]} " = vState1[t+4] "
// vsha2cl.vv vState1, vState0, vTmp0
//
// // 2 rounds of working variables updates.
// // vState0[t+4] <- vState0[t], vState0[t+2], vTmp0[t]
// // Input
// // vState0 = {a[t],b[t],e[t],f[t]} " = vState0[t] "
// // = {h[t+2],g[t+2],d[t+2],c[t+2]} " = vState1[t+2] "
// // vState1 = {f[t+2],e[t+2],b[t+2],a[t+2]} " = vState0[t+2] "
// // vTmp0 = {W[t+3]+K[t+3], W[t+2]+K[t+2], W[t+1]+K[t+1], W[t+0]+K[t+0]}
// // Output:
// // vState0 = {f[t+4],e[t+4],b[t+4],a[t+4]} " = vState0[t+4] "
// vsha2ch.vv vState0, vState1, vTmp0
//
// // Combine 2QW into 1QW
// //
// // To generate the next 4 words, "new_vW0"/"vTmp0" from vW0-vW3, vsha2ms needs
// // vW0[0..3], vW1[0], vW2[1..3], vW3[0, 2..3]
// // and it can only take 3 vectors as inputs. Hence we need to combine
// // vW1[0] and vW2[1..3] in a single vector.
// //
// // vmerge Vt4, Vt1, Vt2, V0
// // Input
// // V0 = mask // first word from vW2, 1..3 words from vW1
// // vW2 = {Wt-8, Wt-7, Wt-6, Wt-5}
// // vW1 = {Wt-12, Wt-11, Wt-10, Wt-9}
// // Output
// // Vt4 = {Wt-12, Wt-7, Wt-6, Wt-5}
// vmerge.vvm vTmp0, vW2, vW1, v0
//
// // Generate next Four Message Schedule Words (hence allowing for 4 more rounds)
// // Input
// // vW0 = {W[t+ 3], W[t+ 2], W[t+ 1], W[t+ 0]} W[ 3: 0]
// // vW3 = {W[t+15], W[t+14], W[t+13], W[t+12]} W[15:12]
// // vTmp0 = {W[t+11], W[t+10], W[t+ 9], W[t+ 4]} W[11: 9,4]
// // Output (next four message schedule words)
// // vW0 = {W[t+19], W[t+18], W[t+17], W[t+16]} W[19:16]
// vsha2ms.vv vW0, vTmp0, vW3
//
// BEFORE
// vW0 - vW3 hold the message schedule words (initially the block words)
// vW0 = W[ 3: 0] "oldest"
// vW1 = W[ 7: 4]
// vW2 = W[11: 8]
// vW3 = W[15:12] "newest"
//
// vt6 - vt7 hold the working state variables
// vState0 = {a[t],b[t],e[t],f[t]} // initially {H5,H4,H1,H0}
// vState1 = {c[t],d[t],g[t],h[t]} // initially {H7,H6,H3,H2}
//
// AFTER
// vW0 - vW3 hold the message schedule words (initially the block words)
// vW1 = W[ 7: 4] "oldest"
// vW2 = W[11: 8]
// vW3 = W[15:12]
// vW0 = W[19:16] "newest"
//
// vState0 and vState1 hold the working state variables
// vState0 = {a[t+4],b[t+4],e[t+4],f[t+4]}
// vState1 = {c[t+4],d[t+4],g[t+4],h[t+4]}
//
// The group of vectors vW0,vW1,vW2,vW3 is "rotated" by one in each quad-round,
// hence the uses of those vectors rotate in each round, and we get back to the
// initial configuration every 4 quad-rounds. We could avoid those changes at
// the cost of moving those vectors at the end of each quad-rounds.
void sha2_quad_round(Assembler::SEW vset_sew, VectorRegister rot1, VectorRegister rot2, VectorRegister rot3, VectorRegister rot4,
Register scalarconst, VectorRegister vtemp, VectorRegister vtemp2, VectorRegister v_abef, VectorRegister v_cdgh,
bool gen_words = true, bool step_const = true) {
__ vleXX_v(vset_sew, vtemp, scalarconst);
if (step_const) {
__ addi(scalarconst, scalarconst, vset_sew == Assembler::e32 ? 16 : 32);
}
__ vadd_vv(vtemp2, vtemp, rot1);
__ vsha2cl_vv(v_cdgh, v_abef, vtemp2);
__ vsha2ch_vv(v_abef, v_cdgh, vtemp2);
if (gen_words) {
__ vmerge_vvm(vtemp2, rot3, rot2);
__ vsha2ms_vv(rot1, vtemp2, rot4);
}
}
const char* stub_name(Assembler::SEW vset_sew, bool multi_block) {
if (vset_sew == Assembler::e32 && !multi_block) return "sha256_implCompress";
if (vset_sew == Assembler::e32 && multi_block) return "sha256_implCompressMB";
if (vset_sew == Assembler::e64 && !multi_block) return "sha512_implCompress";
if (vset_sew == Assembler::e64 && multi_block) return "sha512_implCompressMB";
ShouldNotReachHere();
return "bad name lookup";
}
// Arguments:
//
// Inputs:
// c_rarg0 - byte[] source+offset
// c_rarg1 - int[] SHA.state
// c_rarg2 - int offset
// c_rarg3 - int limit
//
address generate_sha2_implCompress(Assembler::SEW vset_sew, bool multi_block) {
alignas(64) static const uint32_t round_consts_256[64] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
};
alignas(64) static const uint64_t round_consts_512[80] = {
0x428a2f98d728ae22l, 0x7137449123ef65cdl, 0xb5c0fbcfec4d3b2fl,
0xe9b5dba58189dbbcl, 0x3956c25bf348b538l, 0x59f111f1b605d019l,
0x923f82a4af194f9bl, 0xab1c5ed5da6d8118l, 0xd807aa98a3030242l,
0x12835b0145706fbel, 0x243185be4ee4b28cl, 0x550c7dc3d5ffb4e2l,
0x72be5d74f27b896fl, 0x80deb1fe3b1696b1l, 0x9bdc06a725c71235l,
0xc19bf174cf692694l, 0xe49b69c19ef14ad2l, 0xefbe4786384f25e3l,
0x0fc19dc68b8cd5b5l, 0x240ca1cc77ac9c65l, 0x2de92c6f592b0275l,
0x4a7484aa6ea6e483l, 0x5cb0a9dcbd41fbd4l, 0x76f988da831153b5l,
0x983e5152ee66dfabl, 0xa831c66d2db43210l, 0xb00327c898fb213fl,
0xbf597fc7beef0ee4l, 0xc6e00bf33da88fc2l, 0xd5a79147930aa725l,
0x06ca6351e003826fl, 0x142929670a0e6e70l, 0x27b70a8546d22ffcl,
0x2e1b21385c26c926l, 0x4d2c6dfc5ac42aedl, 0x53380d139d95b3dfl,
0x650a73548baf63del, 0x766a0abb3c77b2a8l, 0x81c2c92e47edaee6l,
0x92722c851482353bl, 0xa2bfe8a14cf10364l, 0xa81a664bbc423001l,
0xc24b8b70d0f89791l, 0xc76c51a30654be30l, 0xd192e819d6ef5218l,
0xd69906245565a910l, 0xf40e35855771202al, 0x106aa07032bbd1b8l,
0x19a4c116b8d2d0c8l, 0x1e376c085141ab53l, 0x2748774cdf8eeb99l,
0x34b0bcb5e19b48a8l, 0x391c0cb3c5c95a63l, 0x4ed8aa4ae3418acbl,
0x5b9cca4f7763e373l, 0x682e6ff3d6b2b8a3l, 0x748f82ee5defb2fcl,
0x78a5636f43172f60l, 0x84c87814a1f0ab72l, 0x8cc702081a6439ecl,
0x90befffa23631e28l, 0xa4506cebde82bde9l, 0xbef9a3f7b2c67915l,
0xc67178f2e372532bl, 0xca273eceea26619cl, 0xd186b8c721c0c207l,
0xeada7dd6cde0eb1el, 0xf57d4f7fee6ed178l, 0x06f067aa72176fbal,
0x0a637dc5a2c898a6l, 0x113f9804bef90dael, 0x1b710b35131c471bl,
0x28db77f523047d84l, 0x32caab7b40c72493l, 0x3c9ebe0a15c9bebcl,
0x431d67c49c100d4cl, 0x4cc5d4becb3e42b6l, 0x597f299cfc657e2al,
0x5fcb6fab3ad6faecl, 0x6c44198c4a475817l
};
const int const_add = vset_sew == Assembler::e32 ? 16 : 32;
__ align(CodeEntryAlignment);
StubCodeMark mark(_cgen, "StubRoutines", stub_name(vset_sew, multi_block));
address start = __ pc();
Register buf = c_rarg0;
Register state = c_rarg1;
Register ofs = c_rarg2;
Register limit = c_rarg3;
Register consts = t2; // caller saved
Register state_c = x28; // caller saved
VectorRegister vindex = v2;
VectorRegister vW0 = v4;
VectorRegister vW1 = v6;
VectorRegister vW2 = v8;
VectorRegister vW3 = v10;
VectorRegister vState0 = v12;
VectorRegister vState1 = v14;
VectorRegister vHash0 = v16;
VectorRegister vHash1 = v18;
VectorRegister vTmp0 = v20;
VectorRegister vTmp1 = v22;
Label multi_block_loop;
__ enter();
address constant_table = vset_sew == Assembler::e32 ? (address)round_consts_256 : (address)round_consts_512;
la(consts, ExternalAddress(constant_table));
// Register use in this function:
//
// VECTORS
// vW0 - vW3 (512/1024-bits / 4*128/256 bits / 4*4*32/65 bits), hold the message
// schedule words (Wt). They start with the message block
// content (W0 to W15), then further words in the message
// schedule generated via vsha2ms from previous Wt.
// Initially:
// vW0 = W[ 3:0] = { W3, W2, W1, W0}
// vW1 = W[ 7:4] = { W7, W6, W5, W4}
// vW2 = W[ 11:8] = {W11, W10, W9, W8}
// vW3 = W[15:12] = {W15, W14, W13, W12}
//
// vState0 - vState1 hold the working state variables (a, b, ..., h)
// vState0 = {f[t],e[t],b[t],a[t]}
// vState1 = {h[t],g[t],d[t],c[t]}
// Initially:
// vState0 = {H5i-1, H4i-1, H1i-1 , H0i-1}
// vState1 = {H7i-i, H6i-1, H3i-1 , H2i-1}
//
// v0 = masks for vrgather/vmerge. Single value during the 16 rounds.
//
// vTmp0 = temporary, Wt+Kt
// vTmp1 = temporary, Kt
//
// vHash0/vHash1 = hold the initial values of the hash, byte-swapped.
//
// During most of the function the vector state is configured so that each
// vector is interpreted as containing four 32/64 bits (e32/e64) elements (128/256 bits).
// vsha2ch/vsha2cl uses EGW of 4*SEW.
// SHA256 SEW = e32, EGW = 128-bits
// SHA512 SEW = e64, EGW = 256-bits
//
// VLEN is required to be at least 128.
// For the case of VLEN=128 and SHA512 we need LMUL=2 to work with 4*e64 (EGW = 256)
//
// m1: LMUL=1/2
// ta: tail agnostic (don't care about those lanes)
// ma: mask agnostic (don't care about those lanes)
// x0 is not written, we known the number of vector elements.
if (vset_sew == Assembler::e64 && MaxVectorSize == 16) { // SHA512 and VLEN = 128
__ vsetivli(x0, 4, vset_sew, Assembler::m2, Assembler::ma, Assembler::ta);
} else {
__ vsetivli(x0, 4, vset_sew, Assembler::m1, Assembler::ma, Assembler::ta);
}
int64_t indexes = vset_sew == Assembler::e32 ? 0x00041014ul : 0x00082028ul;
__ li(t0, indexes);
__ vmv_v_x(vindex, t0);
// Step-over a,b, so we are pointing to c.
// const_add is equal to 4x state variable, div by 2 is thus 2, a,b
__ addi(state_c, state, const_add/2);
// Use index-load to get {f,e,b,a},{h,g,d,c}
__ vluxei8_v(vState0, state, vindex);
__ vluxei8_v(vState1, state_c, vindex);
__ bind(multi_block_loop);
// Capture the initial H values in vHash0 and vHash1 to allow for computing
// the resulting H', since H' = H+{a',b',c',...,h'}.
__ vmv_v_v(vHash0, vState0);
__ vmv_v_v(vHash1, vState1);
// Load the 512/1024-bits of the message block in vW0-vW3 and perform
// an endian swap on each 4/8 bytes element.
//
// If Zvkb is not implemented one can use vrgather
// with an index sequence to byte-swap.
// sequence = [3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12]
// <https://oeis.org/A004444> gives us "N ^ 3" as a nice formula to generate
// this sequence. 'vid' gives us the N.
__ vleXX_v(vset_sew, vW0, buf);
__ vrev8_v(vW0, vW0);
__ addi(buf, buf, const_add);
__ vleXX_v(vset_sew, vW1, buf);
__ vrev8_v(vW1, vW1);
__ addi(buf, buf, const_add);
__ vleXX_v(vset_sew, vW2, buf);
__ vrev8_v(vW2, vW2);
__ addi(buf, buf, const_add);
__ vleXX_v(vset_sew, vW3, buf);
__ vrev8_v(vW3, vW3);
__ addi(buf, buf, const_add);
// Set v0 up for the vmerge that replaces the first word (idx==0)
__ vid_v(v0);
__ vmseq_vi(v0, v0, 0x0); // v0.mask[i] = (i == 0 ? 1 : 0)
VectorRegister rotation_regs[] = {vW0, vW1, vW2, vW3};
int rot_pos = 0;
// Quad-round #0 (+0, vW0->vW1->vW2->vW3) ... #11 (+3, vW3->vW0->vW1->vW2)
const int qr_end = vset_sew == Assembler::e32 ? 12 : 16;
for (int i = 0; i < qr_end; i++) {
sha2_quad_round(vset_sew,
rotation_regs[(rot_pos + 0) & 0x3],
rotation_regs[(rot_pos + 1) & 0x3],
rotation_regs[(rot_pos + 2) & 0x3],
rotation_regs[(rot_pos + 3) & 0x3],
consts,
vTmp1, vTmp0, vState0, vState1);
++rot_pos;
}
// Quad-round #12 (+0, vW0->vW1->vW2->vW3) ... #15 (+3, vW3->vW0->vW1->vW2)
// Note that we stop generating new message schedule words (Wt, vW0-13)
// as we already generated all the words we end up consuming (i.e., W[63:60]).
const int qr_c_end = qr_end + 4;
for (int i = qr_end; i < qr_c_end; i++) {
sha2_quad_round(vset_sew,
rotation_regs[(rot_pos + 0) & 0x3],
rotation_regs[(rot_pos + 1) & 0x3],
rotation_regs[(rot_pos + 2) & 0x3],
rotation_regs[(rot_pos + 3) & 0x3],
consts,
vTmp1, vTmp0, vState0, vState1, false, i < (qr_c_end-1));
++rot_pos;
}
//--------------------------------------------------------------------------------
// Compute the updated hash value H'
// H' = H + {h',g',...,b',a'}
// = {h,g,...,b,a} + {h',g',...,b',a'}
// = {h+h',g+g',...,b+b',a+a'}
// H' = H+{a',b',c',...,h'}
__ vadd_vv(vState0, vHash0, vState0);
__ vadd_vv(vState1, vHash1, vState1);
if (multi_block) {
int total_adds = vset_sew == Assembler::e32 ? 240 : 608;
__ addi(consts, consts, -total_adds);
__ add(ofs, ofs, vset_sew == Assembler::e32 ? 64 : 128);
__ ble(ofs, limit, multi_block_loop);
__ mv(c_rarg0, ofs); // return ofs
}
// Store H[0..8] = {a,b,c,d,e,f,g,h} from
// vState0 = {f,e,b,a}
// vState1 = {h,g,d,c}
__ vsuxei8_v(vState0, state, vindex);
__ vsuxei8_v(vState1, state_c, vindex);
__ leave();
__ ret();
return start;
}
};
#undef __
#define __ masm->
// Continuation point for throwing of implicit exceptions that are
// not handled in the current activation. Fabricates an exception
// oop and initiates normal exception dispatching in this
@@ -4155,14 +4541,18 @@ class StubGenerator: public StubCodeGenerator {
// to minimize the number of memory operations:
// read the 4 state 4-byte values in pairs, with a single ld,
// and split them into 2 registers
__ mv(t0, mask32);
// and split them into 2 registers.
//
// And, as the core algorithm of md5 works on 32-bits words, so
// in the following code, it does not care about the content of
// higher 32-bits in state[x]. Based on this observation,
// we can apply further optimization, which is to just ignore the
// higher 32-bits in state0/state2, rather than set the higher
// 32-bits of state0/state2 to zero explicitly with extra instructions.
__ ld(state0, Address(state));
__ srli(state1, state0, 32);
__ andr(state0, state0, t0);
__ ld(state2, Address(state, 8));
__ srli(state3, state2, 32);
__ andr(state2, state2, t0);
Label md5_loop;
__ BIND(md5_loop);
@@ -4858,6 +5248,18 @@ static const int64_t right_3_bits = right_n_bits(3);
}
#endif // COMPILER2
if (UseSHA256Intrinsics) {
Sha2Generator sha2(_masm, this);
StubRoutines::_sha256_implCompress = sha2.generate_sha256_implCompress(false);
StubRoutines::_sha256_implCompressMB = sha2.generate_sha256_implCompress(true);
}
if (UseSHA512Intrinsics) {
Sha2Generator sha2(_masm, this);
StubRoutines::_sha512_implCompress = sha2.generate_sha512_implCompress(false);
StubRoutines::_sha512_implCompressMB = sha2.generate_sha512_implCompress(true);
}
generate_compare_long_strings();
generate_string_indexof_stubs();

View File

@@ -81,6 +81,9 @@ void VM_Version::initialize() {
if (FLAG_IS_DEFAULT(UseZbs)) {
FLAG_SET_DEFAULT(UseZbs, true);
}
if (FLAG_IS_DEFAULT(UseZfh)) {
FLAG_SET_DEFAULT(UseZfh, true);
}
if (FLAG_IS_DEFAULT(UseZic64b)) {
FLAG_SET_DEFAULT(UseZic64b, true);
}
@@ -146,26 +149,11 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
}
if (UseSHA) {
warning("SHA instructions are not available on this CPU");
FLAG_SET_DEFAULT(UseSHA, false);
}
if (UseSHA1Intrinsics) {
warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
}
if (UseSHA256Intrinsics) {
warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU.");
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
}
if (UseSHA512Intrinsics) {
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
}
if (UseSHA3Intrinsics) {
warning("Intrinsics for SHA3-224, SHA3-256, SHA3-384 and SHA3-512 crypto hash functions not available on this CPU.");
FLAG_SET_DEFAULT(UseSHA3Intrinsics, false);
@@ -272,6 +260,10 @@ void VM_Version::initialize() {
// NOTE: Make sure codes dependent on UseRVV are put after c2_initialize(),
// as there are extra checks inside it which could disable UseRVV
// in some situations.
if (UseZvkn && !UseRVV) {
FLAG_SET_DEFAULT(UseZvkn, false);
warning("Cannot enable Zvkn on cpu without RVV support.");
}
if (UseRVV) {
if (FLAG_IS_DEFAULT(UseChaCha20Intrinsics)) {
@@ -283,6 +275,31 @@ void VM_Version::initialize() {
}
FLAG_SET_DEFAULT(UseChaCha20Intrinsics, false);
}
if (!UseZvkn && UseSHA) {
warning("SHA instructions are not available on this CPU");
FLAG_SET_DEFAULT(UseSHA, false);
} else if (UseZvkn && FLAG_IS_DEFAULT(UseSHA)) {
FLAG_SET_DEFAULT(UseSHA, true);
}
if (!UseSHA) {
if (UseSHA256Intrinsics) {
warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU, UseZvkn needed.");
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
}
if (UseSHA512Intrinsics) {
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU, UseZvkn needed.");
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
}
} else {
if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
}
if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
}
}
}
#ifdef COMPILER2

View File

@@ -105,11 +105,16 @@ class VM_Version : public Abstract_VM_Version {
// Zbc Carry-less multiplication
// Zbs Single-bit instructions
//
// Zfh Half-Precision Floating-Point instructions
//
// Zicsr Control and Status Register (CSR) Instructions
// Zifencei Instruction-Fetch Fence
// Zic64b Cache blocks must be 64 bytes in size, naturally aligned in the address space.
// Zihintpause Pause instruction HINT
//
// Zc Code Size Reduction - Additional compressed instructions.
// Zcb Simple code-size saving instructions
//
// Other features and settings
// mvendorid Manufactory JEDEC id encoded, ISA vol 2 3.1.2..
// marchid Id for microarch. Mvendorid plus marchid uniquely identify the microarch.
@@ -117,6 +122,8 @@ class VM_Version : public Abstract_VM_Version {
// unaligned_access Unaligned memory accesses (unknown, unspported, emulated, slow, firmware, fast)
// satp mode SATP bits (number of virtual addr bits) mbare, sv39, sv48, sv57, sv64
public:
#define RV_NO_FLAG_BIT (BitsPerWord+1) // nth_bit will return 0 on values larger than BitsPerWord
// declaration name , extension name, bit pos ,in str, mapped flag)
@@ -137,11 +144,14 @@ class VM_Version : public Abstract_VM_Version {
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_Zcb , "Zcb" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \
decl(ext_Zfh , "Zfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfh)) \
decl(ext_Zicsr , "Zicsr" , 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(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) \
@@ -208,6 +218,9 @@ class VM_Version : public Abstract_VM_Version {
constexpr static bool supports_stack_watermark_barrier() { return true; }
static bool supports_on_spin_wait() { return UseZihintpause; }
// RISCV64 supports fast class initialization checks
static bool supports_fast_class_init_checks() { return true; }
};
#endif // CPU_RISCV_VM_VERSION_RISCV_HPP

View File

@@ -95,9 +95,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -465,7 +465,6 @@
// Initialize frame members (_pc and _sp must be given)
inline void setup();
const ImmutableOopMap* get_oop_map() const;
// Constructors

View File

@@ -292,20 +292,6 @@ inline intptr_t* frame::real_fp() const {
return fp();
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
inline int frame::compiled_frame_stack_argsize() const {
Unimplemented();
return 0;

View File

@@ -48,6 +48,9 @@ const bool CCallingConventionRequiresIntsAsLongs = true;
// The expected size in bytes of a cache line, used to pad data structures.
#define DEFAULT_CACHE_LINE_SIZE 256
// The default padding size for data structures to avoid false sharing.
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
#define SUPPORT_RESERVED_STACK_AREA
#endif // CPU_S390_GLOBALDEFINITIONS_S390_HPP

View File

@@ -657,8 +657,8 @@ class NativeGeneralJump: public NativeInstruction {
class NativePostCallNop: public NativeInstruction {
public:
bool check() const { Unimplemented(); return false; }
int displacement() const { return 0; }
void patch(jint diff) { Unimplemented(); }
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const { return false; }
bool patch(int32_t oopmap_slot, int32_t cb_offset) { Unimplemented(); return false; }
void make_deopt() { Unimplemented(); }
};

View File

@@ -755,7 +755,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
ShouldNotReachHere();
}
}
return align_up(stk, 2);
return stk;
}
int SharedRuntime::c_calling_convention(const BasicType *sig_bt,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -2868,7 +2868,7 @@ void TemplateTable::jvmti_post_field_mod(Register cache,
__ z_lgr(fieldEntry, cache);
if (is_static) {
// Life is simple. NULL the object pointer.
// Life is simple. Null the object pointer.
__ clear_reg(obj, true, false); // Don't set CC.
} else {
// Life is harder. The stack holds the value on top, followed by

View File

@@ -410,7 +410,7 @@ class VM_Version: public Abstract_VM_Version {
// Override Abstract_VM_Version implementation
static void print_platform_virtualization_info(outputStream*);
// s390 supports fast class initialization checks for static methods.
// s390 supports fast class initialization checks
static bool supports_fast_class_init_checks() { return true; }
// CPU feature query functions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -889,8 +889,8 @@ address Assembler::locate_operand(address inst, WhichOperand which) {
assert(which == imm_operand || which == disp32_operand,
"which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip));
#else
assert((which == call32_operand || which == imm_operand) && is_64bit ||
which == narrow_oop_operand && !is_64bit,
assert(((which == call32_operand || which == imm_operand) && is_64bit) ||
(which == narrow_oop_operand && !is_64bit),
"which %d is_64_bit %d ip " INTPTR_FORMAT, which, is_64bit, p2i(ip));
#endif // _LP64
return ip;
@@ -2846,6 +2846,13 @@ void Assembler::kxorbl(KRegister dst, KRegister src1, KRegister src2) {
emit_int16(0x47, (0xC0 | encode));
}
void Assembler::kxnorwl(KRegister dst, KRegister src1, KRegister src2) {
assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(AVX_256bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = vex_prefix_and_encode(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
emit_int16(0x46, (0xC0 | encode));
}
void Assembler::kxorwl(KRegister dst, KRegister src1, KRegister src2) {
assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(AVX_256bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
@@ -7228,7 +7235,7 @@ void Assembler::vxorps(XMMRegister dst, XMMRegister nds, Address src, int vector
// Integer vector arithmetic
void Assembler::vphaddw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
assert(VM_Version::supports_avx() && (vector_len == 0) ||
assert((VM_Version::supports_avx() && (vector_len == 0)) ||
VM_Version::supports_avx2(), "256 bit integer vectors requires AVX2");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
@@ -7236,7 +7243,7 @@ void Assembler::vphaddw(XMMRegister dst, XMMRegister nds, XMMRegister src, int v
}
void Assembler::vphaddd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
assert(VM_Version::supports_avx() && (vector_len == 0) ||
assert((VM_Version::supports_avx() && (vector_len == 0)) ||
VM_Version::supports_avx2(), "256 bit integer vectors requires AVX2");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
@@ -10771,7 +10778,7 @@ void Assembler::vpgatherdd(XMMRegister dst, Address src, XMMRegister mask, int v
assert(src.isxmmindex(),"expected to be xmm index");
assert(dst != src.xmmindex(), "instruction will #UD if dst and index are the same");
InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
vex_prefix(src, mask->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0x90);
emit_operand(dst, src, 0);
@@ -10784,7 +10791,7 @@ void Assembler::vpgatherdq(XMMRegister dst, Address src, XMMRegister mask, int v
assert(src.isxmmindex(),"expected to be xmm index");
assert(dst != src.xmmindex(), "instruction will #UD if dst and index are the same");
InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
vex_prefix(src, mask->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0x90);
emit_operand(dst, src, 0);
@@ -10797,7 +10804,7 @@ void Assembler::vgatherdpd(XMMRegister dst, Address src, XMMRegister mask, int v
assert(src.isxmmindex(),"expected to be xmm index");
assert(dst != src.xmmindex(), "instruction will #UD if dst and index are the same");
InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
vex_prefix(src, mask->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0x92);
emit_operand(dst, src, 0);
@@ -10810,7 +10817,7 @@ void Assembler::vgatherdps(XMMRegister dst, Address src, XMMRegister mask, int v
assert(src.isxmmindex(),"expected to be xmm index");
assert(dst != src.xmmindex(), "instruction will #UD if dst and index are the same");
InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ true);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
vex_prefix(src, mask->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8((unsigned char)0x92);
emit_operand(dst, src, 0);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -816,8 +816,8 @@ private:
void check_relocation(RelocationHolder const& rspec, int format);
#endif
void emit_data(jint data, relocInfo::relocType rtype, int format);
void emit_data(jint data, RelocationHolder const& rspec, int format);
void emit_data(jint data, relocInfo::relocType rtype, int format = 0);
void emit_data(jint data, RelocationHolder const& rspec, int format = 0);
void emit_data64(jlong data, relocInfo::relocType rtype, int format = 0);
void emit_data64(jlong data, RelocationHolder const& rspec, int format = 0);
@@ -1524,6 +1524,8 @@ private:
void kordl(KRegister dst, KRegister src1, KRegister src2);
void korql(KRegister dst, KRegister src1, KRegister src2);
void kxnorwl(KRegister dst, KRegister src1, KRegister src2);
void kxorbl(KRegister dst, KRegister src1, KRegister src2);
void kxorwl(KRegister dst, KRegister src1, KRegister src2);
void kxordl(KRegister dst, KRegister src1, KRegister src2);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1089,7 +1089,8 @@ void C2_MacroAssembler::vminmax_fp(int opcode, BasicType elem_bt,
assert(opcode == Op_MinV || opcode == Op_MinReductionV ||
opcode == Op_MaxV || opcode == Op_MaxReductionV, "sanity");
assert(elem_bt == T_FLOAT || elem_bt == T_DOUBLE, "sanity");
assert_different_registers(a, b, tmp, atmp, btmp);
assert_different_registers(a, tmp, atmp, btmp);
assert_different_registers(b, tmp, atmp, btmp);
bool is_min = (opcode == Op_MinV || opcode == Op_MinReductionV);
bool is_double_word = is_double_word_type(elem_bt);
@@ -1176,7 +1177,8 @@ void C2_MacroAssembler::evminmax_fp(int opcode, BasicType elem_bt,
assert(opcode == Op_MinV || opcode == Op_MinReductionV ||
opcode == Op_MaxV || opcode == Op_MaxReductionV, "sanity");
assert(elem_bt == T_FLOAT || elem_bt == T_DOUBLE, "sanity");
assert_different_registers(dst, a, b, atmp, btmp);
assert_different_registers(dst, a, atmp, btmp);
assert_different_registers(dst, b, atmp, btmp);
bool is_min = (opcode == Op_MinV || opcode == Op_MinReductionV);
bool is_double_word = is_double_word_type(elem_bt);
@@ -5223,8 +5225,8 @@ void C2_MacroAssembler::vector_mask_operation(int opc, Register dst, KRegister m
void C2_MacroAssembler::vector_mask_operation(int opc, Register dst, XMMRegister mask, XMMRegister xtmp,
Register tmp, int masklen, BasicType bt, int vec_enc) {
assert(vec_enc == AVX_128bit && VM_Version::supports_avx() ||
vec_enc == AVX_256bit && (VM_Version::supports_avx2() || type2aelembytes(bt) >= 4), "");
assert((vec_enc == AVX_128bit && VM_Version::supports_avx()) ||
(vec_enc == AVX_256bit && (VM_Version::supports_avx2() || type2aelembytes(bt) >= 4)), "");
assert(VM_Version::supports_popcnt(), "");
bool need_clip = false;
@@ -5280,6 +5282,42 @@ void C2_MacroAssembler::vector_mask_compress(KRegister dst, KRegister src, Regis
kmov(dst, rtmp2);
}
#ifdef _LP64
void C2_MacroAssembler::vector_compress_expand_avx2(int opcode, XMMRegister dst, XMMRegister src,
XMMRegister mask, Register rtmp, Register rscratch,
XMMRegister permv, XMMRegister xtmp, BasicType bt,
int vec_enc) {
assert(type2aelembytes(bt) >= 4, "");
assert(opcode == Op_CompressV || opcode == Op_ExpandV, "");
address compress_perm_table = nullptr;
address expand_perm_table = nullptr;
if (type2aelembytes(bt) == 8) {
compress_perm_table = StubRoutines::x86::compress_perm_table64();
expand_perm_table = StubRoutines::x86::expand_perm_table64();
vmovmskpd(rtmp, mask, vec_enc);
} else {
compress_perm_table = StubRoutines::x86::compress_perm_table32();
expand_perm_table = StubRoutines::x86::expand_perm_table32();
vmovmskps(rtmp, mask, vec_enc);
}
shlq(rtmp, 5); // for 32 byte permute row.
if (opcode == Op_CompressV) {
lea(rscratch, ExternalAddress(compress_perm_table));
} else {
lea(rscratch, ExternalAddress(expand_perm_table));
}
addptr(rtmp, rscratch);
vmovdqu(permv, Address(rtmp));
vpermps(dst, permv, src, Assembler::AVX_256bit);
vpxor(xtmp, xtmp, xtmp, vec_enc);
// Blend the result with zero vector using permute mask, each column entry
// in a permute table row contains either a valid permute index or a -1 (default)
// value, this can potentially be used as a blending mask after
// compressing/expanding the source vector lanes.
vblendvps(dst, dst, xtmp, permv, vec_enc, false, permv);
}
#endif
void C2_MacroAssembler::vector_compress_expand(int opcode, XMMRegister dst, XMMRegister src, KRegister mask,
bool merge, BasicType bt, int vec_enc) {
if (opcode == Op_CompressV) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -390,6 +390,10 @@ public:
void vector_round_float_avx(XMMRegister dst, XMMRegister src, AddressLiteral float_sign_flip, AddressLiteral new_mxcsr, int vec_enc,
Register tmp, XMMRegister xtmp1, XMMRegister xtmp2, XMMRegister xtmp3, XMMRegister xtmp4);
void vector_compress_expand_avx2(int opcode, XMMRegister dst, XMMRegister src, XMMRegister mask,
Register rtmp, Register rscratch, XMMRegister permv, XMMRegister xtmp,
BasicType bt, int vec_enc);
#endif // _LP64
void udivI(Register rax, Register divisor, Register rdx);

View File

@@ -28,6 +28,7 @@
#include "code/compiledIC.hpp"
#include "code/icBuffer.hpp"
#include "code/nmethod.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
@@ -84,9 +85,9 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
address stub = find_stub();
guarantee(stub != nullptr, "stub not found");
if (TraceICs) {
{
ResourceMark rm;
tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
log_trace(inlinecache)("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
p2i(instruction_address()),
callee->name_and_sig_as_C_string());
}

View File

@@ -149,8 +149,6 @@
static void verify_deopt_original_pc(CompiledMethod* nm, intptr_t* unextended_sp);
#endif
const ImmutableOopMap* get_oop_map() const;
public:
// Constructors

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -181,7 +181,7 @@ inline bool frame::equal(frame other) const {
&& unextended_sp() == other.unextended_sp()
&& fp() == other.fp()
&& pc() == other.pc();
assert(!ret || ret && cb() == other.cb() && _deopt_state == other._deopt_state, "inconsistent construction");
assert(!ret || (ret && cb() == other.cb() && _deopt_state == other._deopt_state), "inconsistent construction");
return ret;
}
@@ -343,20 +343,6 @@ inline int frame::sender_sp_ret_address_offset() {
return frame::sender_sp_offset - frame::return_addr_offset;
}
inline const ImmutableOopMap* frame::get_oop_map() const {
if (_cb == nullptr) return nullptr;
if (_cb->oop_maps() != nullptr) {
NativePostCallNop* nop = nativePostCallNop_at(_pc);
if (nop != nullptr && nop->displacement() != 0) {
int slot = ((nop->displacement() >> 24) & 0xff);
return _cb->oop_map_for_slot(slot, _pc);
}
const ImmutableOopMap* oop_map = OopMapSet::find_map(this);
return oop_map;
}
return nullptr;
}
//------------------------------------------------------------------------------
// frame::sender

View File

@@ -38,29 +38,18 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#define CPU_MULTI_COPY_ATOMIC
// The expected size in bytes of a cache line, used to pad data structures.
#if COMPILER1_AND_COMPILER2
#ifdef _LP64
// tiered, 64-bit, large machine
#define DEFAULT_CACHE_LINE_SIZE 128
#define OM_CACHE_LINE_SIZE 64
#else
// tiered, 32-bit, medium machine
#define DEFAULT_CACHE_LINE_SIZE 64
#endif
#elif defined(COMPILER1)
// pure C1, 32-bit, small machine
// i486 was the last Intel chip with 16-byte cache line size
#define DEFAULT_CACHE_LINE_SIZE 32
#elif defined(COMPILER2)
#ifdef _LP64
// pure C2, 64-bit, large machine
#define DEFAULT_CACHE_LINE_SIZE 128
#define OM_CACHE_LINE_SIZE 64
#else
// pure C2, 32-bit, medium machine
#define DEFAULT_CACHE_LINE_SIZE 64
#endif
// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 64
// The default padding size for data structures to avoid false sharing.
#ifdef _LP64
// The common wisdom is that adjacent cache line prefetchers on some hardware
// may pull two cache lines on access, so we have to pessimistically assume twice
// the cache line size for padding. TODO: Check if this is still true for modern
// hardware. If not, DEFAULT_CACHE_LINE_SIZE might as well suffice.
#define DEFAULT_PADDING_SIZE (DEFAULT_CACHE_LINE_SIZE*2)
#else
#define DEFAULT_PADDING_SIZE DEFAULT_CACHE_LINE_SIZE
#endif
#if defined(COMPILER2)

View File

@@ -1871,92 +1871,6 @@ void MacroAssembler::cmpoop(Register src1, jobject src2, Register rscratch) {
}
#endif
void MacroAssembler::cvtss2sd(XMMRegister dst, XMMRegister src) {
if ((UseAVX > 0) && (dst != src)) {
xorpd(dst, dst);
}
Assembler::cvtss2sd(dst, src);
}
void MacroAssembler::cvtss2sd(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorpd(dst, dst);
}
Assembler::cvtss2sd(dst, src);
}
void MacroAssembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
if ((UseAVX > 0) && (dst != src)) {
xorps(dst, dst);
}
Assembler::cvtsd2ss(dst, src);
}
void MacroAssembler::cvtsd2ss(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorps(dst, dst);
}
Assembler::cvtsd2ss(dst, src);
}
void MacroAssembler::cvtsi2sdl(XMMRegister dst, Register src) {
if (UseAVX > 0) {
xorpd(dst, dst);
}
Assembler::cvtsi2sdl(dst, src);
}
void MacroAssembler::cvtsi2sdl(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorpd(dst, dst);
}
Assembler::cvtsi2sdl(dst, src);
}
void MacroAssembler::cvtsi2ssl(XMMRegister dst, Register src) {
if (UseAVX > 0) {
xorps(dst, dst);
}
Assembler::cvtsi2ssl(dst, src);
}
void MacroAssembler::cvtsi2ssl(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorps(dst, dst);
}
Assembler::cvtsi2ssl(dst, src);
}
#ifdef _LP64
void MacroAssembler::cvtsi2sdq(XMMRegister dst, Register src) {
if (UseAVX > 0) {
xorpd(dst, dst);
}
Assembler::cvtsi2sdq(dst, src);
}
void MacroAssembler::cvtsi2sdq(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorpd(dst, dst);
}
Assembler::cvtsi2sdq(dst, src);
}
void MacroAssembler::cvtsi2ssq(XMMRegister dst, Register src) {
if (UseAVX > 0) {
xorps(dst, dst);
}
Assembler::cvtsi2ssq(dst, src);
}
void MacroAssembler::cvtsi2ssq(XMMRegister dst, Address src) {
if (UseAVX > 0) {
xorps(dst, dst);
}
Assembler::cvtsi2ssq(dst, src);
}
#endif // _LP64
void MacroAssembler::locked_cmpxchgptr(Register reg, AddressLiteral adr, Register rscratch) {
assert(rscratch != noreg || always_reachable(adr), "missing");

View File

@@ -111,8 +111,8 @@ class MacroAssembler: public Assembler {
op == 0xE9 /* jmp */ ||
op == 0xEB /* short jmp */ ||
(op & 0xF0) == 0x70 /* short jcc */ ||
op == 0x0F && (branch[1] & 0xF0) == 0x80 /* jcc */ ||
op == 0xC7 && branch[1] == 0xF8 /* xbegin */,
(op == 0x0F && (branch[1] & 0xF0) == 0x80) /* jcc */ ||
(op == 0xC7 && branch[1] == 0xF8) /* xbegin */,
"Invalid opcode at patch point");
if (op == 0xEB || (op & 0xF0) == 0x70) {
@@ -800,23 +800,6 @@ public:
void cmpxchgptr(Register reg, Address adr);
// cvt instructions
void cvtss2sd(XMMRegister dst, XMMRegister src);
void cvtss2sd(XMMRegister dst, Address src);
void cvtsd2ss(XMMRegister dst, XMMRegister src);
void cvtsd2ss(XMMRegister dst, Address src);
void cvtsi2sdl(XMMRegister dst, Register src);
void cvtsi2sdl(XMMRegister dst, Address src);
void cvtsi2ssl(XMMRegister dst, Register src);
void cvtsi2ssl(XMMRegister dst, Address src);
#ifdef _LP64
void cvtsi2sdq(XMMRegister dst, Register src);
void cvtsi2sdq(XMMRegister dst, Address src);
void cvtsi2ssq(XMMRegister dst, Register src);
void cvtsi2ssq(XMMRegister dst, Address src);
#endif
void locked_cmpxchgptr(Register reg, AddressLiteral adr, Register rscratch = noreg);
void imulptr(Register dst, Register src) { LP64_ONLY(imulq(dst, src)) NOT_LP64(imull(dst, src)); }

View File

@@ -684,10 +684,15 @@ void NativePostCallNop::make_deopt() {
ICache::invalidate_range(instr_addr, instruction_size);
}
void NativePostCallNop::patch(jint diff) {
assert(diff != 0, "must be");
bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) {
if (((oopmap_slot & 0xff) != oopmap_slot) || ((cb_offset & 0xffffff) != cb_offset)) {
return false; // cannot encode
}
int32_t data = (oopmap_slot << 24) | cb_offset;
assert(data != 0, "must be");
int32_t *code_pos = (int32_t *) addr_at(displacement_offset);
*((int32_t *)(code_pos)) = (int32_t) diff;
*((int32_t *)(code_pos)) = (int32_t) data;
return true; // successfully encoded
}
void NativeDeoptInstruction::verify() {

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