]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - offlineasm/backends.rb
JavaScriptCore-1218.tar.gz
[apple/javascriptcore.git] / offlineasm / backends.rb
index db7a1e218f84c1cc013d767827734e425cdea572..52041214c56b15dd130223d5ea783343a83b3d43 100644 (file)
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-require "armv7"
+require "config"
+require "arm64"
+require "arm"
+require "arm64"
 require "ast"
 require "x86"
 require "ast"
 require "x86"
+require "mips"
+require "sh4"
+require "cloop"
 
 BACKENDS =
     [
      "X86",
      "X86_64",
 
 BACKENDS =
     [
      "X86",
      "X86_64",
-     "ARMv7"
+     "ARM",
+     "ARMv7",
+     "ARMv7_TRADITIONAL",
+     "ARM64",
+     "MIPS",
+     "SH4",
+     "C_LOOP"
     ]
 
 # Keep the set of working backends separate from the set of backends that might be
     ]
 
 # Keep the set of working backends separate from the set of backends that might be
@@ -41,7 +53,13 @@ WORKING_BACKENDS =
     [
      "X86",
      "X86_64",
     [
      "X86",
      "X86_64",
-     "ARMv7"
+     "ARM",
+     "ARMv7",
+     "ARMv7_TRADITIONAL",
+     "ARM64",
+     "MIPS",
+     "SH4",
+     "C_LOOP"
     ]
 
 BACKEND_PATTERN = Regexp.new('\\A(' + BACKENDS.join(')|(') + ')\\Z')
     ]
 
 BACKEND_PATTERN = Regexp.new('\\A(' + BACKENDS.join(')|(') + ')\\Z')
@@ -52,7 +70,8 @@ class Node
             $activeBackend = name
             send("lower" + name)
         rescue => e
             $activeBackend = name
             send("lower" + name)
         rescue => e
-            raise "Got error #{e} at #{codeOriginString}"
+            e.message << "At #{codeOriginString}"
+            raise e
         end
     end
 end
         end
     end
 end
@@ -75,12 +94,18 @@ class LabelReference
     def asmLabel
         Assembler.labelReference(name[1..-1])
     end
     def asmLabel
         Assembler.labelReference(name[1..-1])
     end
+    def cLabel
+        Assembler.cLabelReference(name[1..-1])
+    end
 end
 
 class LocalLabelReference
     def asmLabel
         Assembler.localLabelReference("_offlineasm_"+name[1..-1])
     end
 end
 
 class LocalLabelReference
     def asmLabel
         Assembler.localLabelReference("_offlineasm_"+name[1..-1])
     end
+    def cLabel
+        Assembler.cLocalLabelReference("_offlineasm_"+name[1..-1])
+    end
 end
 
 class Skip
 end
 
 class Skip