diff options
author | jschauma <jschauma> | 2004-01-28 17:11:16 +0000 |
---|---|---|
committer | jschauma <jschauma> | 2004-01-28 17:11:16 +0000 |
commit | 422799569b61f1a6fac911e95e3377805a823eb8 (patch) | |
tree | 08f26dfbceb13fc0ca35a050465e0a193a990473 | |
parent | 4eecd9459169af3bb31f11b5b11c3c0be9d78f58 (diff) | |
download | pkgsrc-422799569b61f1a6fac911e95e3377805a823eb8.tar.gz |
Make this compile with gcc 3.3. Fixes problems in agc's bulk build.
-rw-r--r-- | lang/jdk-openjit/distinfo | 4 | ||||
-rw-r--r-- | lang/jdk-openjit/patches/patch-ab | 271 |
2 files changed, 267 insertions, 8 deletions
diff --git a/lang/jdk-openjit/distinfo b/lang/jdk-openjit/distinfo index f9994a2b6ed..8eb6b5c983c 100644 --- a/lang/jdk-openjit/distinfo +++ b/lang/jdk-openjit/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2003/07/01 19:02:34 jlam Exp $ +$NetBSD: distinfo,v 1.2 2004/01/28 17:11:16 jschauma Exp $ SHA1 (OpenJIT-1.1.16.tar.gz) = fbe44c43db12f57b7f39b3f3f6f604f7a5486aee Size (OpenJIT-1.1.16.tar.gz) = 139609 bytes SHA1 (patch-aa) = 39caec6dfca4a595514824d19d891bb0ede04ea1 -SHA1 (patch-ab) = 11a66f1b84388e332030c4b0b8d0db218524fcc7 +SHA1 (patch-ab) = 6e458ac6b29fb3e11b35efcfca9f12b694641b6c SHA1 (patch-ac) = 37e247f4a55c03f79380254c54cdf89487b2f8f9 diff --git a/lang/jdk-openjit/patches/patch-ab b/lang/jdk-openjit/patches/patch-ab index e428a77ffb2..1f15b230502 100644 --- a/lang/jdk-openjit/patches/patch-ab +++ b/lang/jdk-openjit/patches/patch-ab @@ -1,8 +1,267 @@ -$NetBSD: patch-ab,v 1.1.1.1 2003/07/01 19:02:34 jlam Exp $ +$NetBSD: patch-ab,v 1.2 2004/01/28 17:11:16 jschauma Exp $ ---- rt-X86.c.orig Mon Feb 17 17:11:27 2003 -+++ rt-X86.c -@@ -2422,7 +2422,7 @@ do { \ +--- rt-X86.c.orig 2001-09-06 16:34:36.000000000 -0400 ++++ rt-X86.c 2004-01-11 10:44:13.000000000 -0500 +@@ -127,14 +127,14 @@ + #define ASM __asm__ volatile + + #ifdef SYM_UNDERSCORE +-__asm__(" +-_OpenJIT_f2i = OpenJIT_f2i +-_OpenJIT_d2i = OpenJIT_f2i +-_OpenJIT_f2l = OpenJIT_f2l +-_OpenJIT_d2l = OpenJIT_d2l +-_OpenJIT_invokeinterface_quick = OpenJIT_invokeinterface_quick +-_throw_internal = throw_internal +-"); ++__asm__("\n" ++"_OpenJIT_f2i = OpenJIT_f2i\n" ++"_OpenJIT_d2i = OpenJIT_f2i\n" ++"_OpenJIT_f2l = OpenJIT_f2l\n" ++"_OpenJIT_d2l = OpenJIT_d2l\n" ++"_OpenJIT_invokeinterface_quick = OpenJIT_invokeinterface_quick\n" ++"_throw_internal = throw_internal\n" ++""); + #define ASM_TEXT_LABEL(X) __asm__(".text\n_" #X ":\n"); + #else + #define ASM_TEXT_LABEL(X) __asm__(".text\n" #X ":\n"); +@@ -2051,107 +2051,107 @@ + extern int OpenJIT_d2i(); /* One arg is passed via floating ST(0) */ + extern int64_t OpenJIT_f2l(float f); + extern int64_t OpenJIT_d2l(double d); +-__asm__(" +-OpenJIT_d2i = OpenJIT_f2i +-.text +- .align 4 +- .type OpenJIT_f2i,@function +-OpenJIT_f2i: +- pushl %ebp +- movl %esp,%ebp +- subl $8,%esp +- ftst +- fnstcw -4(%ebp) +- movl -4(%ebp),%eax +- movb $0xc,%ah +- movw %ax,-2(%ebp) +- fldcw -2(%ebp) +- fistpl -8(%ebp) +- fldcw -4(%ebp) +- movl -8(%ebp),%eax +- cmp $0x80000000,%eax +- je IntOverFlow +- leave +- ret +- +-IntOverFlow: +- fnstsw +- sahf +- jp IntNaN +- movl $0x80000000,%eax +- adcl $-1,%eax +- leave +- ret +-IntNaN: +- xorl %eax,%eax +- leave +- ret +- +-.text +- .align 4 +- .type OpenJIT_f2l,@function +-OpenJIT_f2l: +- pushl %ebp +- movl %esp,%ebp +- subl $12,%esp +- flds 8(%ebp) +- ftst +- fnstcw -4(%ebp) +- movl -4(%ebp),%eax +- movb $0xc,%ah +- movw %ax,-2(%ebp) +- fldcw -2(%ebp) +- fistpll -12(%ebp) +- fldcw -4(%ebp) +- movl -12(%ebp),%eax +- movl $0x80000000,%ecx +- movl -8(%ebp),%edx +- xorl %edx,%ecx +- orl %eax,%ecx +- je LongOverFlow +- leave +- ret +- +- .align 4 +- .type OpenJIT_d2l,@function +-OpenJIT_d2l: +- pushl %ebp +- movl %esp,%ebp +- subl $12,%esp +- fldl 8(%ebp) +- ftst +- fnstcw -4(%ebp) +- movl -4(%ebp),%eax +- movb $0xc,%ah +- movw %ax,-2(%ebp) +- fldcw -2(%ebp) +- fistpll -12(%ebp) +- fldcw -4(%ebp) +- movl -12(%ebp),%eax +- movl $0x80000000,%ecx +- movl -8(%ebp),%edx +- xorl %edx,%ecx +- orl %eax,%ecx +- je LongOverFlow +- leave +- ret +- +-LongOverFlow: +- fnstsw +- sahf +- jp LongNaN +- movl $0,%eax +- adcl $-1,%eax +- adcl $-1,%edx +- leave +- ret +- +-LongNaN: +- xorl %eax,%eax +- xorl %edx,%edx +- leave +- ret +-"); ++__asm__("\n" ++"OpenJIT_d2i = OpenJIT_f2i\n" ++".text\n" ++" .align 4\n" ++" .type OpenJIT_f2i,@function\n" ++"OpenJIT_f2i:\n" ++" pushl %ebp\n" ++" movl %esp,%ebp\n" ++" subl $8,%esp\n" ++" ftst\n" ++" fnstcw -4(%ebp)\n" ++" movl -4(%ebp),%eax\n" ++" movb $0xc,%ah\n" ++" movw %ax,-2(%ebp)\n" ++" fldcw -2(%ebp)\n" ++" fistpl -8(%ebp)\n" ++" fldcw -4(%ebp)\n" ++" movl -8(%ebp),%eax\n" ++" cmp $0x80000000,%eax\n" ++" je IntOverFlow\n" ++" leave\n" ++" ret\n" ++"\n" ++"IntOverFlow:\n" ++" fnstsw\n" ++" sahf\n" ++" jp IntNaN\n" ++" movl $0x80000000,%eax\n" ++" adcl $-1,%eax\n" ++" leave\n" ++" ret\n" ++"IntNaN:\n" ++" xorl %eax,%eax\n" ++" leave\n" ++" ret\n" ++"\n" ++".text\n" ++" .align 4\n" ++" .type OpenJIT_f2l,@function\n" ++"OpenJIT_f2l:\n" ++" pushl %ebp\n" ++" movl %esp,%ebp\n" ++" subl $12,%esp\n" ++" flds 8(%ebp)\n" ++" ftst\n" ++" fnstcw -4(%ebp)\n" ++" movl -4(%ebp),%eax\n" ++" movb $0xc,%ah\n" ++" movw %ax,-2(%ebp)\n" ++" fldcw -2(%ebp)\n" ++" fistpll -12(%ebp)\n" ++" fldcw -4(%ebp)\n" ++" movl -12(%ebp),%eax\n" ++" movl $0x80000000,%ecx\n" ++" movl -8(%ebp),%edx\n" ++" xorl %edx,%ecx\n" ++" orl %eax,%ecx\n" ++" je LongOverFlow\n" ++" leave\n" ++" ret\n" ++"\n" ++" .align 4\n" ++" .type OpenJIT_d2l,@function\n" ++"OpenJIT_d2l:\n" ++" pushl %ebp\n" ++" movl %esp,%ebp\n" ++" subl $12,%esp\n" ++" fldl 8(%ebp)\n" ++" ftst\n" ++" fnstcw -4(%ebp)\n" ++" movl -4(%ebp),%eax\n" ++" movb $0xc,%ah\n" ++" movw %ax,-2(%ebp)\n" ++" fldcw -2(%ebp)\n" ++" fistpll -12(%ebp)\n" ++" fldcw -4(%ebp)\n" ++" movl -12(%ebp),%eax\n" ++" movl $0x80000000,%ecx\n" ++" movl -8(%ebp),%edx\n" ++" xorl %edx,%ecx\n" ++" orl %eax,%ecx\n" ++" je LongOverFlow\n" ++" leave\n" ++" ret\n" ++"\n" ++"LongOverFlow:\n" ++" fnstsw\n" ++" sahf\n" ++" jp LongNaN\n" ++" movl $0,%eax\n" ++" adcl $-1,%eax\n" ++" adcl $-1,%edx\n" ++" leave\n" ++" ret\n" ++"\n" ++"LongNaN:\n" ++" xorl %eax,%eax\n" ++" xorl %edx,%edx\n" ++" leave\n" ++" ret\n" ++""); + + static int64_t + OpenJIT_lshr(int64_t ll, unsigned b) +@@ -2383,16 +2383,16 @@ + } + + extern void throw_internal(); +-__asm__(" +-.text +- .align 4 +- .type throw_internal,@function +-throw_internal: +- pushl %eax +- jmp *%edx +-.Lfe_throw_internal: +- .size throw_internal,.Lfe_throw_internal-throw_internal +-"); ++__asm__("\n" ++".text\n" ++" .align 4\n" ++" .type throw_internal,@function\n" ++"throw_internal:\n" ++" pushl %eax\n" ++" jmp *%edx\n" ++".Lfe_throw_internal:\n" ++" .size throw_internal,.Lfe_throw_internal-throw_internal\n" ++""); + + #if defined(__linux__) + static int signal_nest_count = -1; +@@ -2422,7 +2422,7 @@ /* resume from signal */ \ return; \ } while(0); @@ -11,7 +270,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2003/07/01 19:02:34 jlam Exp $ #define EAX sc_eax #define ECX sc_ecx #define EDX sc_edx -@@ -2492,7 +2492,7 @@ OpenJIT_SignalHandler(int sig, void *inf +@@ -2492,7 +2492,7 @@ #endif scp = (struct sigcontext *)(ebp + 3); } @@ -20,7 +279,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2003/07/01 19:02:34 jlam Exp $ scp = (struct sigcontext *)uc; #elif defined(sun) scp = &((ucontext_t *)uc)->uc_mcontext; -@@ -2553,7 +2553,7 @@ OpenJIT_SignalHandler(int sig, void *inf +@@ -2553,7 +2553,7 @@ SIGRETURN(scp); case SIGSEGV: |