1 #include "CodeGen_MIPS.h" 2 #include "LLVM_Headers.h" 3 #include "Util.h" 4 5 namespace Halide { 6 namespace Internal { 7 8 using std::string; 9 10 using namespace llvm; 11 CodeGen_MIPS(Target t)12CodeGen_MIPS::CodeGen_MIPS(Target t) 13 : CodeGen_Posix(t) { 14 #if !defined(WITH_MIPS) 15 user_error << "llvm build not configured with MIPS target enabled.\n"; 16 #endif 17 user_assert(llvm_Mips_enabled) << "llvm build not configured with MIPS target enabled.\n"; 18 } 19 mcpu() const20string CodeGen_MIPS::mcpu() const { 21 if (target.bits == 32) { 22 return ""; 23 } else { 24 return ""; 25 } 26 } 27 mattrs() const28string CodeGen_MIPS::mattrs() const { 29 if (target.bits == 32) { 30 return ""; 31 } else { 32 return "mips64r6"; 33 } 34 } 35 use_soft_float_abi() const36bool CodeGen_MIPS::use_soft_float_abi() const { 37 return false; 38 } 39 native_vector_bits() const40int CodeGen_MIPS::native_vector_bits() const { 41 return 128; 42 } 43 44 } // namespace Internal 45 } // namespace Halide 46