components/desktop/firefox/patches/firefox16-48-sparc-lea.patch
author Stacy Yeh <stacy.yeh@oracle.com>
Mon, 11 Jan 2016 09:27:45 -0800
changeset 5255 cea0e462549a
permissions -rw-r--r--
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland

Implements PolyIC for sparc. 
This is going away in the future so no need to send upstream. 

--- mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h.orig	2015-06-04 17:42:51.582947696 -0700
+++ mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h	2015-06-04 17:42:51.585565407 -0700
@@ -1005,9 +1005,12 @@
 
         void lea(BaseIndex address, RegisterID dest)
         {
-            // lea only used by PolyIC.
-            // PolyIC is not enabled for sparc now.
-            ASSERT(0);
+            move(address.index, dest);
+            if (address.scale != 0)
+                lshift32(Imm32(address.scale), dest);
+            if (address.offset)
+                add32(Imm32(address.offset), dest);
+            add32(address.base, dest);
         }
 
         void add32(Imm32 imm, AbsoluteAddress address)