Skip to content

Commit c7f0ca6

Browse files
committed
Remove native "x86stdcall" ABI
1 parent dec6b53 commit c7f0ca6

File tree

6 files changed

+3
-21
lines changed

6 files changed

+3
-21
lines changed

src/comp/metadata/tydecode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
260260
let abi;
261261
alt next(st) as char {
262262
'i' { abi = ast::native_abi_rust_intrinsic; }
263-
's' { abi = ast::native_abi_x86stdcall; }
264263
'C' { abi = ast::native_abi_c_stack_cdecl; }
265264
'S' { abi = ast::native_abi_c_stack_stdcall; }
266265
}

src/comp/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
143143
w.write_char('N');
144144
alt abi {
145145
native_abi_rust_intrinsic. { w.write_char('i'); }
146-
native_abi_x86stdcall. { w.write_char('s'); }
147146
native_abi_c_stack_cdecl. { w.write_char('C'); }
148147
native_abi_c_stack_stdcall. { w.write_char('S'); }
149148
}

src/comp/middle/trans.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5596,8 +5596,7 @@ fn native_fn_ty_param_count(cx: @crate_ctxt, id: ast::node_id) -> uint {
55965596

55975597
pure fn native_abi_requires_pair(abi: ast::native_abi) -> bool {
55985598
alt abi {
5599-
ast::native_abi_rust_intrinsic. |
5600-
ast::native_abi_x86stdcall. { ret true; }
5599+
ast::native_abi_rust_intrinsic. { ret true; }
56015600
ast::native_abi_c_stack_cdecl. |
56025601
ast::native_abi_c_stack_stdcall. { ret false; }
56035602
}
@@ -5631,6 +5630,8 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
56315630
let fn_type = node_id_type(ccx, id); // NB: has no type params
56325631
let abi = ty::ty_fn_abi(ccx.tcx, fn_type);
56335632

5633+
// FIXME: There's probably a lot of unused code here now that
5634+
// there's only one possible combination of these three options
56345635
let pass_task;
56355636
let uses_retptr;
56365637
let cast_to_i32;
@@ -5640,11 +5641,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
56405641
uses_retptr = true;
56415642
cast_to_i32 = false;
56425643
}
5643-
ast::native_abi_x86stdcall. {
5644-
pass_task = false;
5645-
uses_retptr = false;
5646-
cast_to_i32 = true;
5647-
}
56485644
ast::native_abi_c_stack_cdecl. {
56495645
let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], ccx.int_type));
56505646
ccx.item_ids.insert(id, llfn);
@@ -5789,14 +5785,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
57895785
r = result.val;
57905786
rptr = result.rptr;
57915787
}
5792-
ast::native_abi_x86stdcall. {
5793-
let result =
5794-
trans_simple_native_abi(bcx, name, call_args, fn_type,
5795-
uses_retptr,
5796-
lib::llvm::LLVMX86StdcallCallConv);
5797-
r = result.val;
5798-
rptr = result.rptr;
5799-
}
58005788
_ {
58015789
r =
58025790
trans_native_call(new_raw_block_ctxt(bcx.fcx, bcx.llbb),

src/comp/syntax/ast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ type _mod = {view_items: [@view_item], items: [@item]};
427427

428428
tag native_abi {
429429
native_abi_rust_intrinsic;
430-
native_abi_x86stdcall;
431430
native_abi_c_stack_cdecl;
432431
native_abi_c_stack_stdcall;
433432
}

src/comp/syntax/parse/parser.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,8 +2008,6 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20082008
let t = parse_str(p);
20092009
if str::eq(t, "rust-intrinsic") {
20102010
abi = ast::native_abi_rust_intrinsic;
2011-
} else if str::eq(t, "x86stdcall") {
2012-
abi = ast::native_abi_x86stdcall;
20132011
} else if str::eq(t, "c-stack-cdecl") {
20142012
abi = ast::native_abi_c_stack_cdecl;
20152013
} else if str::eq(t, "c-stack-stdcall") {

src/comp/syntax/print/pprust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ fn print_item(s: ps, &&item: @ast::item) {
404404
ast::native_abi_rust_intrinsic. {
405405
word_nbsp(s, "\"rust-intrinsic\"");
406406
}
407-
ast::native_abi_x86stdcall. { word_nbsp(s, "\"x86stdcall\""); }
408407
ast::native_abi_c_stack_cdecl. {
409408
word_nbsp(s, "\"c-stack-cdecl\"");
410409
}

0 commit comments

Comments
 (0)