OCaml ppc64 support

David Woodhouse dwmw2 at infradead.org
Wed May 30 18:37:32 UTC 2012


On Wed, 2012-05-30 at 19:33 +0100, David Woodhouse wrote:
> If upstream has a ppc64 port now, I'd definitely be looking at merging
> with it. Darwin *does* use ELF, so it's fairly much the back end you're
> looking for. I imagine you'd just need to port over the asm-agnostic
> features of the ppc32 back end (which are probably present in my ppc64
> back end because I wouldn't have ripped them out).

That's this kind of thing in emit.mlp...

+(* Output a "upper 16 bits" or "lower 16 bits" operator. *)
+
+let emit_upper emit_fun arg =
+  match Config.system with
+  | "elf" | "bsd" ->
+      emit_fun arg; emit_string "@ha"
+  | "rhapsody" ->
+      emit_string "ha16("; emit_fun arg; emit_string ")"
+  | _ -> assert false
+
+let emit_lower emit_fun arg =
+  match Config.system with
+  | "elf" | "bsd" ->
+      emit_fun arg; emit_string "@l"
+  | "rhapsody" ->
+      emit_string "lo16("; emit_fun arg; emit_string ")"
+  | _ -> assert false
+

It'd definitely be interesting to see how far you can get by
re-introducing this abstraction into the upstream ppc64 back end.

-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6171 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ppc/attachments/20120530/69de2cc8/attachment-0001.bin>


More information about the ppc mailing list