We should return FPU register when type == REG_TYPE_FPU and
no free register is found.

Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 jit/linear-scan.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/jit/linear-scan.c b/jit/linear-scan.c
index 21dd112..5d5599d 100644
--- a/jit/linear-scan.c
+++ b/jit/linear-scan.c
@@ -91,7 +91,12 @@ static void set_block_pos(unsigned long *block_pos, unsigned 
long *use_pos,
 static enum machine_reg pick_register(unsigned long *free_until_pos, enum 
machine_reg_type type)
 {
        unsigned long max_pos = 0;
-       int i, ret = 0;
+       int i, ret;
+
+       if (type == REG_TYPE_FPU)
+               ret = MACH_REG_XMM0;
+       else
+               ret = MACH_REG_EAX;
 
        for (i = 0; i < NR_REGISTERS; i++) {
                unsigned long pos = free_until_pos[i];
-- 
1.6.0.6


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to