Mercurial > hg > graal-compiler
diff src/cpu/sparc/vm/interpreterRT_sparc.cpp @ 1506:2338d41fbd81
6943304: remove tagged stack interpreter
Reviewed-by: coleenp, never, gbenson
author | twisti |
---|---|
date | Fri, 30 Apr 2010 08:37:24 -0700 |
parents | 6b2273dd6fa9 |
children | c18cbe5936b8 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/interpreterRT_sparc.cpp Fri Apr 30 04:27:25 2010 -0700 +++ b/src/cpu/sparc/vm/interpreterRT_sparc.cpp Fri Apr 30 08:37:24 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,19 +43,6 @@ Argument jni_arg(jni_offset(), false); Register Rtmp = O0; -#ifdef ASSERT - if (TaggedStackInterpreter) { - // check at least one tag is okay - Label ok; - __ ld_ptr(Llocals, Interpreter::local_tag_offset_in_bytes(offset() + 1), Rtmp); - __ cmp(Rtmp, G0); - __ brx(Assembler::equal, false, Assembler::pt, ok); - __ delayed()->nop(); - __ stop("Native object has bad tag value"); - __ bind(ok); - } -#endif // ASSERT - #ifdef _LP64 __ ldx(Llocals, Interpreter::local_offset_in_bytes(offset() + 1), Rtmp); __ store_long_argument(Rtmp, jni_arg); @@ -107,18 +94,6 @@ Address h_arg = Address(Llocals, Interpreter::local_offset_in_bytes(offset())); __ ld_ptr(h_arg, Rtmp1); -#ifdef ASSERT - if (TaggedStackInterpreter) { - // check we have the obj and not the tag - Label ok; - __ mov(frame::TagReference, Rtmp3); - __ cmp(Rtmp1, Rtmp3); - __ brx(Assembler::notEqual, true, Assembler::pt, ok); - __ delayed()->nop(); - __ stop("Native object passed tag by mistake"); - __ bind(ok); - } -#endif // ASSERT if (!do_NULL_check) { __ add(h_arg.base(), h_arg.disp(), Rtmp2); } else { @@ -168,17 +143,9 @@ long_sig = 3 }; -#ifdef ASSERT - void verify_tag(frame::Tag t) { - assert(!TaggedStackInterpreter || - *(intptr_t*)(_from+Interpreter::local_tag_offset_in_bytes(0)) == t, "wrong tag"); - } -#endif // ASSERT - virtual void pass_int() { *_to++ = *(jint *)(_from+Interpreter::local_offset_in_bytes(0)); - debug_only(verify_tag(frame::TagValue)); - _from -= Interpreter::stackElementSize(); + _from -= Interpreter::stackElementSize; add_signature( non_float ); } @@ -186,31 +153,27 @@ // pass address of from intptr_t *from_addr = (intptr_t*)(_from + Interpreter::local_offset_in_bytes(0)); *_to++ = (*from_addr == 0) ? NULL : (intptr_t) from_addr; - debug_only(verify_tag(frame::TagReference)); - _from -= Interpreter::stackElementSize(); + _from -= Interpreter::stackElementSize; add_signature( non_float ); } #ifdef _LP64 virtual void pass_float() { *_to++ = *(jint *)(_from+Interpreter::local_offset_in_bytes(0)); - debug_only(verify_tag(frame::TagValue)); - _from -= Interpreter::stackElementSize(); + _from -= Interpreter::stackElementSize; add_signature( float_sig ); } virtual void pass_double() { *_to++ = *(intptr_t*)(_from+Interpreter::local_offset_in_bytes(1)); - debug_only(verify_tag(frame::TagValue)); - _from -= 2*Interpreter::stackElementSize(); + _from -= 2*Interpreter::stackElementSize; add_signature( double_sig ); } virtual void pass_long() { _to[0] = *(intptr_t*)(_from+Interpreter::local_offset_in_bytes(1)); - debug_only(verify_tag(frame::TagValue)); _to += 1; - _from -= 2*Interpreter::stackElementSize(); + _from -= 2*Interpreter::stackElementSize; add_signature( long_sig ); } #else @@ -218,9 +181,8 @@ virtual void pass_long() { _to[0] = *(intptr_t*)(_from+Interpreter::local_offset_in_bytes(1)); _to[1] = *(intptr_t*)(_from+Interpreter::local_offset_in_bytes(0)); - debug_only(verify_tag(frame::TagValue)); _to += 2; - _from -= 2*Interpreter::stackElementSize(); + _from -= 2*Interpreter::stackElementSize; add_signature( non_float ); } #endif // _LP64