aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Regalloc.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-08-29 14:54:06 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-08-29 14:54:06 +0200
commit5cf814404cec9a8702e4bfa88e0f9176fa04ecfb (patch)
treefabd44046e3e5b9aaac7f33b9e4dddaa8d3f06e8 /backend/Regalloc.ml
parent3208e22ea89c459a5a7944ad8e82511d4a5328fa (diff)
parent477f73ef96d957de5a896a05175ceaab7e0dce03 (diff)
downloadcompcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.tar.gz
compcert-5cf814404cec9a8702e4bfa88e0f9176fa04ecfb.zip
Merge branch 'master' into advanced-diagnostics
Diffstat (limited to 'backend/Regalloc.ml')
-rw-r--r--backend/Regalloc.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/Regalloc.ml b/backend/Regalloc.ml
index e6e07339..0013d91a 100644
--- a/backend/Regalloc.ml
+++ b/backend/Regalloc.ml
@@ -915,7 +915,12 @@ let spill_instr tospill eqs instr =
| false, true ->
let eqs1 = add arg1 res (kill res eqs) in
let (argl', c1, eqs2) = reload_vars tospill eqs1 argl in
- (Xreload(arg1, res) :: c1 @ [Xop(op, res :: argl', res)],
+ (* PR#113, PR#122: [Xreload] here causes [res] to become
+ unspillable in the future. This is too strong, hence
+ the [Xmove]. Alternatively, this [false, true]
+ case could be removed and the [true, true] case
+ below used instead. *)
+ (Xmove(arg1, res) :: c1 @ [Xop(op, res :: argl', res)],
kill res eqs2)
| true, true ->
let tmp = new_temp (typeof res) in