File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,30 @@ public static final long getTearDownFailureNanos() {
346346 public static final HostedOptionKey <Integer > MaxNodesInTrivialLeafMethod = new HostedOptionKey <>(40 );
347347
348348 @ Option (help = "Saves stack base pointer on the stack on method entry." )//
349- public static final HostedOptionKey <Boolean > PreserveFramePointer = new HostedOptionKey <>(false );
349+ public static final HostedOptionKey <Boolean > PreserveFramePointer = new HostedOptionKey <Boolean >(false ) {
350+ @ Override
351+ public Boolean getValueOrDefault (UnmodifiableEconomicMap <OptionKey <?>, Object > values ) {
352+ if (SubstrateUtil .getArchitectureName ().equals ("aarch64" ) && (OS .WINDOWS .isCurrent () || OS .DARWIN .isCurrent ())) {
353+ /*
354+ * While running on AArch64 Windows or Darwin, PreserveFramePointer must be set. For
355+ * more information, see:
356+ *
357+ * @formatter:off
358+ * https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
359+ * https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions
360+ * @formatter:on
361+ */
362+ return true ;
363+ }
364+ return super .getValueOrDefault (values );
365+ }
366+
367+ @ Override
368+ public Boolean getValue (OptionValues values ) {
369+ assert checkDescriptorExists ();
370+ return getValueOrDefault (values .getMap ());
371+ }
372+ };
350373
351374 @ Option (help = "Use callee saved registers to reduce spilling for low-frequency calls to stubs (if callee saved registers are supported by the architecture)" )//
352375 public static final HostedOptionKey <Boolean > UseCalleeSavedRegisters = new HostedOptionKey <>(true );
You can’t perform that action at this time.
0 commit comments