return NULL. This is less error-prone in asm_vm_call_method.
* src/vm/builtin.h: Likewise.
* src/vm/jit/alpha/asmpart.S (asm_vm_call_method_exception_handler):
Don't set v0 to NULL. This is now done in builtin_throw_exception.
* src/vm/jit/i386/asmpart.S: Likewise.
* src/vm/jit/mips/asmpart.S: Likewise.
* src/vm/jit/powerpc/asmpart.S: Likewise.
* src/vm/jit/x86_64/asmpart.S: Likewise.
calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 4732 2006-04-04 21:31:52Z edwin $
+ $Id: builtin.c 4749 2006-04-11 10:20:18Z twisti $
*/
}
-/************************** exception functions *******************************
+/* builtin_throw_exception *****************************************************
-******************************************************************************/
+ Sets the exceptionptr with the thrown exception and prints some
+ debugging information. Called from asm_vm_call_method.
+
+*******************************************************************************/
-java_objectheader *builtin_throw_exception(java_objectheader *xptr)
+void *builtin_throw_exception(java_objectheader *xptr)
{
#if !defined(NDEBUG)
java_lang_Throwable *t;
}
#endif /* !defined(NDEBUG) */
+ /* actually set the exception */
+
*exceptionptr = xptr;
- return xptr;
+ /* Return a NULL pointer. This is required for vm_call_method to
+ check for an exception. This is for convenience. */
+
+ return NULL;
}
Changes: Edwin Steiner
Christian Thalinger
- $Id: builtin.h 4357 2006-01-22 23:33:38Z twisti $
+ $Id: builtin.h 4749 2006-04-11 10:20:18Z twisti $
*/
s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass);
#define BUILTIN_arraycheckcast (functionptr) builtin_arraycheckcast
-java_objectheader *builtin_throw_exception(java_objectheader *exception);
+void *builtin_throw_exception(java_objectheader *exception);
/* NOT AN OP */
java_objectheader *builtin_trace_exception(java_objectheader *xptr,
methodinfo *m,
Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 4735 2006-04-05 10:02:14Z twisti $
+ $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
*/
ldq ra,0*8(sp) /* restore return address */
ldq s6,3*8(sp)
lda sp,5*8(sp) /* free stack space */
- mov zero,v0 /* return NULL */
jmp zero,(ra)
.end asm_vm_call_method
Changes: Joseph Wenninger
Edwin Steiner
- $Id: asmpart.S 4732 2006-04-04 21:31:52Z edwin $
+ $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
*/
push xptr /* pass exception pointer */
call builtin_throw_exception
add $4,sp
- xor v0,v0 /* return NULL */
jmp L_asm_vm_call_method_return
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 4735 2006-04-05 10:02:14Z twisti $
+ $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
*/
aaddu sp,s7,sp
move a0,itmp1
jal builtin_throw_exception
- move v0,zero /* clear return value for exception */
b calljava_return2
.end asm_vm_call_method
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 4735 2006-04-05 10:02:14Z twisti $
+ $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
*/
asm_vm_call_method_exception_handler:
mr r3,itmp1
bl builtin_throw_exception
- li v0,0 /* return NULL */
b L_asm_vm_call_method_return
Changes: Edwin Steiner
- $Id: asmpart.S 4735 2006-04-05 10:02:14Z twisti $
+ $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
*/
asm_vm_call_method_exception_handler:
mov xptr,a0 /* pass exception pointer */
call builtin_throw_exception@PLT
- xor v0,v0 /* return NULL */
jmp L_asm_vm_call_method_return