Skip to content
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
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/GCHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static Object* GcAllocInternal(MethodTable* pEEType, uint32_t uFlags, uintptr_t
// numElements - number of array elements
// pTransitionFrame- transition frame to make stack crawlable
// Returns a pointer to the object allocated or NULL on failure.
EXTERN_C void* RhpGcAlloc(MethodTable* pEEType, uint32_t uFlags, uintptr_t numElements, PInvokeTransitionFrame* pTransitionFrame)
EXTERN_C void* RhpGcAlloc(MethodTable* pEEType, uint32_t uFlags, intptr_t numElements, PInvokeTransitionFrame* pTransitionFrame)
{
Thread* pThread = ThreadStore::GetCurrentThread();

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/nativeaot/Runtime/portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#include "GCMemoryHelpers.inl"

#if defined(FEATURE_PORTABLE_HELPERS)
EXTERN_C void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame);
EXTERN_C void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame);

static Object* AllocateObject(MethodTable* pEEType, uint32_t uFlags, uintptr_t numElements)
static Object* AllocateObject(MethodTable* pEEType, uint32_t uFlags, intptr_t numElements)
{
Object* pObject = (Object*)RhpGcAlloc(pEEType, uFlags, numElements, nullptr);
if (pObject == nullptr)
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/amd64/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ NESTED_ENTRY RhpNewObject, _TEXT, NoHandler
xor edx, edx // numElements

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call C_FUNC(RhpGcAlloc)

test rax, rax
Expand Down Expand Up @@ -273,7 +273,7 @@ NESTED_ENTRY RhpNewVariableSizeObject, _TEXT, NoHandler
// passing pTransitionFrame in rcx

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call C_FUNC(RhpGcAlloc)

test rax, rax
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/amd64/AllocFast.asm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ NESTED_ENTRY RhpNewObject, _TEXT
xor r8d, r8d ; numElements

;; Call the rest of the allocation helper.
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

test rax, rax
Expand Down Expand Up @@ -224,7 +224,7 @@ NESTED_ENTRY RhpNewVariableSizeObject, _TEXT
; passing pTransitionFrame in r9

; Call the rest of the allocation helper.
; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

test rax, rax
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/runtime/arm/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ NESTED_ENTRY RhpNewObject, _TEXT, NoHandler

mov r2, #0 // numElements

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
blx C_FUNC(RhpGcAlloc)

cbz r0, LOCAL_LABEL(NewOutOfMemory)
Expand Down Expand Up @@ -369,7 +369,7 @@ NESTED_ENTRY RhpNewVariableSizeObject, _TEXT, NoHandler
mov r2, r1 // numElements
mov r1, #0 // uFlags

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
blx C_FUNC(RhpGcAlloc)

// Test for failure (NULL return).
Expand Down Expand Up @@ -414,7 +414,7 @@ NESTED_ENTRY RhpNewArrayFastAlign8, _TEXT, NoHandler
mov r2, r1 // numElements
mov r1, #GC_ALLOC_ALIGN8 // uFlags

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
blx C_FUNC(RhpGcAlloc)

// Test for failure (NULL return).
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/arm64/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ LOCAL_LABEL(RhpNewFast_RarePath):
mov w2, 0 // numElements

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer on success.
Expand Down Expand Up @@ -258,7 +258,7 @@ LOCAL_LABEL(ArraySizeOverflow):
mov x2, x1 // numElements
mov x1, #0 // uFlags

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer and length on success.
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/arm64/AllocFast.asm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RhpNewFast_RarePath
mov w2, #0 ; numElements

;; Call the rest of the allocation helper.
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl RhpGcAlloc

cbz x0, NewOutOfMemory
Expand Down Expand Up @@ -229,7 +229,7 @@ ArraySizeOverflow
mov x2, x1 ; numElements
mov x1, #0 ; uFlags

;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl RhpGcAlloc

cbz x0, RhpNewVariableSizeObject_OutOfMemory
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/i386/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LEAF_ENTRY RhpNewObject, _TEXT
push ecx

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

add esp, 16
Expand Down Expand Up @@ -249,7 +249,7 @@ NESTED_ENTRY RhpNewVariableSizeObject, _TEXT, NoHandler
push 0 // Flags
push ecx // MethodTable

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

add esp, 16
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/i386/AllocFast.asm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ FASTCALL_FUNC RhpNewObject, 8
push ecx

;; Call the rest of the allocation helper.
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
;; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

test eax, eax
Expand Down Expand Up @@ -241,7 +241,7 @@ FASTCALL_FUNC RhpNewVariableSizeObject, 8
push 0 ; Flags
push ecx ; MethodTable

; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
; void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call RhpGcAlloc

test eax, eax
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/loongarch64/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ LOCAL_LABEL(RhpNewFast_RarePath):
ori $a2, $zero, 0 // numElements

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer on success.
Expand Down Expand Up @@ -228,7 +228,7 @@ LOCAL_LABEL(ArraySizeOverflow):
ori $a2, $a1, 0 // numElements
ori $a1, $zero, 0 // uFlags

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
bl C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer and length on success.
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/runtime/riscv64/AllocFast.S
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ LOCAL_LABEL(RhpNewFast_RarePath):
li a2, 0 // numElements

// Call the rest of the allocation helper.
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer on success.
Expand Down Expand Up @@ -262,7 +262,7 @@ LOCAL_LABEL(ArraySizeOverflow):
mv a2, a1 // numElements
li a1, 0 // uFlags

// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, uintptr_t numElements, void * pTransitionFrame)
// void* RhpGcAlloc(MethodTable *pEEType, uint32_t uFlags, intptr_t numElements, void * pTransitionFrame)
call C_FUNC(RhpGcAlloc)

// Set the new object's MethodTable pointer and length on success.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/gchelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ EXTERN_C Object* RhpGcAlloc(MethodTable* pMT, GC_ALLOC_FLAGS uFlags, uintptr_t n
return OBJECTREFToObject(newobj);
}

EXTERN_C Object* RhpGcAllocMaybeFrozen(MethodTable* pMT, uintptr_t numElements, TransitionBlock* pTransitionBlock)
EXTERN_C Object* RhpGcAllocMaybeFrozen(MethodTable* pMT, intptr_t numElements, TransitionBlock* pTransitionBlock)
{
OBJECTREF newobj = NULL;

Expand Down