You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add an intrinsic that provides the address of the memory location that holds the return address of the current function? Microsoft has one for C/C++ _AddressOfReturnAddress.
I could really use it for low level matters, but do not know enough about the compiler intrinsics to add a pull request myself.
The text was updated successfully, but these errors were encountered:
I don’t think that is feasible – the return address location is not addressable on all targets rust supports. However if you only support x86 and aarch64 targets, you can link to the llvm.addressofreturnaddress intrinsic directly without necessarily needing support from rustc.
That sounds reasonable. I found this pull request that temporarily added the return_address intrinsic, but I can not see any connection to the llvm.returnaddress intrinsic in the added lines. @nagisa could you lead me to an example how I could use the llvm.addressofreturnaddress intrinsic in my code without modifying rustc? I also don't really understand this out pointer restriction, but maybe I will if I look at the resulting assembly output..
Would it be possible to add an intrinsic that provides the address of the memory location that holds the return address of the current function? Microsoft has one for C/C++ _AddressOfReturnAddress.
I could really use it for low level matters, but do not know enough about the compiler intrinsics to add a pull request myself.
The text was updated successfully, but these errors were encountered: