diff options
Diffstat (limited to 'asmcomp/interf.ml')
-rw-r--r-- | asmcomp/interf.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/asmcomp/interf.ml b/asmcomp/interf.ml index 77acb78a4..2d541eeee 100644 --- a/asmcomp/interf.ml +++ b/asmcomp/interf.ml @@ -111,17 +111,21 @@ let build_graph fundecl = | Itrywith(body, handler) -> add_interf_set Proc.destroyed_at_raise handler.live; interf body; interf handler; interf i.next - | Iraise -> () in + | Iraise _ -> () in (* Add a preference from one reg to another. Do not add anything if the two registers conflict, - or if the source register already has a location. *) + or if the source register already has a location, + or if the two registers belong to different classes. + (The last case can occur e.g. on Sparc when passing + float arguments in integer registers, PR#6227.) *) let add_pref weight r1 r2 = if weight > 0 then begin let i = r1.stamp and j = r2.stamp in if i <> j && r1.loc = Unknown + && Proc.register_class r1 = Proc.register_class r2 && (let p = if i < j then (i, j) else (j, i) in not (IntPairSet.mem p !mat)) then r1.prefer <- (r2, weight) :: r1.prefer @@ -178,7 +182,7 @@ let build_graph fundecl = () | Itrywith(body, handler) -> prefer weight body; prefer weight handler; prefer weight i.next - | Iraise -> () + | Iraise _ -> () in interf fundecl.fun_body; prefer 8 fundecl.fun_body |