Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for compiling to ARM32 #1294

Merged
merged 2 commits into from
Jul 9, 2021
Merged
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
19 changes: 19 additions & 0 deletions src/coreclr/nativeaot/Runtime/PalRedhawk.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@
#define __PN__MACHINECALL_CDECL_OR_DEFAULT __cdecl
#endif

#ifndef _MSC_VER

// Note: Win32-hosted GCC predefines __stdcall and __cdecl, but Unix-
// hosted GCC does not.

#ifdef __i386__

#if !defined(__cdecl)
#define __cdecl __attribute__((cdecl))
#endif

#else // !defined(__i386__)

#define __cdecl

#endif // !defined(__i386__)

#endif // !_MSC_VER

#ifndef _INC_WINDOWS
//#ifndef DACCESS_COMPILE

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/RuntimeInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ COOP_PINVOKE_HELPER(PTR_VOID, RhGetRuntimeHelperForType, (EEType * pEEType, int
{
case RuntimeHelperKind::AllocateObject:
#ifdef HOST_ARM
if ((pEEType->get_RareFlags() & EEType::RareFlags::RequiresAlign8Flag) == EEType::RareFlags::RequiresAlign8Flag)
if ((pEEType->RequiresAlign8())
jkotas marked this conversation as resolved.
Show resolved Hide resolved
{
if (pEEType->HasFinalizer())
return INDIRECTION(RhpNewFinalizableAlign8);
Expand Down
20 changes: 20 additions & 0 deletions src/coreclr/nativeaot/Runtime/arm/GcProbe.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#include <unixasmmacros.inc>
#include "AsmOffsets.inc"

.global RhpGcPoll2

LEAF_ENTRY RhpGcPoll
PREPARE_EXTERNAL_VAR_INDIRECT_W RhpTrapThreads, 0
cbnz w0, RhpGcPollRare // TrapThreadsFlags_None = 0
ret
LEAF_END RhpGcPoll

NESTED_ENTRY RhpGcPollRare, _TEXT, NoHandler
PUSH_COOP_PINVOKE_FRAME x0
bl RhpGcPoll2
POP_COOP_PINVOKE_FRAME
ret
NESTED_END RhpGcPollRare
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ public bool IsHFA
#if TARGET_ARM
if (TypeBeingBuilt is DefType)
{
return ((DefType)TypeBeingBuilt).IsHfa;
return ((DefType)TypeBeingBuilt).IsHomogeneousAggregate;
}
else
{
Expand Down