-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix helloworld on x86 Linux #55095
Fix helloworld on x86 Linux #55095
Conversation
It looks like a reasonable direction to me. |
22834b4
to
1644a0e
Compare
A lot of tests on Windows x64 are failing with errors like:
|
1644a0e
to
df48ae4
Compare
df48ae4
to
a6f9fcb
Compare
src/coreclr/jit/morph.cpp
Outdated
@@ -2897,7 +2900,11 @@ void Compiler::fgInitArgInfo(GenTreeCall* call) | |||
// Compute the maximum number of arguments that can be passed in registers. | |||
// For X86 we handle the varargs and unmanaged calling conventions | |||
|
|||
#ifdef UNIX_X86_ABI | |||
if (call->IsVarargs()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VarArgs is not supported on Unix, so this will be always false. Would it be better to put this whole block under #ifndef UNIX_X86_ABI
?
Make managed->managed call use of ecx, edx to pass first two arguments. Make stack alignment returning after call.
a6f9fcb
to
d1b6466
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Working on helloworld.dll x86 linux launch I've got problem during calling convention on managed call from managed code. I fixed it in morph.cpp. After that fix I had got bugs with stack misalignment. Couple of that problems I fixed in compiler.cpp and jitinterfacex86.cpp. It allows to run helloworld.dll and stack dumping with
System.Diagnostics.StackTrace
. But I still have got similar stack misalignment problems on another programs.Is that fix-work direction right? Maybe I should fix managed-managed calling convention in another way?
cc @jkotas @alpencolt