Support Val in the sparc/emit.mlp

Not tested, but without it just can't compile anything

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16392 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jérémie Dimino 2015-08-25 16:18:54 +00:00
parent 766a5adf41
commit 843aef33bd
1 changed files with 5 additions and 5 deletions

View File

@ -54,7 +54,7 @@ let slot_offset loc cl =
(* Return the other register in a register pair *)
let next_in_pair = function
{loc = Reg r; typ = (Int | Addr)} -> phys_reg (r + 1)
{loc = Reg r; typ = (Int | Addr | Val)} -> phys_reg (r + 1)
| {loc = Reg r; typ = Float} -> phys_reg (r + 16)
| _ -> fatal_error "Emit.next_in_pair"
@ -275,7 +275,7 @@ let rec emit_instr i dslot =
| Lop(Imove | Ispill | Ireload) ->
let src = i.arg.(0) and dst = i.res.(0) in
begin match (src, dst) with
{loc = Reg rs; typ = (Int | Addr)}, {loc = Reg rd} ->
{loc = Reg rs; typ = (Int | Addr | Val)}, {loc = Reg rd} ->
` mov {emit_reg src}, {emit_reg dst}\n`
| {loc = Reg rs; typ = Float}, {loc = Reg rd; typ = Float} ->
if !arch_version = SPARC_V9 then
@ -284,7 +284,7 @@ let rec emit_instr i dslot =
` fmovs {emit_reg src}, {emit_reg dst}\n`;
` fmovs {emit_reg(next_in_pair src)}, {emit_reg(next_in_pair dst)}\n`
end
| {loc = Reg rs; typ = Float}, {loc = Reg rd; typ = (Int | Addr)} ->
| {loc = Reg rs; typ = Float}, {loc = Reg rd; typ = (Int | Addr | Val)} ->
(* This happens when calling C functions and passing a float arg
in %o0...%o5 *)
` sub %sp, 8, %sp\n`;
@ -301,11 +301,11 @@ let rec emit_instr i dslot =
fatal_error "Emit: Imove Float [| _; _ |]"
end;
` add %sp, 8, %sp\n`
| {loc = Reg rs; typ = (Int | Addr)}, {loc = Stack sd} ->
| {loc = Reg rs; typ = (Int | Addr | Val)}, {loc = Stack sd} ->
` st {emit_reg src}, {emit_stack dst}\n`
| {loc = Reg rs; typ = Float}, {loc = Stack sd} ->
` std {emit_reg src}, {emit_stack dst}\n`
| {loc = Stack ss; typ = (Int | Addr)}, {loc = Reg rd} ->
| {loc = Stack ss; typ = (Int | Addr | Val)}, {loc = Reg rd} ->
` ld {emit_stack src}, {emit_reg dst}\n`
| {loc = Stack ss; typ = Float}, {loc = Reg rd} ->
` ldd {emit_stack src}, {emit_reg dst}\n`