aboutsummaryrefslogtreecommitdiffstats
path: root/backend/IRC.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-21 22:39:27 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-21 22:39:27 +0100
commit23fa2a18e015b9d330ad6f1f08cf50adf90bd80b (patch)
treee3e39eebc5164b967db9b16504bfe19edc4d2bdc /backend/IRC.ml
parentab5528fb4caf637a0c7014d943302198079e7c20 (diff)
downloadcompcert-kvx-23fa2a18e015b9d330ad6f1f08cf50adf90bd80b.tar.gz
compcert-kvx-23fa2a18e015b9d330ad6f1f08cf50adf90bd80b.zip
try to be portable across archs
Diffstat (limited to 'backend/IRC.ml')
-rw-r--r--backend/IRC.ml9
1 files changed, 3 insertions, 6 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