llvm.org GIT mirror llvm / e04de62
Mark arm as the 32bit variant of aarch64 in Triple Change Triple::get32BitArchVariant to return arm/armeb as the 32bit variant of aarch64/aarch64_be and do the same change for the oppoiste direction in Triple::get64BitArchVariant. Differential revision: http://reviews.llvm.org/D15529 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257048 91177308-0d34-0410-b5e6-96231b3b80d8 Tamas Berghammer 3 years ago
1 changed file(s) with 28 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
11531153 Triple T(*this);
11541154 switch (getArch()) {
11551155 case Triple::UnknownArch:
1156 case Triple::aarch64:
1157 case Triple::aarch64_be:
11581156 case Triple::amdgcn:
11591157 case Triple::avr:
11601158 case Triple::bpfel:
11901188 // Already 32-bit.
11911189 break;
11921190
1193 case Triple::le64: T.setArch(Triple::le32); break;
1194 case Triple::mips64: T.setArch(Triple::mips); break;
1195 case Triple::mips64el: T.setArch(Triple::mipsel); break;
1196 case Triple::nvptx64: T.setArch(Triple::nvptx); break;
1197 case Triple::ppc64: T.setArch(Triple::ppc); break;
1198 case Triple::sparcv9: T.setArch(Triple::sparc); break;
1199 case Triple::x86_64: T.setArch(Triple::x86); break;
1200 case Triple::amdil64: T.setArch(Triple::amdil); break;
1201 case Triple::hsail64: T.setArch(Triple::hsail); break;
1202 case Triple::spir64: T.setArch(Triple::spir); break;
1203 case Triple::wasm64: T.setArch(Triple::wasm32); break;
1191 case Triple::aarch64: T.setArch(Triple::arm); break;
1192 case Triple::aarch64_be: T.setArch(Triple::armeb); break;
1193 case Triple::le64: T.setArch(Triple::le32); break;
1194 case Triple::mips64: T.setArch(Triple::mips); break;
1195 case Triple::mips64el: T.setArch(Triple::mipsel); break;
1196 case Triple::nvptx64: T.setArch(Triple::nvptx); break;
1197 case Triple::ppc64: T.setArch(Triple::ppc); break;
1198 case Triple::sparcv9: T.setArch(Triple::sparc); break;
1199 case Triple::x86_64: T.setArch(Triple::x86); break;
1200 case Triple::amdil64: T.setArch(Triple::amdil); break;
1201 case Triple::hsail64: T.setArch(Triple::hsail); break;
1202 case Triple::spir64: T.setArch(Triple::spir); break;
1203 case Triple::wasm64: T.setArch(Triple::wasm32); break;
12041204 }
12051205 return T;
12061206 }
12091209 Triple T(*this);
12101210 switch (getArch()) {
12111211 case Triple::UnknownArch:
1212 case Triple::arm:
1213 case Triple::armeb:
12141212 case Triple::avr:
12151213 case Triple::hexagon:
12161214 case Triple::kalimba:
12171215 case Triple::msp430:
12181216 case Triple::r600:
12191217 case Triple::tce:
1220 case Triple::thumb:
1221 case Triple::thumbeb:
12221218 case Triple::xcore:
12231219 case Triple::sparcel:
12241220 case Triple::shave:
12461242 // Already 64-bit.
12471243 break;
12481244
1249 case Triple::le32: T.setArch(Triple::le64); break;
1250 case Triple::mips: T.setArch(Triple::mips64); break;
1251 case Triple::mipsel: T.setArch(Triple::mips64el); break;
1252 case Triple::nvptx: T.setArch(Triple::nvptx64); break;
1253 case Triple::ppc: T.setArch(Triple::ppc64); break;
1254 case Triple::sparc: T.setArch(Triple::sparcv9); break;
1255 case Triple::x86: T.setArch(Triple::x86_64); break;
1256 case Triple::amdil: T.setArch(Triple::amdil64); break;
1257 case Triple::hsail: T.setArch(Triple::hsail64); break;
1258 case Triple::spir: T.setArch(Triple::spir64); break;
1259 case Triple::wasm32: T.setArch(Triple::wasm64); break;
1245 case Triple::arm: T.setArch(Triple::aarch64); break;
1246 case Triple::armeb: T.setArch(Triple::aarch64_be); break;
1247 case Triple::le32: T.setArch(Triple::le64); break;
1248 case Triple::mips: T.setArch(Triple::mips64); break;
1249 case Triple::mipsel: T.setArch(Triple::mips64el); break;
1250 case Triple::nvptx: T.setArch(Triple::nvptx64); break;
1251 case Triple::ppc: T.setArch(Triple::ppc64); break;
1252 case Triple::sparc: T.setArch(Triple::sparcv9); break;
1253 case Triple::x86: T.setArch(Triple::x86_64); break;
1254 case Triple::amdil: T.setArch(Triple::amdil64); break;
1255 case Triple::hsail: T.setArch(Triple::hsail64); break;
1256 case Triple::spir: T.setArch(Triple::spir64); break;
1257 case Triple::thumb: T.setArch(Triple::aarch64); break;
1258 case Triple::thumbeb: T.setArch(Triple::aarch64_be); break;
1259 case Triple::wasm32: T.setArch(Triple::wasm64); break;
12601260 }
12611261 return T;
12621262 }