Mercurial > hg > release > icedtea6-1.8
changeset 1880:c4148e0a2984
Synchronize Zero with upstream
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Mon, 15 Feb 2010 11:41:03 +0000 |
parents | fc600c234771 |
children | d9b5a2ba9523 |
files | ChangeLog ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp |
diffstat | 4 files changed, 44 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Feb 12 13:24:25 2010 +0000 +++ b/ChangeLog Mon Feb 15 11:41:03 2010 +0000 @@ -1,3 +1,14 @@ +2010-02-15 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp + (CppInterpreter::result_type_of): New method. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp + (CppInterpreter::result_type_of): Likewise. + (CppInterpreter::main_loop): Use the above. + (CppInterpreter::native_entry): Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp + (os::is_allocatable): s/AMD64/_LP64/. + 2010-02-12 Gary Benson <gbenson@redhat.com> * configure.ac: Strip stupid options that llvm-config supplies.
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Fri Feb 12 13:24:25 2010 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Feb 15 11:41:03 2010 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 2009 Red Hat, Inc. + * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -145,7 +145,7 @@ } else if (istate->msg() == BytecodeInterpreter::return_from_method) { // Copy the result into the caller's frame - result_slots = type2size[method->result_type()]; + result_slots = type2size[result_type_of(method)]; assert(result_slots >= 0 && result_slots <= 2, "what?"); result = istate->stack() + result_slots; break; @@ -394,9 +394,10 @@ // Push our result if (!HAS_PENDING_EXCEPTION) { - stack->set_sp(stack->sp() - type2size[method->result_type()]); + BasicType type = result_type_of(method); + stack->set_sp(stack->sp() - type2size[type]); - switch (method->result_type()) { + switch (type) { case T_VOID: break; @@ -707,6 +708,26 @@ return i; } +BasicType CppInterpreter::result_type_of(methodOop method) { + BasicType t; + switch (method->result_index()) { + case 0 : t = T_BOOLEAN; break; + case 1 : t = T_CHAR; break; + case 2 : t = T_BYTE; break; + case 3 : t = T_SHORT; break; + case 4 : t = T_INT; break; + case 5 : t = T_LONG; break; + case 6 : t = T_VOID; break; + case 7 : t = T_FLOAT; break; + case 8 : t = T_DOUBLE; break; + case 9 : t = T_OBJECT; break; + default: ShouldNotReachHere(); + } + assert(AbstractInterpreter::BasicType_as_index(t) == method->result_index(), + "out of step with AbstractInterpreter::BasicType_as_index"); + return t; +} + address InterpreterGenerator::generate_empty_entry() { if (!UseFastEmptyMethods) return NULL;
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Fri Feb 12 13:24:25 2010 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Mon Feb 15 11:41:03 2010 +0000 @@ -1,6 +1,6 @@ /* * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 2008, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,3 +41,7 @@ private: // Stack overflow checks static bool stack_overflow_imminent(JavaThread *thread); + + private: + // Fast result type determination + static BasicType result_type_of(methodOop method);
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Feb 12 13:24:25 2010 +0000 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Mon Feb 15 11:41:03 2010 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -249,11 +249,9 @@ } bool os::is_allocatable(size_t bytes) { -#ifdef AMD64 - // unused on amd64? +#ifdef _LP64 return true; #else - if (bytes < 2 * G) { return true; } @@ -265,7 +263,7 @@ } return addr != NULL; -#endif // AMD64 +#endif // _LP64 } ///////////////////////////////////////////////////////////////////////////////