- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a project acrossing platform (EM64T Linux and EM64T Windows).
I find that the icc(EM64T Linux)'s function calling convention confirms to gcc. But it is different with the icl on EM64T Windows. e.g, on Linux, rdi,rsi,rdx,rcx,r8,r9 are used to pass parameters; on Windows,rcx,rdx,r8,r9 are used to pass parameters. And icl (windows) justs support fastcall convention(from MSDN:http://msdn2.microsoft.com/en-us/library/ms235286(VS.80).aspx).
Do you have any solution to support portability across platforms? I don't want to rotate parameters when a function built on Linux calling another one built on Windows.
thanks!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any code which relies on specific registers for function parameters is unavoidably non-portable. Among the solutions are C, C++, Fortran, ....
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page