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

AArch64: support closure cfunctions (missing LLVM support for trampolines) #27174

Open
vchuravy opened this issue May 19, 2018 · 8 comments
Open
Labels
system:arm ARMv7 and AArch64

Comments

@vchuravy
Copy link
Member

The good news is that the AArch64 builds are back, the bad new is that the test are failing.
From https://build.julialang.org/#/builders/86/builds/206/steps/2/logs/stdio

      From worker 7:	LLVM ERROR: Cannot select: 0x3b0167f8: ch = init_trampoline 0x30660570, 0x34ac35e0, 0x3b2fd438, 0x3af9f838, SrcValue:ch<0x3b333810>, SrcValue:ch<0x3b194f08>
      From worker 7:	  0x34ac35e0: i64,ch = CopyFromReg 0x30660570, Register:i64 %0
      From worker 7:	    0x3b2fd980: i64 = Register %0
      From worker 7:	  0x3b2fd438: i64 = AArch64ISD::WrapperLarge TargetGlobalAddress:i64<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=3], TargetGlobalAddress:i64<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=36], TargetGlobalAddress:i64<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=37], TargetGlobalAddress:i64<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=38]
      From worker 7:	    0x3b0187b0: i64 = TargetGlobalAddress<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=3]
      From worker 7:	    0x34b21630: i64 = TargetGlobalAddress<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=36]
      From worker 7:	    0x3b2fd7e0: i64 = TargetGlobalAddress<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=37]
      From worker 7:	    0x3b016e78: i64 = TargetGlobalAddress<%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)**, i8*)* @jlcapi_cfunction_38022> 0 [TF=38]
      From worker 7:	  0x3af9f838: i64,ch = CopyFromReg 0x30660570, Register:i64 %1
      From worker 7:	    0x3b018678: i64 = Register %1
      From worker 7:	In function: jlcapi_cfunction_38022make

@vtjnash is this the issue with trampoline suppport on ARM that you mentioned a while back?

@vchuravy vchuravy added the system:arm ARMv7 and AArch64 label May 19, 2018
@vtjnash
Copy link
Sponsor Member

vtjnash commented May 19, 2018

Yeah, we need to edit our lowering to emit an explicit “not yet implemented on ARM”

@tianon

This comment has been minimized.

@oschulz
Copy link
Contributor

oschulz commented Nov 21, 2020

Just stumbled on this via FunctionWrappers.jl - is this still an issue? Just wondering since it may affect the design of a project of ours.

@vchuravy
Copy link
Member Author

Yes still an issue on PowerPC and AArch64 afaik

@oschulz
Copy link
Contributor

oschulz commented Nov 22, 2020

Will this have any practical implications for Apple-Silicon systems?

@musm
Copy link
Contributor

musm commented Jan 24, 2021

We have reports of users running into these problem at JuliaIO/HDF5.jl#811 (comment)
Does LLVM 11 improve the situation here at all?

@vchuravy
Copy link
Member Author

I just checked. It seems PPC has gained support for trampoline's, but we end up calling abort from within the __init_trampoline call (https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.9/libgcc/config/rs6000/tramp.S#181).

Grepping for INIT_TRAMPOLINE shows that only the X86 and PPC backend have lowerings.

@giordano
Copy link
Contributor

giordano commented Nov 9, 2023

If I understand it correctly, this might be addressed upstream by llvm/llvm-project#70267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:arm ARMv7 and AArch64
Projects
None yet
Development

No branches or pull requests

6 participants