[MIPS] Add support for 64b MIPS architecture

* LLVM reactor backend: requires LLVM 7.0
* Subzero reactor backend: not supported

Bug: b/117854176
Change-Id: I7b76ebf854f65c2d111552552bd5a81c049d3b50
Reviewed-on: https://swiftshader-review.googlesource.com/c/22308
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Gordana Cmiljanovic <gordana.cmiljanovic@mips.com>
diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn
index 1ad06e4..e05154e 100644
--- a/src/Reactor/BUILD.gn
+++ b/src/Reactor/BUILD.gn
@@ -15,8 +15,9 @@
 import("../swiftshader.gni")
 
 declare_args() {
-  # Subzero produces smaller binaries, but doesn't support ARM64.
-  use_swiftshader_with_subzero = (target_cpu != "arm64")
+  # Subzero produces smaller binaries, but doesn't support ARM64 and MIPS64.
+  use_swiftshader_with_subzero =
+      target_cpu != "arm64" && target_cpu != "mips64el"
 }
 
 # Need a separate config to ensure the warnings are added to the end.
diff --git a/src/Reactor/LLVMReactor.cpp b/src/Reactor/LLVMReactor.cpp
index f7cbfab..6f99e6e 100644
--- a/src/Reactor/LLVMReactor.cpp
+++ b/src/Reactor/LLVMReactor.cpp
@@ -830,7 +830,11 @@
 		#elif defined(__arm__)
 			static const char arch[] = "arm";
 		#elif defined(__mips__)
-			static const char arch[] = "mipsel";
+			#if defined(__mips64)
+			    static const char arch[] = "mips64el";
+			#else
+			    static const char arch[] = "mipsel";
+			#endif
 		#else
 		#error "unknown architecture"
 		#endif