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