Changes: Edwin Steiner
- $Id: exceptions.c 4690 2006-03-27 11:37:46Z twisti $
+ $Id: exceptions.c 4707 2006-03-30 09:52:49Z twisti $
*/
ex--;
+ /* If the start and end PC is NULL, this means we have the special case of asm_vm_call_method. So, just return the proper exception handler. */
+
+ if ((ex->startpc == NULL) && (ex->endpc == NULL))
+ return (u1 *) &asm_vm_call_method_exception_handler;
+
/* is the xpc is the current catch range */
if ((ex->startpc <= xpc) && (xpc < ex->endpc)) {
Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 4666 2006-03-21 07:57:11Z edwin $
+ $Id: asmpart.S 4707 2006-03-30 09:52:49Z twisti $
*/
.globl asm_vm_call_method_long
.globl asm_vm_call_method_float
.globl asm_vm_call_method_double
+ .globl asm_vm_call_method_exception_handler
.globl asm_call_jit_compiler
.globl asm_handle_exception
.align 3
.quad 0 /* catch type all */
- .quad calljava_xhandler2 /* handler pc */
- .quad calljava_xhandler2 /* end pc */
- .quad asm_vm_call_method /* start pc */
+ .quad 0 /* handler pc */
+ .quad 0 /* end pc */
+ .quad 0 /* start pc */
.long 1 /* extable size */
.long 0 /* ALIGNMENT PADDING */
.quad 0 /* line number table start */
calljava_ret2:
jmp zero,(ra)
-calljava_xhandler2:
+asm_vm_call_method_exception_handler:
s8addq s6,sp,sp
ldq gp,1*8(sp) /* restore global pointer */
+#if !defined(NDEBUG)
mov itmp1,a0
jsr ra,builtin_throw_exception
+#endif
ldq ra,0*8(sp) /* restore return address */
ldq s6,3*8(sp)
lda sp,5*8(sp) /* free stack space */
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.h 4631 2006-03-16 14:19:52Z twisti $
+ $Id: asmpart.h 4707 2006-03-30 09:52:49Z twisti $
*/
#include "vm/linker.h"
#include "vm/resolve.h"
#include "vm/vm.h"
-#include "vm/jit/stacktrace.h"
#include "vm/jit/replace.h"
+#include "vm/jit/stacktrace.h"
/* some macros ****************************************************************/
s8 asm_vm_call_method_long(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
float asm_vm_call_method_float(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
double asm_vm_call_method_double(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
+
+void asm_vm_call_method_exception_handler(void);
#endif
#if defined(ENABLE_INTRP)
Changes: Joseph Wenninger
Edwin Steiner
- $Id: asmpart.S 4677 2006-03-22 20:59:49Z edwin $
+ $Id: asmpart.S 4707 2006-03-30 09:52:49Z twisti $
*/
.text
-/* exported functions and variables *******************************************/
+/* export functions ***********************************************************/
.globl asm_md_init
.globl asm_vm_call_method_long
.globl asm_vm_call_method_float
.globl asm_vm_call_method_double
+ .globl asm_vm_call_method_exception_handler
.globl asm_call_jit_compiler
.globl asm_handle_nat_exception
.align 8
.long 0 /* catch type all */
- .long calljava_xhandler2 /* handler pc */
- .long calljava_xhandler2 /* end pc */
- .long L_asm_vm_call_method /* start pc */
+ .long 0 /* handler pc */
+ .long 0 /* end pc */
+ .long 0 /* start pc */
.long 1 /* extable size */
.long 0 /* line number table start */
.long 0 /* line number table size */
asm_vm_call_method_long:
asm_vm_call_method_float:
asm_vm_call_method_double:
-L_asm_vm_call_method: /* required for PIC code */
push bp
mov sp,bp /* save stackptr */
sub $(4*4),sp /* create stackframe */
leave
ret
-calljava_xhandler2:
+asm_vm_call_method_exception_handler:
+#if !defined(NDEBUG)
push xptr /* pass exception pointer */
call builtin_throw_exception
add $4,sp
+#endif
xor v0,v0 /* return NULL */
jmp L_asm_vm_call_method_return
Authors: Andreas Krall
Changes: Christian Thalinger
- Edwin Steiner
+ Edwin Steiner
- $Id: asmpart.S 4706 2006-03-30 09:20:42Z twisti $
+ $Id: asmpart.S 4707 2006-03-30 09:52:49Z twisti $
*/
.globl asm_vm_call_method_long
.globl asm_vm_call_method_float
.globl asm_vm_call_method_double
+ .globl asm_vm_call_method_exception_handler
.globl asm_call_jit_compiler
.globl asm_handle_exception
.align 3
.dword 0 /* catch type all */
- .dword calljava_xhandler2 /* handler pc */
- .dword calljava_xhandler2 /* end pc */
- .dword asm_vm_call_method /* start pc */
+ .dword 0 /* handler pc */
+ .dword 0 /* end pc */
+ .dword 0 /* start pc */
.word 1 /* extable size */
.word 0 /* 4-byte ALIGNMENT PADDING */
.dword 0 /* line number table start */
aaddiu sp,sp,12*8 /* free stack space */
j ra /* return */
-calljava_xhandler2:
+asm_vm_call_method_exception_handler:
asll s7,s7,3
aaddu sp,s7,sp
+#if !defined(NDEBUG)
move a0,itmp1
jal builtin_throw_exception
+#endif
move v0,zero /* clear return value for exception */
b calljava_return2
Changes: Edwin Steiner
- $Id: asmpart.S 4690 2006-03-27 11:37:46Z twisti $
+ $Id: asmpart.S 4707 2006-03-30 09:52:49Z twisti $
*/
.text
-/* exported functions and variables *******************************************/
+/* export functions ***********************************************************/
.globl asm_vm_call_method
.globl asm_vm_call_method_int
.globl asm_vm_call_method_long
.globl asm_vm_call_method_float
.globl asm_vm_call_method_double
+ .globl asm_vm_call_method_exception_handler
.globl asm_call_jit_compiler
.globl asm_handle_exception
.align 8
.quad 0 /* catch type all */
- .quad calljava_xhandler2 /* handler pc */
- .quad calljava_xhandler2 /* end pc */
- .quad L_asm_vm_call_method /* start pc */
+ .quad 0 /* handler pc */
+ .quad 0 /* end pc */
+ .quad 0 /* start pc */
.long 1 /* extable size */
.long 0
.quad 0 /* line number table start */
.long 0 /* intsave */
.long 0 /* isleaf */
.long 0 /* IsSync */
- .long 24 /* frame size */
+ .long 0 /* frame size */
.quad 0 /* method pointer (pointer to name) */
asm_vm_call_method:
asm_vm_call_method_long:
asm_vm_call_method_float:
asm_vm_call_method_double:
-L_asm_vm_call_method: /* required for PIC code */
sub $(7*8),sp /* keep stack 16-byte aligned */
mov %rbx,0*8(sp) /* %rbx is not a callee saved in cacao*/
mov s0,1*8(sp)
add $(7*8),sp /* free stack space */
ret
-calljava_xhandler2:
+asm_vm_call_method_exception_handler:
#if !defined(NDEBUG)
mov xptr,a0 /* pass exception pointer */
call builtin_throw_exception@PLT