rustc: Implement C stack stdcall
This commit is contained in:
parent
9be0dc1250
commit
968b66ad40
7 changed files with 19 additions and 2 deletions
|
|
@ -420,6 +420,7 @@ tag native_abi {
|
|||
native_abi_rust_intrinsic;
|
||||
native_abi_x86stdcall;
|
||||
native_abi_c_stack_cdecl;
|
||||
native_abi_c_stack_stdcall;
|
||||
}
|
||||
|
||||
type native_mod =
|
||||
|
|
|
|||
|
|
@ -2014,6 +2014,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
|
|||
abi = ast::native_abi_x86stdcall;
|
||||
} else if str::eq(t, "c-stack-cdecl") {
|
||||
abi = ast::native_abi_c_stack_cdecl;
|
||||
} else if str::eq(t, "c-stack-stdcall") {
|
||||
abi = ast::native_abi_c_stack_stdcall;
|
||||
} else {
|
||||
p.fatal("unsupported abi: " + t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,6 +411,9 @@ fn print_item(s: ps, item: @ast::item) {
|
|||
ast::native_abi_c_stack_cdecl. {
|
||||
word_nbsp(s, "\"c-stack-cdecl\"");
|
||||
}
|
||||
ast::native_abi_c_stack_stdcall. {
|
||||
word_nbsp(s, "\"c-stack-stdcall\"");
|
||||
}
|
||||
}
|
||||
word_nbsp(s, "mod");
|
||||
word_nbsp(s, item.ident);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue