aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Regalloc.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-19 09:54:40 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-19 09:54:40 +0000
commitbe4d6e42dfa287b93b1a35ec820ab2a5aaf8c7ec (patch)
treec51b66e9154bc64cf4fd4191251f29d102928841 /backend/Regalloc.ml
parent60e1fd71c7e97b2214daf574e0f41b55a3e0bceb (diff)
downloadcompcert-be4d6e42dfa287b93b1a35ec820ab2a5aaf8c7ec.tar.gz
compcert-be4d6e42dfa287b93b1a35ec820ab2a5aaf8c7ec.zip
Merge of the float32 branch:
- added RTL type "Tsingle" - ABI-compatible passing of single-precision floats on ARM and x86 git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2260 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Regalloc.ml')
-rw-r--r--backend/Regalloc.ml14
1 files changed, 12 insertions, 2 deletions
diff --git a/backend/Regalloc.ml b/backend/Regalloc.ml
index 179b2cca..f8cd561f 100644
--- a/backend/Regalloc.ml
+++ b/backend/Regalloc.ml
@@ -481,7 +481,17 @@ let add_interfs_instr g instr live =
add_interfs_list g ftmp srcs; add_interfs_list g ftmp dsts;
(* Take into account destroyed reg when accessing Incoming param *)
if List.exists (function (L(S(Incoming, _, _))) -> true | _ -> false) srcs
- then add_interfs_list g (vmreg temp_for_parent_frame) dsts
+ then add_interfs_list g (vmreg temp_for_parent_frame) dsts;
+ (* Take into account destroyed reg when initializing Outgoing
+ arguments of type Tsingle *)
+ if List.exists
+ (function (L(S(Outgoing, _, Tsingle))) -> true | _ -> false) dsts
+ then
+ List.iter
+ (fun mr ->
+ add_interfs_list g (vmreg mr) srcs;
+ IRC.add_interf g (vmreg mr) ftmp)
+ (destroyed_by_setstack Tsingle)
| Xop(op, args, res) ->
begin match is_two_address op args with
| None ->
@@ -825,7 +835,7 @@ let make_parmove srcs dsts itmp ftmp k =
assert (Array.length dst = n);
let status = Array.make n To_move in
let temp_for =
- function Tint -> itmp | Tfloat -> ftmp | Tlong -> assert false in
+ function Tint -> itmp | (Tfloat|Tsingle) -> ftmp | Tlong -> assert false in
let code = ref [] in
let add_move s d =
match s, d with