projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM asm parsing should handle pre-indexed writeback w/o immediate.
[oota-llvm.git]
/
lib
/
Target
/
TargetLibraryInfo.cpp
diff --git
a/lib/Target/TargetLibraryInfo.cpp
b/lib/Target/TargetLibraryInfo.cpp
index 6bf6c0d1a6bce83a4ac2e039a3b4cf32150d3db8..709dfd283f98ffd9dd5a4b6ffd5807fca4c3cc78 100644
(file)
--- a/
lib/Target/TargetLibraryInfo.cpp
+++ b/
lib/Target/TargetLibraryInfo.cpp
@@
-28,12
+28,22
@@
static void initialize(TargetLibraryInfo &TLI, const Triple &T) {
// memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
// memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
- if (T.getOS() != Triple::Darwin || T.getDarwinMajorNumber() < 9)
+ if (T.isMacOSX()) {
+ if (T.isMacOSXVersionLT(10, 5))
+ TLI.setUnavailable(LibFunc::memset_pattern16);
+ } else if (T.getOS() == Triple::IOS) {
+ if (T.isOSVersionLT(3, 0))
+ TLI.setUnavailable(LibFunc::memset_pattern16);
+ } else {
TLI.setUnavailable(LibFunc::memset_pattern16);
TLI.setUnavailable(LibFunc::memset_pattern16);
+ }
- // iprintf
is only available on XCore
.
- if (T.getArch() != Triple::xcore
)
+ // iprintf
and friends are only available on XCore and TCE
.
+ if (T.getArch() != Triple::xcore
&& T.getArch() != Triple::tce) {
TLI.setUnavailable(LibFunc::iprintf);
TLI.setUnavailable(LibFunc::iprintf);
+ TLI.setUnavailable(LibFunc::siprintf);
+ TLI.setUnavailable(LibFunc::fiprintf);
+ }
}
}
@@
-51,6
+61,12
@@
TargetLibraryInfo::TargetLibraryInfo(const Triple &T) : ImmutablePass(ID) {
initialize(*this, T);
}
initialize(*this, T);
}
+TargetLibraryInfo::TargetLibraryInfo(const TargetLibraryInfo &TLI)
+ : ImmutablePass(ID) {
+ memcpy(AvailableArray, TLI.AvailableArray, sizeof(AvailableArray));
+}
+
+
/// disableAllFunctions - This disables all builtins, which is used for options
/// like -fno-builtin.
void TargetLibraryInfo::disableAllFunctions() {
/// disableAllFunctions - This disables all builtins, which is used for options
/// like -fno-builtin.
void TargetLibraryInfo::disableAllFunctions() {