Skip to content

Commit fd5341a

Browse files
committed
[ARM] Enable strict fp support
1 parent 6a10d1d commit fd5341a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/Basic/Targets/ARM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple,
367367
: "\01mcount";
368368

369369
SoftFloatABI = llvm::is_contained(Opts.FeaturesAsWritten, "+soft-float-abi");
370+
if (!SoftFloatABI)
371+
HasStrictFP = true;
370372
}
371373

372374
StringRef ARMTargetInfo::getABI() const { return ABI; }

clang/test/Parser/pragma-fp-warn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// RUN: %clang_cc1 -triple wasm32 -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s
3-
// RUN: %clang_cc1 -triple thumbv7 -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s
3+
// RUN: %clang_cc1 -triple thumbv7 -fsyntax-only -target-feature +soft-float-abi -Wno-unknown-pragmas -Wignored-pragmas -verify %s
44
// RUN: %clang_cc1 -DEXPOK -triple aarch64 -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s
55
// RUN: %clang_cc1 -DEXPOK -triple x86_64 -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s
66
// RUN: %clang_cc1 -DEXPOK -triple systemz -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s

0 commit comments

Comments
 (0)