| OLD | NEW |
| 1 //===--- Triple.cpp - Target triple helper class --------------------------===// | 1 //===--- Triple.cpp - Target triple helper class --------------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 | 9 |
| 10 #include "llvm/ADT/Triple.h" | 10 #include "llvm/ADT/Triple.h" |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 | 994 |
| 995 switch (getOS()) { | 995 switch (getOS()) { |
| 996 case llvm::Triple::FreeBSD: | 996 case llvm::Triple::FreeBSD: |
| 997 case llvm::Triple::NetBSD: | 997 case llvm::Triple::NetBSD: |
| 998 if (MArch == "armv6") | 998 if (MArch == "armv6") |
| 999 return "arm1176jzf-s"; | 999 return "arm1176jzf-s"; |
| 1000 break; | 1000 break; |
| 1001 case llvm::Triple::Win32: | 1001 case llvm::Triple::Win32: |
| 1002 // FIXME: this is invalid for WindowsCE | 1002 // FIXME: this is invalid for WindowsCE |
| 1003 return "cortex-a9"; | 1003 return "cortex-a9"; |
| 1004 // @LOCALMOD-START |
| 1005 case llvm::Triple::NaCl: |
| 1006 // Default to armv7 unless something more specific is specified. |
| 1007 if (MArch == "arm") |
| 1008 return "cortex-a9"; |
| 1009 break; |
| 1010 // @LOCALMOD-END |
| 1004 default: | 1011 default: |
| 1005 break; | 1012 break; |
| 1006 } | 1013 } |
| 1007 | 1014 |
| 1008 const char *result = nullptr; | 1015 const char *result = nullptr; |
| 1009 size_t offset = StringRef::npos; | 1016 size_t offset = StringRef::npos; |
| 1010 if (MArch.startswith("arm")) | 1017 if (MArch.startswith("arm")) |
| 1011 offset = 3; | 1018 offset = 3; |
| 1012 if (MArch.startswith("thumb")) | 1019 if (MArch.startswith("thumb")) |
| 1013 offset = 5; | 1020 offset = 5; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 default: | 1069 default: |
| 1063 switch (getEnvironment()) { | 1070 switch (getEnvironment()) { |
| 1064 case llvm::Triple::EABIHF: | 1071 case llvm::Triple::EABIHF: |
| 1065 case llvm::Triple::GNUEABIHF: | 1072 case llvm::Triple::GNUEABIHF: |
| 1066 return "arm1176jzf-s"; | 1073 return "arm1176jzf-s"; |
| 1067 default: | 1074 default: |
| 1068 return "arm7tdmi"; | 1075 return "arm7tdmi"; |
| 1069 } | 1076 } |
| 1070 } | 1077 } |
| 1071 } | 1078 } |
| OLD | NEW |