Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c2b6454
[CLRINTRP] Port to ARM
clamp03 Jul 30, 2025
ad24b45
[CLRINTRP] Make dummy asssembly functions
clamp03 Sep 11, 2025
04b980f
Disable Float
clamp03 Sep 16, 2025
8cd71fa
[INTRP] Print HelloWorld Done
clamp03 Sep 18, 2025
55560c4
[INTRP] HelloWorld Done
clamp03 Sep 18, 2025
7df0312
[INTRP] Update X to R for arm register
clamp03 Sep 22, 2025
5b3ef8e
[INTRP] Call methods with 2 args and return value
clamp03 Sep 23, 2025
02320b0
[INTRP] Implement Args Load and Store Assemblies
clamp03 Sep 23, 2025
cb816e6
[INTRP] Add Load_Ref and Store_Ref
clamp03 Sep 23, 2025
0cc0032
[INTRP] Return I8
clamp03 Sep 23, 2025
a09723d
[INTRP] Update I8 to I4 for ARM32
clamp03 Sep 23, 2025
07d975a
[INTRP] Call to Method with LONG args
clamp03 Sep 24, 2025
9875d8b
[INTRP] Initial Support for Float and Double
clamp03 Sep 25, 2025
4d7d19f
[INTRP] Update for ARM SOFTFP
clamp03 Sep 25, 2025
ab7eca6
[INTRP] Update all assemblies for arm softp
clamp03 Sep 25, 2025
1cf65b7
[INTRP] Can Pass Arguments using Stack
clamp03 Sep 25, 2025
aabd45b
[INTRP] Remove Redundant Codes
clamp03 Sep 26, 2025
e6a79a0
[INTRP] Support Struct
clamp03 Sep 26, 2025
a5e1bd5
[INTRP] Support RetBuff
clamp03 Sep 26, 2025
b3ba6ec
[DO NOT MERGE] For Test
clamp03 Oct 13, 2025
30e25e0
[INTRP] Fix release build errors
clamp03 Oct 14, 2025
82769b4
Revert "[DO NOT MERGE] For Test"
clamp03 Oct 14, 2025
f402453
Workarounds for errors
clamp03 Oct 14, 2025
4d48c03
Revert INTERP_STACK_SLOT_SIZE
clamp03 Oct 14, 2025
1607eb2
Revert "Revert INTERP_STACK_SLOT_SIZE"
clamp03 Oct 15, 2025
8280ee2
Update StackVal for 32 bit target
clamp03 Oct 15, 2025
df468a6
Merge remote-tracking branch 'origin/main' into intrp_arm
clamp03 Oct 15, 2025
b93b7cd
Fix align for 8 bytes and value type
clamp03 Oct 20, 2025
a9c0d6e
8 bytes stack size for WASM
clamp03 Oct 20, 2025
705cf2e
Change interpreter stack size to 8 bytes
clamp03 Oct 22, 2025
fe42ce9
Update ProcessArgument
clamp03 Oct 22, 2025
c69cb0d
Merge remote-tracking branch 'origin/main' into intrp_arm
clamp03 Oct 23, 2025
4e3ac8d
Fix InterpreterStub
clamp03 Oct 23, 2025
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
2 changes: 1 addition & 1 deletion src/coreclr/clr.featuredefines.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<FeatureObjCMarshal>true</FeatureObjCMarshal>
</PropertyGroup>

<PropertyGroup Condition="('$(Platform)' == 'x64' OR '$(Platform)' == 'arm64') AND ('$(Configuration)' == 'debug' OR '$(Configuration)' == 'checked') AND '$(TargetsAndroid)' != 'true'">
<PropertyGroup Condition="('$(Platform)' == 'x64' OR '$(Platform)' == 'arm64' OR '$(Platform)' == 'arm') AND ('$(Configuration)' == 'debug' OR '$(Configuration)' == 'checked') AND '$(TargetsAndroid)' != 'true'">
<FeatureInterpreter>true</FeatureInterpreter>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/clrfeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ if(NOT DEFINED FEATURE_INTERPRETER)
set(FEATURE_PORTABLE_ENTRYPOINTS 1)
set(FEATURE_PORTABLE_HELPERS 1)
else()
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64)
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM)
set(FEATURE_INTERPRETER $<IF:$<CONFIG:Debug,Checked>,1,0>)
else(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64)
else(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM)
set(FEATURE_INTERPRETER 0)
endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64)
endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM)
endif()
endif(NOT DEFINED FEATURE_INTERPRETER)

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/interpreter/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1873,8 +1873,8 @@ int32_t InterpCompiler::GetInterpTypeStackSize(CORINFO_CLASS_HANDLE clsHnd, Inte
if (align < INTERP_STACK_SLOT_SIZE)
align = INTERP_STACK_SLOT_SIZE;

// We do not align beyond the stack alignment
// (This is relevant for structs with very high alignment requirements,
// We do not align beyond the stack alignment
// (This is relevant for structs with very high alignment requirements,
// where we align within struct layout, but the structs are not actually
// aligned on the stack)
if (align > INTERP_STACK_ALIGNMENT)
Expand Down
22 changes: 22 additions & 0 deletions src/coreclr/pal/inc/unixasmmacrosarm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ C_FUNC(\Name):
.endif

__PWTB_StackAlloc = __PWTB_TransitionBlock
__PWTB_ArgumentRegisters = __PWTB_StackAlloc + 36

.ifnc \pushArgRegs, DoNotPushArgRegs
PUSH_ARGUMENT_REGISTERS
Expand Down Expand Up @@ -318,3 +319,24 @@ C_FUNC(\Name):
movw \DestReg, #((\Constant) & 0xFFFF)
movt \DestReg, #((\Constant) >> 16)
.endm


// thumb with PIC version
.macro INLINE_GET_TLS_VAR var
ldr r0, 2f
1:
add r0, pc, r0
bl __tls_get_addr
b 3f

// Inline data
// LLVM assembler has no concept of subsections and this is not expressible as
// cross-section relocation.
.p2align 2
2:
.extern \var
.type \var, tls_object
.long \var(TLSGD) + (2b - 1b - 4)
3:
.endm

31 changes: 31 additions & 0 deletions src/coreclr/vm/arm/asmconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ ASMCONSTANTS_C_ASSERT(ASM_MIN_OBJECT_SIZE == MIN_OBJECT_SIZE);
#define MethodTable__enum_flag_ContainsGCPointers 0x01000000
ASMCONSTANTS_C_ASSERT(MethodTable__enum_flag_ContainsGCPointers == MethodTable::enum_flag_ContainsGCPointers);

#define METHODDESC_REGISTER r12

#define SIZEOF__MethodTable DBG_FRE(0x2c, 0x28)
ASMCONSTANTS_C_ASSERT(SIZEOF__MethodTable == sizeof(MethodTable));

Expand Down Expand Up @@ -198,6 +200,35 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun
ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached))
#endif // FEATURE_TIERED_COMPILATION

#define OFFSETOF__ThreadLocalInfo__m_pThread 0
ASMCONSTANTS_C_ASSERT(OFFSETOF__ThreadLocalInfo__m_pThread == offsetof(ThreadLocalInfo, m_pThread))

#ifdef FEATURE_INTERPRETER
#ifdef _DEBUG
#define OFFSETOF__InterpMethod__pCallStub 0x14
#else
#define OFFSETOF__InterpMethod__pCallStub 0x10
#endif
ASMCONSTANTS_C_ASSERT(OFFSETOF__InterpMethod__pCallStub == offsetof(InterpMethod, pCallStub))

#ifdef TARGET_UNIX
#define OFFSETOF__Thread__m_pInterpThreadContext 0x660
#else // TARGET_UNIX
#define OFFSETOF__Thread__m_pInterpThreadContext 0x0
#endif // TARGET_UNIX
ASMCONSTANTS_C_ASSERT(OFFSETOF__Thread__m_pInterpThreadContext == offsetof(Thread, m_pInterpThreadContext))

#define OFFSETOF__InterpThreadContext__pStackPointer 0x8
ASMCONSTANTS_C_ASSERT(OFFSETOF__InterpThreadContext__pStackPointer == offsetof(InterpThreadContext, pStackPointer))

#define OFFSETOF__CallStubHeader__Routines 0xc
ASMCONSTANTS_C_ASSERT(OFFSETOF__CallStubHeader__Routines == offsetof(CallStubHeader, Routines))

#define SIZEOF__TransitionBlock 0x34
ASMCONSTANTS_C_ASSERT(SIZEOF__TransitionBlock == sizeof(TransitionBlock))

#endif // FEATURE_INTERPRETER

#ifdef PROFILING_SUPPORTED
#define PROFILE_ENTER 0x1
#define PROFILE_LEAVE 0x2
Expand Down
Loading