diff -aruN shujit-0.7.11/ChangeLog shujit/ChangeLog --- shujit-0.7.11/ChangeLog Wed Mar 13 14:00:24 2002 +++ shujit/ChangeLog Sat Apr 20 21:02:31 2002 @@ -1,5 +1,22 @@ $Id$ +[20020420] + +strictfp のための scaling は単精度演算では本来は不要なので、省いた。 +ただし、マクロ OMIT_SCALING_SINGLE_PRECISION で制御できるようにして残した。 +(compile.c, compiler.h) + +0.7.12 リリース。 + +[20020319] + +FreeBSD JDK 1.3.1-p6 用の workaround ([20020312]) を、 +compileAndInvokeMethod() (invoker.c) がインタプリタ ExecuteJava() を呼ぶ +直前にも記述した。 +こうしないと、setenv JAVA_COMPILER_OPT systhreshold=1 としただけで +jEdit 3.2.2 が異常終了してしまう。 +(invoker.c) + [20020313] FreeBSD JDK 1.3.1-p6 のシグナルまわりの問題に対する workaround ([20020312]) diff -aruN shujit-0.7.11/GNUmakefile shujit/GNUmakefile --- shujit-0.7.11/GNUmakefile Wed Mar 13 12:50:37 2002 +++ shujit/GNUmakefile Sat Apr 20 21:11:10 2002 @@ -20,7 +20,7 @@ # command -CC = /usr/bin/gcc +CC = /usr/bin/gcc3 LD_DYNAMIC = ${CC} -shared# for GCC and GNU binutils #LD_DYNAMIC = ld -Bdynamic# for SunOS 4 ASFLAGS = diff -aruN shujit-0.7.11/README shujit/README --- shujit-0.7.11/README Wed Mar 13 13:49:34 2002 +++ shujit/README Sat Apr 20 21:18:05 2002 @@ -17,9 +17,9 @@ - JDK 1.1.8 (ELF, V1999-11-9), GCC 2.95.3 and FreeBSD 4.5-STABLE - Linux - - Blackdown JDK 1.3.1_02a, GCC 3.1 20020307, glibc 2.2.4, Linux 2.4.19-pre2 - - Blackdown JDK 1.2.2, GCC 3.1 20020307, glibc 2.2.4 and Linux 2.4.19-pre2 - - JDK 1.1.8v3, GCC 3.1 20020307, glibc 2.2.4 and Linux 2.4.19-pre2 + - Blackdown JDK 1.3.1_02b, GCC 3.1 20020314, glibc 2.2.5, Linux 2.4.19-pre7 + - Blackdown JDK 1.2.2, GCC 3.1 20020314, glibc 2.2.5 and Linux 2.4.19-pre7 + - JDK 1.1.8v3, GCC 3.1 20020314, glibc 2.2.5 and Linux 2.4.19-pre7 - JDK 1.1.7v1a, egcs 1.1.2, libc 5.4.38 and Linux 2.0.35 * Installation diff -aruN shujit-0.7.11/compile.c shujit/compile.c --- shujit-0.7.11/compile.c Wed Mar 13 08:38:35 2002 +++ shujit/compile.c Sat Apr 20 20:11:08 2002 @@ -603,7 +603,7 @@ { int opcode_fld = ((opcode == opc_fmul) ? opc_fld : opc_fld4); -#ifndef USE_SSE2 +#if !defined(USE_SSE2) || !defined(OMIT_SCALING_SINGLE_PRECISION) if (OPT_SETQ(OPT_FRCSTRICTFP) || (!OPT_SETQ(OPT_IGNSTRICTFP) && (mb->fb.access & ACC_STRICT))) { processAnOpcode(cc, opc_flush_cache, byteoff); diff -aruN shujit-0.7.11/compiler.h shujit/compiler.h --- shujit-0.7.11/compiler.h Wed Mar 13 10:01:09 2002 +++ shujit/compiler.h Sat Apr 20 20:12:35 2002 @@ -25,7 +25,7 @@ #define _COMPILER_H_ -#define VERSION "0.7.11" +#define VERSION "0.7.12" #include "config.h" @@ -112,6 +112,7 @@ #define DIRECT_INV_NATIVE #define ALIGN_JUMP_TARGET #define FORCE_DOUBLE_PRECISION +#define OMIT_SCALING_SINGLE_PRECISION #undef IGNORE_DISABLE #undef NO_CHECK #undef COUNT_TSC diff -aruN shujit-0.7.11/configure shujit/configure --- shujit-0.7.11/configure Wed Mar 13 12:31:53 2002 +++ shujit/configure Sat Apr 20 20:34:46 2002 @@ -1722,7 +1722,7 @@ case $host_os in freebsd*) case $ac_jver_string in - *\"1.3.1-p6\") + *\"1.3.1-p*) echo "$ac_t""a workaround for a problem of FreeBSD JDK 1.3.1-p6 enabled" 1>&6 cat >> confdefs.h <<\EOF #define WORKAROUND_FOR_FREEBSD_131P6 1 diff -aruN shujit-0.7.11/configure.in shujit/configure.in --- shujit-0.7.11/configure.in Wed Mar 13 12:31:46 2002 +++ shujit/configure.in Sat Apr 20 20:34:37 2002 @@ -216,8 +216,8 @@ case $host_os in freebsd*) case $ac_jver_string in - *\"1.3.1-p6\") -dnl shold be `1.3.1-p*' ? + *\"1.3.1-p*) +dnl only 1.3.1-p6, or 1.3.1-p6 and later? AC_MSG_RESULT(a workaround for a problem of FreeBSD JDK 1.3.1-p6 enabled) AC_DEFINE(WORKAROUND_FOR_FREEBSD_131P6) ;; diff -aruN shujit-0.7.11/invoker.c shujit/invoker.c --- shujit-0.7.11/invoker.c Wed Mar 13 09:08:26 2002 +++ shujit/invoker.c Tue Mar 19 20:21:13 2002 @@ -249,6 +249,17 @@ fflush(stdout); } #endif + +#if defined(WORKAROUND_FOR_FREEBSD_131P6) && (JDK_VER >= 12) && (defined(__FreeBSD__) || defined(__NetBSD__)) + // unblock SIGTRAP to get around a problem of FreeBSD JDK 1.3.1-p6 + { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGTRAP); + sigprocmask(SIG_UNBLOCK, &set, NULL); + } +#endif + cur_frame = ee->current_frame; old_optop = cur_frame->optop; #if defined(EXECUTEJAVA_IN_ASM) && (JDK_VER < 12) diff -aruN shujit-0.7.11/optimize.c shujit/optimize.c --- shujit-0.7.11/optimize.c Fri Mar 1 18:11:45 2002 +++ shujit/optimize.c Sat Apr 20 20:05:27 2002 @@ -128,10 +128,9 @@ entry->operand = entry1->operand; pctableDelete(cc, i + 1); } - else { #if 0 // single-precision operations need store-reload - // for the precise floating-point semantics - + // to be comply with strictfp. + else { GET_2_ENTRIES; // combine FPU store and load instructions if ((pcentryState(entry) == 0) && @@ -147,8 +146,8 @@ *entry = *entry1; // copy opc_flush_cache pctableNDelete(cc, i + 1, 2); } - else { #endif // if 0 + else { #if !defined(METAVM) || defined(METAVM_NO_ARRAY) // the `fst_fastore' insn does not support MetaVM GET_4_ENTRIES;