Anonymous avatar Anonymous committed d6110e3

PPC64 _emit_call

Comments (0)

Files changed (1)

pypy/jit/backend/ppc/ppcgen/opassembler.py

         remap_frame_layout(self, non_float_locs, non_float_regs, r.r0)
 
         #the actual call
-        self.mc.bl_abs(adr)
+        if IS_PPC_32:
+            self.mc.bl_abs(adr)
+        else:
+            self.mc.std(r.r2.value, r.SP.value, 40)
+            self.mc.load_from_addr(r.r0, adr)
+            self.mc.load_from_addr(r.r2, adr+WORD)
+            self.mc.load_from_addr(r.r11, adr+2*WORD)
+            self.mc.mtctr(r.r0.value)
+            self.mc.bctrl()
+            self.mc.ld(r.r2.value, r.SP.value, 40)
+
         self.mark_gc_roots(force_index)
         regalloc.possibly_free_vars(args)
         # readjust the sp in case we passed some args on the stack
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.