(abi_registers_float_saved): Fixed.
* src/vm/jit/m68k/emit.c (emit_classcast_check): Fixed.
* src/vm/jit/m68k/codegen.c (codegen_emit): Temporary hacked
a field for saved adr registers until real patch will be done.
(ICMD_INSTANCEOF): Fixed.
(ICMD_CHECKCAST): Fixed.
(codegen_emit_stub_compiler): Removed useless code.
* src/vm/jit/m68k/asmpart.S (L_asm_handle_exception_not_catched):
Implemented.
* src/vm/jit/m68k/codegen.h (M_BLS): Added.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
- $Id: simplereg.c 7743 2007-04-17 20:53:41Z edwin $
+ $Id: simplereg.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 7763 2007-04-19 12:19:19Z michi $
+ $Id: asmpart.S 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: codegen.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: emit.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: inline.c 7743 2007-04-17 20:53:41Z edwin $
+ $Id: inline.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: jit.h 7742 2007-04-17 20:37:36Z edwin $
+ $Id: jit.h 7766 2007-04-19 13:24:48Z michi $
*/
#include "config.h"
#include "vm/jit/m68k/offsets.h"
+#include "md-abi.h"
+#include "vm/jit/methodheader.h"
.data
call_jit_dummy:
/* %d0 contains address of exception handler */
moveal %d0, %a0
- jsr %a0@
+ jmp %a0@
L_asm_handle_exception_not_catched:
- jsr 0
+ /* we did not find an exception handler in this stackframe */
+ /* remove this frame and search in the one above */
+ /* %a2 containts exception object ptr, %d2 the actual pv */
+ moveal %d2, %a3
+ movel %a3@(FrameSize), %d2
+
+ moveal %sp, %a0
+ addal %d2, %a0 /* %a0 now points to top of stackframe, where saved regs are */
+
+ /* the saved registers have to be restored */
+ /* XXX ugly hack: intsave and adrsave share one field */
+ movel %a3@(IntSave), %d0
+ andil #0x0000ffff, %d0 /* this is IntSave */
+ cmpb #0,%d0
+ beq L_asm_handle_ex_int_done
+ movel (%a0)+, %d7
+
+ cmpb #1,%d0
+ beq L_asm_handle_ex_int_done
+ movel (%a0)+, %d6
+
+ cmpb #2,%d0
+ beq L_asm_handle_ex_int_done
+ movel (%a0)+, %d5
+
+L_asm_handle_ex_int_done:
+
+ movel %a3@(IntSave), %d0
+ andil #0xffff0000, %d0 /* this is AdrSave */
+ tstl %d0
+ beq L_handle_exception_nat_catched_no_adr
+ moveal (%a0)+, %a5
+L_handle_exception_nat_catched_no_adr:
+
+#if !defined(ENABLE_SOFTFLOAT)
+ FIXME
+#else
+ /* nothing to do */
+#endif
+ addal %d2, %sp /* remove old stackframe */
+ moveal %sp@(0), %a3 /* make return address, new exception rasing address */
+ addal #4,%sp /* remove return address fromstack */
+ subal #2, %a3 /* it was a jsr %aX, which is 4 bytes long */
+ jmp L_asm_handle_exception_stack_loop
+
+
illegal
.long 0x23234242
(void) dseg_add_unique_s4(cd, (rd->memuse + 1) * 4);/* IsSync */
else
#endif
- (void) dseg_add_unique_s4(cd, 0); /* IsSync */
+ (void) dseg_add_unique_s4(cd, 0); /* IsSync */
(void) dseg_add_unique_s4(cd, jd->isleafmethod); /* IsLeaf */
- (void) dseg_add_unique_s4(cd, INT_SAV_CNT - rd->savintreguse); /* IntSave */
+
+ /* XXX we use the IntSAce a split field for the adr now */
+ (void) dseg_add_unique_s4(cd, (ADR_SAV_CNT - rd->savadrreguse) << 16 | (INT_SAV_CNT - rd->savintreguse)); /* IntSave */
(void) dseg_add_unique_s4(cd, FLT_SAV_CNT - rd->savfltreguse); /* FltSave */
dseg_addlinenumbertablesize(cd);
codegen_threadcritstop(cd, cd->mcodeptr - cd->mcodebase);
#endif
M_ISUB(REG_ITMP3, REG_ITMP1);
- M_ICMP(REG_ITMP1, REG_ITMP2);
- M_BGT(4);
+ M_ICMP(REG_ITMP2, REG_ITMP1);
+ M_BHI(4);
M_IMOV_IMM(1, d);
M_TPFW; /* overlaps next instruction */
M_ICLR(d);
codegen_threadcritstart(cd, cd->mcodeptr - cd->mcodebase);
#endif
M_ILD(REG_ITMP3, REG_ATMP2, OFFSET(vftbl_t, baseval)); /* REG_ITMP3 == sub->vftbl->baseval */
-#if 0
- if (s1 != REG_ATMP1) {
-#endif
- M_ILD(REG_ITMP1, REG_ATMP3, OFFSET(vftbl_t, baseval));
- M_ILD(REG_ITMP2, REG_ATMP3, OFFSET(vftbl_t, diffval));
-#if defined(ENABLE_THREADS)
- codegen_threadcritstop(cd, cd->mcodeptr - cd->mcodebase);
-#endif
- M_ISUB(REG_ITMP1, REG_ITMP3);
- M_ICMP(REG_ITMP2, REG_ITMP1); /* XXX was CMPU */
-#if 0
- } else {
- assert(0);
- M_ILD(REG_ITMP2, REG_ATMP3, OFFSET(vftbl_t, baseval));
- M_ISUB(REG_ITMP3, REG_ITMP2);
- M_ILD(REG_ITMP3, REG_ATMP3, OFFSET(vftbl_t, diffval));
- M_ICMP(REG_ITMP2, REG_ITMP3); /* XXX was CMPU */
+ M_ILD(REG_ITMP1, REG_ATMP3, OFFSET(vftbl_t, baseval));
+ M_ILD(REG_ITMP2, REG_ATMP3, OFFSET(vftbl_t, diffval));
#if defined(ENABLE_THREADS)
codegen_threadcritstop(cd, cd->mcodeptr - cd->mcodebase);
#endif
- }
-#endif
+ M_ISUB(REG_ITMP1, REG_ITMP3);
+ M_ICMP(REG_ITMP2, REG_ITMP3); /* XXX was CMPU */
+
emit_classcast_check(cd, iptr, BRANCH_UGT, REG_ITMP3, s1); /* XXX was BRANCH_GT */
if (super != NULL)
M_AMOV_IMM(m, REG_ATMP1);
M_AMOV_IMM(asm_call_jit_compiler, REG_ATMP3);
- M_JMP_IMM(asm_call_jit_compiler);
- M_RET;
+ M_JMP(REG_ATMP3);
+ M_JMP_IMM(0); /* FIXME: remove me */
}
#define M_BHI_16(a) BRANCH16(0x2, (a))
#define M_BHI_32(a) BRANCH32(0x2, (a))
+#define M_BLS(a) BRANCH8 (0x3, (a))
+
#define M_BMI(a) BRANCH8(0xb, (a))
#define M_BPL(a) BRANCH8(0xa, (a))
M_BLE(4);
break;
case BRANCH_UGT:
- M_BHI(4);
+ M_BLS(4);
break;
default:
vm_abort("emit_classcast_check: unknown condition %d", condition);
const char *abi_registers_integer_name [] = { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7" };
const s4 abi_registers_integer_argument[] ;
-const s4 abi_registers_integer_saved[] = {2,3,4,5,6,7};
+const s4 abi_registers_integer_saved[] = {5,6,7};
const s4 abi_registers_integer_temporary[] = {0,1};
/* Address register description */
const char *abi_registers_float_name [] = { "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7" };
const s4 abi_registers_float_argument[] ;
-const s4 abi_registers_float_saved[] = {2,3,4,5,6,7};
+const s4 abi_registers_float_saved[] = {5,6,7};
const s4 abi_registers_float_temporary[] = {0,1};
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: codegen.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: parse.c 7735 2007-04-17 18:47:50Z edwin $
+ $Id: parse.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 7757 2007-04-18 14:49:18Z tbfg $
+ $Id: codegen.c 7766 2007-04-19 13:24:48Z michi $
*/
##
## Changes:
##
-## $Id: Makefile.am 7758 2007-04-18 15:31:07Z michi $
+## $Id: Makefile.am 7766 2007-04-19 13:24:48Z michi $
## Process this file with automake to produce Makefile.in
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: codegen.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: emit.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: stack.c 7749 2007-04-17 21:30:20Z edwin $
+ $Id: stack.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: typecheck.c 7746 2007-04-17 21:01:15Z edwin $
+ $Id: typecheck.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: typeinfo.c 7743 2007-04-17 20:53:41Z edwin $
+ $Id: typeinfo.c 7766 2007-04-19 13:24:48Z michi $
*/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7754 2007-04-17 23:18:15Z twisti $
+ $Id: emit.c 7766 2007-04-19 13:24:48Z michi $
*/