Skip to content

Commit 1c76e05

Browse files
committed
---
yaml --- r: 81303 b: refs/heads/snap-stage3 c: 8bb48cc h: refs/heads/master i: 81301: 4c9c2dd 81299: c8096b4 81295: 53a4c70 v: v3
1 parent 7c795d9 commit 1c76e05

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
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: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: dec37051dd01b3faf921163a5d8370223ff77682
4+
refs/heads/snap-stage3: 8bb48cc1e607a7189c80c1d0f3f5567312bf1a99
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
343343
CFG_LDPATH_mips-unknown-linux-gnu :=
344344
CFG_RUN_mips-unknown-linux-gnu=
345345
CFG_RUN_TARG_mips-unknown-linux-gnu=
346-
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
346+
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32 -Z soft-float
347347

348348
# i686-pc-mingw32 configuration
349349
CC_i686-pc-mingw32=$(CC)

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ pub mod write {
264264
session::Default => lib::llvm::CodeGenLevelDefault,
265265
session::Aggressive => lib::llvm::CodeGenLevelAggressive,
266266
};
267+
let use_softfp = sess.opts.debugging_opts & session::use_softfp != 0;
267268

268269
let tm = do sess.targ_cfg.target_strs.target_triple.with_c_str |T| {
269270
do sess.opts.target_cpu.with_c_str |CPU| {
@@ -273,7 +274,8 @@ pub mod write {
273274
lib::llvm::CodeModelDefault,
274275
lib::llvm::RelocPIC,
275276
OptLevel,
276-
true
277+
true,
278+
use_softfp
277279
)
278280
}
279281
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub static print_llvm_passes: uint = 1 << 26;
8080
pub static no_vectorize_loops: uint = 1 << 27;
8181
pub static no_vectorize_slp: uint = 1 << 28;
8282
pub static no_prepopulate_passes: uint = 1 << 29;
83+
pub static use_softfp: uint = 1 << 30;
8384

8485
pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
8586
~[(~"verbose", ~"in general, enable more debug printouts", verbose),
@@ -135,6 +136,7 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
135136
(~"no-vectorize-slp",
136137
~"Don't run LLVM's SLP vectorization passes",
137138
no_vectorize_slp),
139+
(~"soft-float", ~"Generate software floating point library calls", use_softfp),
138140
]
139141
}
140142

branches/snap-stage3/src/librustc/lib/llvm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,8 @@ pub mod llvm {
21492149
Model: CodeGenModel,
21502150
Reloc: RelocMode,
21512151
Level: CodeGenOptLevel,
2152-
EnableSegstk: bool) -> TargetMachineRef;
2152+
EnableSegstk: bool,
2153+
UseSoftFP: bool) -> TargetMachineRef;
21532154
pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
21542155
pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef,
21552156
PM: PassManagerRef,

branches/snap-stage3/src/rustllvm/PassWrapper.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ LLVMRustCreateTargetMachine(const char *triple,
6767
CodeModel::Model CM,
6868
Reloc::Model RM,
6969
CodeGenOpt::Level OptLevel,
70-
bool EnableSegmentedStacks) {
70+
bool EnableSegmentedStacks,
71+
bool UseSoftFloat) {
7172
std::string Error;
7273
Triple Trip(Triple::normalize(triple));
7374
const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Trip.getTriple(),
@@ -84,6 +85,10 @@ LLVMRustCreateTargetMachine(const char *triple,
8485
Options.FloatABIType =
8586
(Trip.getEnvironment() == Triple::GNUEABIHF) ? FloatABI::Hard :
8687
FloatABI::Default;
88+
Options.UseSoftFloat = UseSoftFloat;
89+
if (UseSoftFloat) {
90+
Options.FloatABIType = FloatABI::Soft;
91+
}
8792

8893
TargetMachine *TM = TheTarget->createTargetMachine(Trip.getTriple(),
8994
cpu,

0 commit comments

Comments
 (0)