Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<!-- Determine if we support running the .NET SDK on the target platform -->
<_SdkToolsSupportedOS Condition="'$(TargetsMobile)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">true</_SdkToolsSupportedOS>
<_SdkToolsSupportedArch Condition="'$(TargetArchitecture)' != 'armel' and '$(TargetsWasm)' != 'true'">true</_SdkToolsSupportedArch>
<_SdkToolsSupportedArch Condition="'$(TargetsWasm)' != 'true'">true</_SdkToolsSupportedArch>
<SdkToolsSupported Condition="'$(_SdkToolsSupportedOS)' == 'true' and '$(_SdkToolsSupportedArch)' == 'true'">true</SdkToolsSupported>

<_UseNativeAotForComponentsCrossOS Condition="'$(CrossBuild)' == 'true' and '$(_hostArchitecture)' == '$(_targetArchitecture)' and '$(_hostOS)' != 'windows'">true</_UseNativeAotForComponentsCrossOS>
Expand Down Expand Up @@ -105,7 +105,7 @@

<PropertyGroup>
<DefaultCoreClrSubsets>clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(TargetRid)' == 'linux-armel'">clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(TargetRid)' == 'linux-armel'">clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<DefaultCoreClrSubsets Condition="'$(TargetRid)' == 'linux-armel'">clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>

Unnecessary - same as the default on previous line

<DefaultCoreClrSubsets Condition="'$(TargetsAndroid)' == 'true'">clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(TargetsAppleMobile)' == 'true'">clr.native+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(TargetsBrowser)' == 'true'">provision.emsdk+clr.native+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.crossarchtools+libs.native+host.native</DefaultCoreClrSubsets>
Expand Down Expand Up @@ -372,7 +372,7 @@
<_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')">true</_BuildAnyCrossArch>
<_BuildCrossComponents Condition="$(_subset.Contains('+clr.crossarchtools+'))">true</_BuildCrossComponents>
<_BuildCrossComponents Condition="'$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')">true</_BuildCrossComponents>
<_CrossBitwidthBuild Condition="'$(BuildArchitecture)' == 'x64' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm')">true</_CrossBitwidthBuild>
<_CrossBitwidthBuild Condition="'$(BuildArchitecture)' == 'x64' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel')">true</_CrossBitwidthBuild>
<_BuildCrossDebugComponents Condition="'$(_BuildCrossComponents)' == 'true' and '$(TargetsWindows)' == 'true' and '$(_CrossBitwidthBuild)' != 'true'">true</_BuildCrossDebugComponents>
</PropertyGroup>

Expand Down Expand Up @@ -429,7 +429,7 @@

<PropertyGroup>
<CrossDacHostArch>x64</CrossDacHostArch>
<CrossDacHostArch Condition="'$(TargetArchitecture)' == 'arm'">x86</CrossDacHostArch>
<CrossDacHostArch Condition="'$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel'">x86</CrossDacHostArch>
</PropertyGroup>

<ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows)) and ('$(BuildArchitecture)' == 'x64' or '$(BuildArchitecture)' == 'x86') and '$(TargetArchitecture)' != 'x86'">
Expand Down Expand Up @@ -715,8 +715,8 @@

<PropertyGroup Condition="'$(DotNetBuildAllRuntimePacks)' == 'true'">
<_BuildNativeAOTRuntimePack Condition="'$(NativeAOTSupported)' == 'true'">true</_BuildNativeAOTRuntimePack>
<_BuildHostPack Condition="'$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and '$(TargetArchitecture)' == 'arm')">true</_BuildHostPack>
<_BuildBundle Condition="'$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and '$(TargetArchitecture)' == 'arm')">true</_BuildBundle>
<_BuildHostPack Condition="'$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and ('$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel'))">true</_BuildHostPack>
<_BuildBundle Condition="'$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and ('$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel'))">true</_BuildBundle>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions eng/targetingpacks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
LatestRuntimeFrameworkVersion="$(ProductVersion)"
RuntimeFrameworkName="$(LocalFrameworkOverrideName)"
RuntimePackNamePatterns="$(LocalFrameworkOverrideName).Runtime.**RID**"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;freebsd-x64;freebsd-arm64;openbsd-x64;openbsd-arm64;illumos-x64;solaris-x64;haiku-x64;linux-ppc64le;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
RuntimePackRuntimeIdentifiers="linux-armel;linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;freebsd-x64;freebsd-arm64;openbsd-x64;openbsd-arm64;illumos-x64;solaris-x64;haiku-x64;linux-ppc64le;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
TargetFramework="$(NetCoreAppCurrent)"
TargetingPackName="$(LocalFrameworkOverrideName).Ref"
TargetingPackVersion="$(ProductVersion)"
Expand Down Expand Up @@ -74,19 +74,19 @@
ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler"
TargetFramework="$(NetCoreAppCurrent)"
ILCompilerPackVersion="$(ProductVersion)"
ILCompilerRuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm64;win-x86;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
ILCompilerRuntimeIdentifiers="linux-armel;linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm64;win-x86;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
Condition="'$(UseLocalILCompilerPack)' == 'true' and '@(KnownILCompilerPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))' != 'true'" />
<KnownCrossgen2Pack Include="$(LocalFrameworkOverrideName).Crossgen2"
TargetFramework="$(NetCoreAppCurrent)"
Crossgen2PackNamePattern="$(LocalFrameworkOverrideName).Crossgen2.**RID**"
Crossgen2PackVersion="$(ProductVersion)"
Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm64;win-x86;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
Crossgen2RuntimeIdentifiers="linux-armel;linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm64;win-x86;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
Condition="'$(UseLocalCrossgen2Pack)' == 'true' and '@(KnownCrossgen2Pack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))' != 'true'" />
<KnownAppHostPack Include="$(LocalFrameworkOverrideName)"
ExcludedRuntimeIdentifiers="android"
AppHostPackNamePattern="$(LocalFrameworkOverrideName).Host.**RID**"
AppHostPackVersion="$(ProductVersion)"
AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;freebsd-x64;freebsd-arm64;openbsd-x64;openbsd-arm64;illumos-x64;solaris-x64;haiku-x64;linux-ppc64le;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
AppHostRuntimeIdentifiers="linux-armel;linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;freebsd-x64;freebsd-arm64;openbsd-x64;openbsd-arm64;illumos-x64;solaris-x64;haiku-x64;linux-ppc64le;linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64"
TargetFramework="$(NetCoreAppCurrent)"
Condition="'$(UseLocalAppHostPack)' == 'true' and '@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))' != 'true'" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ The .NET Foundation licenses this file to you under the MIT license.
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' != 'true'">aarch64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' == 'true'">arm64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm'))">armv7</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-armel'))">arm</CrossCompileArch>

<CrossCompileAbi>gnu</CrossCompileAbi>
<CrossCompileAbi Condition="$(CrossCompileRid.StartsWith('linux-bionic-')) or $(CrossCompileRid.StartsWith('android-'))">android24</CrossCompileAbi>
<CrossCompileAbi Condition="$(CrossCompileRid.StartsWith('linux-musl-')) or $(CrossCompileRid.StartsWith('alpine-'))">musl</CrossCompileAbi>
<CrossCompileAbi Condition="'$(CrossCompileRid)' == 'linux-arm'">gnueabihf</CrossCompileAbi>
<CrossCompileAbi Condition="'$(CrossCompileRid)' == 'linux-armel'">gnueabi</CrossCompileAbi>
<CrossCompileAbi Condition="'$(CrossCompileRid)' == 'linux-bionic-arm' or '$(CrossCompileRid)' == 'android-arm'">androideabi24</CrossCompileAbi>
<CrossCompileAbi Condition="'$(CrossCompileRid)' == 'linux-musl-arm'">musleabihf</CrossCompileAbi>
</PropertyGroup>
Expand Down Expand Up @@ -313,6 +315,7 @@ The .NET Foundation licenses this file to you under the MIT license.

<!-- Tizen requires additional linker args -->
<LinkerArg Include="-L&quot;$(SysRoot)/$(_TizenToolchainLibDir)&quot;" Condition="'$(_IsTizenExitCode)' == '0'" />
<LinkerArg Include="-L&quot;$(SysRoot)/usr/$(_TizenToolchainLibDir)&quot;" Condition="'$(_IsTizenExitCode)' == '0'" />
</ItemGroup>

<Exec Command="xcodebuild -version" Condition="'$(_IsApplePlatform)' == 'true' and '$(UseLdClassicXCodeLinker)' == ''" IgnoreExitCode="true" StandardOutputImportance="Low" ConsoleToMSBuild="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
//
#if TARGET_ARM
#define CALLDESCR_ARGREGS // CallDescrWorker has ArgumentRegister parameter
#if !ARM_SOFTFP
#define CALLDESCR_FPARGREGS // CallDescrWorker has FloatArgumentRegisters parameter
#endif
#define ENREGISTERED_RETURNTYPE_MAXSIZE
#define ENREGISTERED_RETURNTYPE_INTEGER_MAXSIZE
#define FEATURE_HFA
Expand Down Expand Up @@ -250,6 +252,7 @@ internal struct ArgumentRegisters
[StructLayout(LayoutKind.Sequential)]
internal struct FloatArgumentRegisters

@jkotas jkotas Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These structures have to be in sync with CoreCLR w/ JIT. We do not have these fine-grained ifdefs in CoreCLR. https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/arm/cgencpu.h

These are all slow paths. It is very minor inefficiency to save the extra floating-point registers with armel even though it is not strictly necessary. I think it would be simpler to avoid these ifdefs and accept this minor inefficiency. (Otherwise, you need a bunch more places that need these ifdefs to ensure everything is in sync.)

{
#if !ARM_SOFTFP
private double d0;
private double d1;
private double d2;
Expand All @@ -258,6 +261,7 @@ internal struct FloatArgumentRegisters
private double d5;
private double d6;
private double d7;
#endif
}

internal struct ArchitectureConstants
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/nativeaot/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

<OutputPath Condition="$(MSBuildProjectName.StartsWith('System.Private.'))">$(RuntimeBinDir)/aotsdk/</OutputPath>
<Configurations>Debug;Release;Checked</Configurations>
<Platforms>x64;x86;arm;arm64</Platforms>
<Platforms>x64;x86;arm;arm64;armel</Platforms>

<Platform Condition=" '$(Platform)' == '' ">$(TargetArchitecture)</Platform>
<Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
<Platform Condition=" '$(Platform)' == 'armel' ">armel</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
Expand Down Expand Up @@ -83,8 +83,9 @@
<PropertyGroup Condition="'$(Platform)' == 'x86'">
<DefineConstants>TARGET_32BIT;TARGET_X86;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm'">
<PropertyGroup Condition="'$(Platform)' == 'arm' or '$(Platform)' == 'armel'">
<DefineConstants>TARGET_32BIT;TARGET_ARM;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'armel'">ARM_SOFTFP;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'arm64'">
<DefineConstants>TARGET_64BIT;TARGET_ARM64;$(DefineConstants)</DefineConstants>
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ if (CLR_CMAKE_TARGET_UNIX)
add_definitions(-DUNIX_AMD64_ABI)
elseif (CLR_CMAKE_TARGET_ARCH_ARM)
add_definitions(-DUNIX_ARM_ABI)
if(ARM_SOFTFP)
add_definitions(-DARM_SOFTFP)
endif(ARM_SOFTFP)
elseif (CLR_CMAKE_TARGET_ARCH_I386)
add_definitions(-DUNIX_X86_ABI)
endif()
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,10 +1426,17 @@ struct UniversalTransitionStackFrame
private:
uintptr_t m_pushedR11; // ChildSP+000 CallerSP-078 (0x4 bytes) (r11)
uintptr_t m_pushedLR; // ChildSP+004 CallerSP-074 (0x4 bytes) (lr)
#ifdef ARM_SOFTFP
// ARM soft-float ABI: no VFP argument registers (d0-d7) on stack
uint64_t m_returnBlock[4]; // ChildSP+008 CallerSP-030 (0x20 bytes)
uintptr_t m_intArgRegs[4]; // ChildSP+028 CallerSP-010 (0x10 bytes) (r0-r3)
uintptr_t m_stackPassedArgs[1]; // ChildSP+038 CallerSP+000 (unknown size)
#else
uint64_t m_fpArgRegs[8]; // ChildSP+008 CallerSP-070 (0x40 bytes) (d0-d7)
uint64_t m_returnBlock[4]; // ChildSP+048 CallerSP-030 (0x20 bytes)
uintptr_t m_intArgRegs[4]; // ChildSP+068 CallerSP-010 (0x10 bytes) (r0-r3)
uintptr_t m_stackPassedArgs[1]; // ChildSP+078 CallerSP+000 (unknown size)
#endif

public:
PTR_uintptr_t get_CallerSP() { return GET_POINTER_TO_FIELD(m_stackPassedArgs[0]); }
Expand Down
8 changes: 8 additions & 0 deletions src/coreclr/nativeaot/Runtime/arm/GcProbe.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
.macro PUSH_PROBE_FRAME threadReg, trashReg, BITMASK
// Define the method prolog, allocating enough stack space for the PInvokeTransitionFrame and saving
// incoming register values into it.
#ifndef ARM_SOFTFP
PROLOG_VPUSH "{d0-d3}" // Save d0-d3 which can have the floating point return value
PROLOG_STACK_ALLOC 4 // Alignment
#endif
PROLOG_PUSH "{r0-r2}" // Save return registers (r0-r2)
PROLOG_STACK_ALLOC 4 // Space for caller's SP
PROLOG_PUSH "{r4-r10}" // Save non-volatile registers
Expand All @@ -33,7 +35,11 @@
str \trashReg, [sp, #OFFSETOF__PInvokeTransitionFrame__m_Flags]

// Compute SP value at entry to this method and save it in slot of the frame.
#ifdef ARM_SOFTFP
add \trashReg, sp, #(15 * 4)
#else
add \trashReg, sp, #(16 * 4 + 4 * 8)
#endif
str \trashReg, [sp, #(11 * 4)]

// Link the frame into the Thread
Expand All @@ -51,8 +57,10 @@
EPILOG_POP "{r4-r10}" // Restore non-volatile registers
EPILOG_STACK_FREE 4 // Discard caller's SP
EPILOG_POP "{r0-r2}" // Restore return registers (r0-r2)
#ifndef ARM_SOFTFP
EPILOG_STACK_FREE 4 // Discard alignment
EPILOG_VPOP "{d0-d3}" // Restore d0-d3 which can have the floating point return value
#endif
.endm

//
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/nativeaot/Runtime/arm/InteropThunksHelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ NESTED_ENTRY RhCommonStub, _TEXT, NoHandler
// r12 already has the current thunk's data block pointer
// (thunk branched here via ldr pc, preserving r12)
PROLOG_PUSH "{r0-r4, lr}"
#ifndef ARM_SOFTFP
PROLOG_VPUSH {d0-d7} // Capture the floating point argument registers
#endif

mov r4, r12

Expand All @@ -35,7 +37,9 @@ NESTED_ENTRY RhCommonStub, _TEXT, NoHandler

// Now load the target address and jump to it.
ldr r12, [r4, #POINTER_SIZE]
#ifndef ARM_SOFTFP
EPILOG_VPOP {d0-d7}
#endif
EPILOG_POP "{r0-r4, lr}"
bx r12

Expand Down
11 changes: 11 additions & 0 deletions src/coreclr/nativeaot/Runtime/arm/UniversalTransition.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
// Largest return block is 4 doubles
#define RETURN_BLOCK_SIZE (32)

#ifndef ARM_SOFTFP
#define COUNT_FLOAT_ARG_REGISTERS (8)
#define FLOAT_REGISTER_SIZE (8)
#define FLOAT_ARG_REGISTERS_SIZE (COUNT_FLOAT_ARG_REGISTERS * FLOAT_REGISTER_SIZE)
#else
// ARM soft-float ABI: no floating point argument registers
#define FLOAT_ARG_REGISTERS_SIZE (0)
#endif

#define PUSHED_LR_SIZE (4)
#define PUSHED_R11_SIZE (4)
Expand Down Expand Up @@ -89,7 +94,9 @@ NESTED_ENTRY Rhp\FunctionName, _TEXT, NoHandler
str r3, [sp, #12] // Store remaining arg registers into the space used for the hidden args
str r2, [sp, #8]
PROLOG_STACK_ALLOC RETURN_BLOCK_SIZE // Save space a buffer to be used to hold return buffer data.
#ifndef ARM_SOFTFP
PROLOG_VPUSH {d0-d7} // Capture the floating point argument registers
#endif
PROLOG_PUSH "{r11,lr}" // Save caller's frame chain pointer and PC

#ifdef TRASH_SAVED_ARGUMENT_REGISTERS
Expand All @@ -99,6 +106,7 @@ NESTED_ENTRY Rhp\FunctionName, _TEXT, NoHandler
// frame, and the code at the call target is required to use only the transition frame
// copies when dispatching this call to the eventual callee.

#ifndef ARM_SOFTFP
PREPARE_EXTERNAL_VAR RhpFpTrashValues, r3
vldr d0, [r3, #(0 * 8)]
vldr d1, [r3, #(1 * 8)]
Expand All @@ -108,6 +116,7 @@ NESTED_ENTRY Rhp\FunctionName, _TEXT, NoHandler
vldr d5, [r3, #(5 * 8)]
vldr d6, [r3, #(6 * 8)]
vldr d7, [r3, #(7 * 8)]
#endif

PREPARE_EXTERNAL_VAR RhpIntegerTrashValues, r3
ldr r2, [r3, #(2 * 4)]
Expand All @@ -130,7 +139,9 @@ GLOBAL_LABEL ReturnFrom\FunctionName
EPILOG_POP "{r11,lr}"

// Restore the argument registers.
#ifndef ARM_SOFTFP
EPILOG_VPOP {d0-d7}
#endif
EPILOG_STACK_FREE RETURN_BLOCK_SIZE // pop return block conservatively reported area
EPILOG_POP "{r0-r3}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
<PropertyGroup Condition="'$(InPlaceRuntime)' == 'true'">
<DefineConstants>INPLACE_RUNTIME;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'arm'">FEATURE_64BIT_ALIGNMENT;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'armel'">FEATURE_64BIT_ALIGNMENT;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'armel'">FEATURE_64BIT_ALIGNMENT;ARM_SOFTFP;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'wasm'">FEATURE_64BIT_ALIGNMENT;$(DefineConstants)</DefineConstants>

<IntermediatesDir>$(ArtifactsObjDir)\coreclr\$(TargetOS).$(TargetArchitecture).$(CoreCLRConfiguration)</IntermediatesDir>
Expand Down
Loading
Loading