* src/vm/jit/s390/emit.h (emit_restore_pv): Added. Fixes bug where REG_PV recalculation uses dseg value to recalculate REG_PV.
* src/vm/jit/s390/emit.c: Likewise.
* src/vm/jit/s390/codegen.h (N_RI, N_RI2): Test immediate operand for correct signedness.
* src/vm/jit/s390/codegen.c (codegen_emit): Use emit_restore_pv for REG_PV recalculation/
* src/vm/jit/s390/disass.c (disass_pseudo_instr): Fix formating.
* src/vm/jit/s390/tests/dacapo.status: Added.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 7845 2007-05-01 16:05:07Z pm $
+ $Id: codegen.c 7848 2007-05-01 21:40:26Z pm $
*/
M_CALL(REG_PV);
REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
- N_BASR(REG_PV, RN);
- disp = (s4) (cd->mcodeptr - cd->mcodebase);
- M_ASUB_IMM32(disp, REG_ITMP1, REG_PV);
+ emit_restore_pv(cd);
/* post call finalization */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.h 7846 2007-05-01 16:14:00Z pm $
+ $Id: codegen.h 7848 2007-05-01 21:40:26Z pm $
*/
#define SZ_RX 4
#define N_RI(op1, op2, r1, i2) \
- _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_I16(i2) )
+ _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_SI16(i2) )
+
+#define N_RI2(op1, op2, r1, i2) \
+ _CODE4( (_OP(op1) << 24) | (_R(r1) << 20) | (_OP4(op2) << 16) | (u2)_UI16(i2) )
#define SZ_RI 4
#define N_BALR(r1, r2) N_RR(0x05, r1, _OR(r2))
#define N_BAL(r1, d2, x2, b2) N_RX(0x45, r1, d2, x2, b2)
#define N_BASR(r1, r2) N_RR(0x0D, r1, _OR(r2))
+# define SZ_BASR SZ_RR
#define N_BAS(r1, d2, x2, b2) N_RX(0x4D, r1, d2, x2, b2)
#define N_BASSM(r1, r2) N_RR(0x0C, r1, _OR(r2))
#define N_BSM(r1, r2) N_RR(0x0B, r1, _OR(r2))
#define N_SVC(i) N_RR2(0x0A, i)
#define N_TS(d2, b2) N_S2(0x93, d2, b2)
#define N_TM(d1, b1, i2) N_SI(0x91, d1, b1, i2)
-#define N_TMH(r1, i2) N_RI(0xA7, 0x00, r1, i2)
-#define N_TML(r1, i2) N_RI(0xA7, 0x01, r1, i2)
+#define N_TMH(r1, i2) N_RI2(0xA7, 0x00, r1, i2)
+#define N_TML(r1, i2) N_RI2(0xA7, 0x01, r1, i2)
#define N_TR(d1, l, b1, d2, b2) N_SS(0xDC, d1, (l - 1), b1, d2, b2)
#define N_TRT(d1, l, b1, d2, b2) N_SS(0xDD, d1, (l - 1), b1, d2, b2)
#define N_TRE(r1, r2) N_RRE(0xB2A5, r1, r2)
Changes: Christian Thalinger
- $Id: disass.c 7845 2007-05-01 16:05:07Z pm $
+ $Id: disass.c 7848 2007-05-01 21:40:26Z pm $
*/
switch (code[0]) {
/* Trap */
case 0x02:
- snprintf(disass_buf, 512, "ill\t 0x%02hhx (pseudo)", code[1]);
+ snprintf(disass_buf, 512, "ill\t0x%02hhx (pseudo)", code[1]);
return 2;
/* Not recognized */
default:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7839 2007-04-29 22:46:56Z pm $
+ $Id: emit.c 7848 2007-05-01 21:40:26Z pm $
*/
}
}
+void emit_restore_pv(codegendata *cd) {
+ s4 offset;
+
+ /*
+ N_BASR(REG_PV, RN);
+ disp = (s4) (cd->mcodeptr - cd->mcodebase);
+ M_ASUB_IMM32(disp, REG_ITMP1, REG_PV);
+ */
+
+ /* If the offset from the method start does not fit into an immediate
+ * value, we can't put it into the data segment!
+ */
+
+ /* Displacement from start of method to here */
+
+ offset = (s4) (cd->mcodeptr - cd->mcodebase);
+
+ if (N_VALID_IMM(-(offset + SZ_BASR))) {
+ /* Get program counter */
+ N_BASR(REG_PV, RN);
+ /* Substract displacement */
+ M_ASUB_IMM(offset + SZ_BASR, REG_PV);
+ } else {
+ /* Save program counter and jump over displacement in instruction flow */
+ N_BRAS(REG_PV, SZ_BRAS + SZ_LONG);
+ /* Place displacement here */
+ /* REG_PV points now exactly to this position */
+ N_LONG(offset + SZ_BRAS);
+ /* Substract *(REG_PV) from REG_PV */
+ N_S(REG_PV, 0, RN, REG_PV);
+ }
+}
+
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where
Changes:
- $Id: emit.h 7839 2007-04-29 22:46:56Z pm $
+ $Id: emit.h 7848 2007-05-01 21:40:26Z pm $
*/
*/
void emit_copy_dst(jitdata *jd, instruction *iptr, s4 dtmpreg);
+/* Emits code to recalculate the PV (procedure vector) after a subroutine call. */
+void emit_restore_pv(codegendata *cd);
+
#endif /* _MD_EMIT_H */
Changes: Edwin Steiner
- $Id: md.c 7839 2007-04-29 22:46:56Z pm $
+ $Id: md.c 7848 2007-05-01 21:40:26Z pm $
*/
#include "vm/jit/s390/md-abi.h"
#if defined(ENABLE_THREADS)
+# include "threads/threads-common.h"
# include "threads/native/threads.h"
#endif
void md_signal_handler_sigill(int sig, siginfo_t *siginfo, void *_p);
+void md_dump_context(u1 *pc, mcontext_t *mc);
+
/* md_init *********************************************************************
Do some machine dependent initialization.
}
}
+/* md_dump_context ************************************************************
+
+ Logs the machine context
+
+*******************************************************************************/
+
+void md_dump_context(u1 *pc, mcontext_t *mc) {
+ int i;
+
+ union {
+ u8 l;
+ fpreg_t fr;
+ } freg;
+
+ log_println("Dumping context.");
+
+ log_println("Program counter: 0x%08X", pc);
+
+#if defined(ENABLE_DISASSEMBLER)
+ log_println("Printing instruction at program counter:");
+ disassinstr(pc);
+#endif
+
+ log_println("General purpose registers:");
+
+ for (i = 0; i < 16; i++) {
+ log_println("\tr%d:\t0x%08X\t%d", i, mc->gregs[i], mc->gregs[i]);
+ }
+
+ log_println("Floating point registers:");
+
+ for (i = 0; i < 16; i++) {
+ freg.fr.d = mc->fpregs.fprs[i].d;
+ log_println("\tf%d\t0x%016llX\t(double)%e\t(float)%f", i, freg.l, freg.fr.d, freg.fr.f);
+ }
+
+#if defined(ENABLE_THREADS)
+ log_println("Dumping the current stacktrace:");
+ threads_print_stacktrace();
+#endif
+
+}
/* md_signal_handler_sigsegv ***************************************************
}
if (! is_null) {
+#if !defined(NDEBUG)
+ md_dump_context(xpc, _mc);
+#endif
vm_abort("%s: segmentation fault at %p, aborting.", __FUNCTION__, xpc);
}
_mc->psw.addr = (ptrint) asm_handle_exception;
} else {
+#if !defined(NDEBUG)
+ md_dump_context(xpc, _mc);
+#endif
vm_abort("%s: illegal instruction at %p, aborting.", __FUNCTION__, xpc);
}
}
/* Could not handle signal */
+#if !defined(NDEBUG)
+ md_dump_context(xpc, _mc);
+#endif
vm_abort("%s: floating point exception at %p, aborting.", __FUNCTION__, xpc);
}
--- /dev/null
+antlr
+
+ * parses one or more grammar files and generates a parser and lexical analyzer for each.
+ * Tue May 1 18:49:29 CEST 2007: ===== DaCapo antlr PASSED in 37095 msec =====
+
+bloat
+
+ * performs a number of optimizations and analysis on Java bytecode files
+ * Tue May 1 18:55:16 CEST 2007: ===== DaCapo bloat PASSED in 266735 msec =====
+
+chart
+
+ * uses JFreeChart to plot a number of complex line graphs and renders them as PDF
+
+eclipse
+
+ * executes some of the (non-gui) jdt performance tests for the Eclipse IDE
+
+fop
+
+ * takes an XSL-FO file, parses it and formats it, generating a PDF file.
+ * Tue May 1 22:10:03 CEST 2007: ===== DaCapo fop PASSED in 83230 msec =====
+
+hsqldb
+
+ * executes a JDBCbench-like in-memory benchmark, executing a number of transactions against a model of a banking application
+ * Tue May 1 19:37:46 CEST 2007: ===== DaCapo hsqldb PASSED in 72187 msec =====
+
+jython
+
+ * inteprets a the pybench Python benchmark
+ * Tue May 1 19:23:18 CEST 2007: ===== DaCapo jython PASSED in 190386 msec =====
+
+luindex
+
+ * Uses lucene to indexes a set of documents; the works of Shakespeare and the King James Bible
+
+lusearch
+
+ * Uses lucene to do a text search of keywords over a corpus of data comprising the works of Shakespeare and the King James Bible
+
+pmd
+
+ * analyzes a set of Java classes for a range of source code problems
+ * Tue May 1 22:12:57 CEST 2007: ===== DaCapo pmd PASSED in 43427 msec =====
+
+xalan
+
+ * transforms XML documents into HTML
+ * Tue May 1 23:26:33 CEST 2007
+ LOG: [0x77dc66c0] Generating code: org.apache.xalan.processor.XSLTSchema.build()V
+ 32834 (0x8042) is not an signed 16 bit integer at /home/peter/cacao-dev/build-s390/../svn/src/vm/jit/s390/emit.c:258.
+ => branch to patcher overflow