aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-22 08:08:44 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-22 08:08:44 +0100
commitba2b825a42807102a93cd6df1ce90b41d415569c (patch)
tree524791f9b646591b6afb9d1edaef906e7d32875a /backend
parentc4661a0181e6db3aa4a36939bdbea5948eadb6c9 (diff)
parent49ea6f7d4b9e18f8aa740d068bb3fb9e49596e00 (diff)
downloadcompcert-kvx-ba2b825a42807102a93cd6df1ce90b41d415569c.tar.gz
compcert-kvx-ba2b825a42807102a93cd6df1ce90b41d415569c.zip
Merge branch 'mppa_postpass' into mppa-mul
Diffstat (limited to 'backend')
-rw-r--r--backend/IRC.ml9
-rw-r--r--backend/IRC.mli1
-rw-r--r--backend/Regalloc.ml2
3 files changed, 4 insertions, 8 deletions
diff --git a/backend/IRC.ml b/backend/IRC.ml
index c7b1bf04..67da47da 100644
--- a/backend/IRC.ml
+++ b/backend/IRC.ml
@@ -15,6 +15,7 @@ open Camlcoq
open AST
open Registers
open Machregs
+open Machregsaux
open Locations
open Conventions1
open XTL
@@ -237,13 +238,9 @@ type graph = {
according to their types. A variable can be forced into class 2
by giving it a negative spill cost. *)
-let class_of_type = function
- | Tint | Tlong -> 0
- | Tfloat | Tsingle -> 0 (* normal: 1 *)
- | Tany32 | Tany64 -> assert false
-let class_of_reg r = 0
- (* normal: if Conventions1.is_float_reg r then 1 else 0 *)
+let class_of_reg r =
+ if Conventions1.is_float_reg r then 1 else 0
let class_of_loc = function
| R r -> class_of_reg r
diff --git a/backend/IRC.mli b/backend/IRC.mli
index 30b6d5c1..f7bbf9c5 100644
--- a/backend/IRC.mli
+++ b/backend/IRC.mli
@@ -43,5 +43,4 @@ val coloring: graph -> (var -> loc)
val reserved_registers: mreg list ref
(* Auxiliaries to deal with register classes *)
-val class_of_type: AST.typ -> int
val class_of_loc: loc -> int
diff --git a/backend/Regalloc.ml b/backend/Regalloc.ml
index 19aba4f6..7db8a866 100644
--- a/backend/Regalloc.ml
+++ b/backend/Regalloc.ml
@@ -1067,7 +1067,7 @@ let make_parmove srcs dsts itmp ftmp k =
| Locations.S(sl, ofs, ty), R rd ->
code := LTL.Lgetstack(sl, ofs, ty, rd) :: !code
| Locations.S(sls, ofss, tys), Locations.S(sld, ofsd, tyd) ->
- let tmp = temp_for (class_of_type tys) in
+ let tmp = temp_for (Machregsaux.class_of_type tys) in
(* code will be reversed at the end *)
code := LTL.Lsetstack(tmp, sld, ofsd, tyd) ::
LTL.Lgetstack(sls, ofss, tys, tmp) :: !code