LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 9148 - [ENH] Support the 'ms_abi' and 'sysv_abi' attributes
Summary: [ENH] Support the 'ms_abi' and 'sysv_abi' attributes
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-05 11:01 PST by Charles Davis
Modified: 2013-08-30 11:42 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Davis 2011-02-05 11:01:46 PST
The Win64 and System V x86-64 ABIs have different calling conventions. Currently, LLVM picks the right convention based on the target triple.

GCC does this too, but it also allows code to override the default using two attributes, 'ms_abi' and 'sysv_abi', which pick the Win64 and System V x86-64 conventions, respectively.

Sixty-four-bit Wine (http://www.winehq.org/) uses the ms_abi attribute extensively in order for its DLLs to have the correct calling convention. Without this support, LLVM-based compilers can't build 64-bit Wine.
Comment 1 Charles Davis 2013-08-30 11:42:50 PDT
Both are implemented as of r189644.