Skip to content

Commit

Permalink
Windows: mark a few spots that need porting for ARM support (#54782)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Jun 20, 2024
1 parent 0a491e0 commit 4d0149d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,18 +373,18 @@ static bool is_native_simd_type(jl_datatype_t *dt) {

#if defined ABI_LLVM
typedef ABI_LLVMLayout DefaultAbiState;
#elif defined _CPU_X86_64_
# if defined _OS_WINDOWS_
#elif defined _OS_WINDOWS_
# if defined _CPU_X86_64_
typedef ABI_Win64Layout DefaultAbiState;
# else
typedef ABI_x86_64Layout DefaultAbiState;
# endif
#elif defined _CPU_X86_
# if defined _OS_WINDOWS_
# elif defined _CPU_X86_
typedef ABI_Win32Layout DefaultAbiState;
# else
typedef ABI_x86Layout DefaultAbiState;
# error Windows is currently only supported on x86 and x86_64
# endif
#elif defined _CPU_X86_64_
typedef ABI_x86_64Layout DefaultAbiState;
#elif defined _CPU_X86_
typedef ABI_x86Layout DefaultAbiState;
#elif defined _CPU_ARM_
typedef ABI_ARMLayout DefaultAbiState;
#elif defined _CPU_AARCH64_
Expand Down
4 changes: 3 additions & 1 deletion src/stackwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,12 @@ static void jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
c.R15 = mctx->R15;
c.Rip = mctx->Rip;
memcpy(&c.Xmm6, &mctx->Xmm6, 10 * sizeof(mctx->Xmm6)); // Xmm6-Xmm15
#else
#elif defined(_CPU_X86_)
c.Eip = mctx->Eip;
c.Esp = mctx->Esp;
c.Ebp = mctx->Ebp;
#else
#error Windows is currently only supported on x86 and x86_64
#endif
context = &c;
#elif defined(JL_HAVE_UNW_CONTEXT)
Expand Down
2 changes: 2 additions & 0 deletions src/win32_ucontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ void jl_makecontext(win32_ucontext_t *ucp, void (*func)(void))
Registration[0].Handler = &__julia_personality;
Registration[1].Next = (PEXCEPTION_REGISTRATION_RECORD)0xFFFFFFFF;
Registration[1].Handler = UnHandler;
#else
#error jl_makecontext not defined for CPU type
#endif
stack_top -= sizeof(void*);
*(void**)stack_top = 0; // push rta
Expand Down

0 comments on commit 4d0149d

Please sign in to comment.