Skip to content

Commit fee9dbf

Browse files
committed
---
yaml --- r: 124409 b: refs/heads/snap-stage3 c: 459ffc2 h: refs/heads/master i: 124407: fe5ef89 v: v3
1 parent 70fffdb commit fee9dbf

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 32cb44bfff3facbded5fd9cc74af3f02e81565a8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: aa760a849ee9f4d6817c81aad25fdc7990e894ed
4+
refs/heads/snap-stage3: 459ffc2adc74f5e8b64a76f5670edb419b9f65da
55
refs/heads/try: dff46952ab5c4567d1b5b35bfbd8befc45cdd38e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/driver/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ cgoptions!(
332332
"prefer dynamic linking to static linking"),
333333
no_integrated_as: bool = (false, parse_bool,
334334
"use an external assembler rather than LLVM's integrated one"),
335+
no_redzone: bool = (false, parse_bool,
336+
"disable the use of the redzone"),
335337
relocation_model: String = ("pic".to_string(), parse_string,
336338
"choose the relocation model to use (llc -relocation-model for details)"),
337339
metadata: Vec<String> = (Vec::new(), parse_list,

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ fn decl_fn(ccx: &CrateContext, name: &str, cc: llvm::CallConv,
193193
_ => {}
194194
}
195195

196+
if ccx.tcx.sess.opts.cg.no_redzone {
197+
unsafe {
198+
llvm::LLVMAddFunctionAttribute(llfn,
199+
llvm::FunctionIndex as c_uint,
200+
llvm::NoRedZoneAttribute as uint64_t)
201+
}
202+
}
203+
196204
llvm::SetFunctionCallConv(llfn, cc);
197205
// Function addresses in Rust are never significant, allowing functions to be merged.
198206
llvm::SetUnnamedAddr(llfn, true);

0 commit comments

Comments
 (0)