From 9910e310cb4ce1cf95f9223d42e45266c0833dd7 Mon Sep 17 00:00:00 2001 From: Josh warner Date: Mon, 10 Aug 2009 13:42:37 -0600 Subject: [PATCH] fixed register reserve logic in pickTarget --- src/compiler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 52d3dbfa99..b1a4251bbb 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1317,11 +1317,10 @@ pickTarget(Context* c, Read* read, bool intersectRead, registerPenalty = (c->floatRegisterCount > registerReserveCount ? 0 : Target::LowRegisterPenalty); } else { - registerPenalty = (c->availableRegisterCount > registerReserveCount - ? 0 : Target::LowRegisterPenalty); + abort(c); } } else { - registerPenalty = (c->availableRegisterCount > registerReserveCount + registerPenalty = (c->generalRegisterCount > registerReserveCount || c->floatRegisterCount > registerReserveCount ? 0 : Target::LowRegisterPenalty); }