* epilogue count exceeds number of nested prologues
@ 2002-04-07 17:15 Randolph Chung
2002-04-07 22:53 ` Richard Henderson
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Randolph Chung @ 2002-04-07 17:15 UTC (permalink / raw)
To: linux-ia64, binutils
Hi all,
While trying to compile mozilla with libffi, the configure phase dies
with a message:
Error: Epilogue count of 4294967296 exceeds number of nested prologues
(0)
I see that this message comes from a patch submitted by David in
February. Is libffi broken? What is needed to fix it?
The offending assembly code is attached. it's the ".restore sp" near
the end that is triggering the error.
thanks
randolph
.file "conftest.i"
.pred.safe_across_calls p1-p5,p16-p63
.text
.align 16
.global main#
.proc main#
main:
.prologue 2, 2
.vframe r2
mov r2 = r12
.body
;;
#APP
.data
.align 8
1: data8 @fptr(ffi_closure_UNIX)
data8 1b
data8 0
data8 bar
data8 @fptr(baz)
data8 quux
.text
.global foo
.proc foo
foo:
addl r16 = @ltoff(1b), gp;;
ld8 gp = [r16];;
ld8 r17 = [gp];;
ld8 r19 = [r17],8;
adds r18 = 16,gp;;
ld8 r20 = [r17];;
st8 [r18]=r20;
mov b6 = r19
br.cond.sptk.many b6
.endp
#NO_APP
;;
mov r8 = r0
.restore sp
mov r12 = r2
br.ret.sptk.many b0
.endp main#
.ident "GCC: (GNU) 3.0.4"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: epilogue count exceeds number of nested prologues
2002-04-07 17:15 epilogue count exceeds number of nested prologues Randolph Chung
@ 2002-04-07 22:53 ` Richard Henderson
2002-04-08 8:52 ` [Linux-ia64] " David Mosberger
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2002-04-07 22:53 UTC (permalink / raw)
To: Randolph Chung; +Cc: linux-ia64, binutils
On Sun, Apr 07, 2002 at 05:17:14PM -0700, Randolph Chung wrote:
> The offending assembly code is attached. it's the ".restore sp" near
> the end that is triggering the error.
Yes, this assembly is completely scrogged. It's all inside inline
assembly too, so it's no one's fault but the programmer.
That said, you must be using an old libffi, since the one in gcc
cvs works just fine.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-ia64] epilogue count exceeds number of nested prologues
2002-04-07 17:15 epilogue count exceeds number of nested prologues Randolph Chung
2002-04-07 22:53 ` Richard Henderson
@ 2002-04-08 8:52 ` David Mosberger
2002-04-08 10:29 ` David Mosberger
2002-04-08 21:48 ` David Mosberger
3 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2002-04-08 8:52 UTC (permalink / raw)
To: Randolph Chung; +Cc: linux-ia64, binutils
>>>>> On Sun, 7 Apr 2002 17:17:14 -0700, Randolph Chung <randolph@tausq.org> said:
Randolph> Hi all, While trying to compile mozilla with libffi, the
Randolph> configure phase dies with a message:
Randolph> Error: Epilogue count of 4294967296 exceeds number of
Randolph> nested prologues (0)
Randolph> I see that this message comes from a patch submitted by
Randolph> David in February. Is libffi broken? What is needed to fix
Randolph> it?
Randolph> The offending assembly code is attached. it's the
Randolph> ".restore sp" near the end that is triggering the error.
This is a bug in the assembler that was fixed on Feb 22nd. I think
it should be in binutils-2.12, though I didn't not verify.
--david
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-ia64] epilogue count exceeds number of nested prologues
2002-04-07 17:15 epilogue count exceeds number of nested prologues Randolph Chung
2002-04-07 22:53 ` Richard Henderson
2002-04-08 8:52 ` [Linux-ia64] " David Mosberger
@ 2002-04-08 10:29 ` David Mosberger
2002-04-08 21:48 ` David Mosberger
3 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2002-04-08 10:29 UTC (permalink / raw)
To: Randolph Chung; +Cc: linux-ia64, binutils
>>>>> On Sun, 7 Apr 2002 17:17:14 -0700, Randolph Chung <randolph@tausq.org> said:
Randolph> Hi all, While trying to compile mozilla with libffi, the
Randolph> configure phase dies with a message:
Randolph> Error: Epilogue count of 4294967296 exceeds number of
Randolph> nested prologues (0)
Randolph> I see that this message comes from a patch submitted by
Randolph> David in February. Is libffi broken? What is needed to fix
Randolph> it?
I now realize that you must have been using the latest binutils, as the
old one silently generated bad unwind info.
As Richard pointed out in his mail, the offending code really is
broken. I was planning to update the mozilla libffi anyhow, both to
sync up with Hans's recent unwind fixes and to look into whether we
could use the assembler directives added for C++ vtables to simplify
the generation of static closures. Let me take a look at it.
--david
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-ia64] epilogue count exceeds number of nested prologues
2002-04-07 17:15 epilogue count exceeds number of nested prologues Randolph Chung
` (2 preceding siblings ...)
2002-04-08 10:29 ` David Mosberger
@ 2002-04-08 21:48 ` David Mosberger
2002-04-08 21:55 ` Randolph Chung
3 siblings, 1 reply; 7+ messages in thread
From: David Mosberger @ 2002-04-08 21:48 UTC (permalink / raw)
To: Randolph Chung; +Cc: linux-ia64, binutils
Hi Randolph,
>>>>> On Sun, 7 Apr 2002 17:17:14 -0700, Randolph Chung <randolph@tausq.org> said:
Randolph> Hi all,
Randolph> While trying to compile mozilla with libffi, the configure phase
Randolph> dies with a message:
Randolph> Error: Epilogue count of 4294967296 exceeds number of nested prologues
Randolph> (0)
Randolph> I see that this message comes from a patch submitted by David in
Randolph> February. Is libffi broken? What is needed to fix it?
Randolph> The offending assembly code is attached. it's the ".restore sp"
Randolph> near the end that is triggering the error.
I'm unable to reproduce this. If I'm understanding you right, the
problem occurred during the configure phase of mozilla (not libffi).
I just rebuilt Mozilla from the current CVS tree with gcc3.1
pre-release and the current CVS binutils. It built just fine and the
resulting binary seems to work flawlessly.
From the assembly code you provided, it looks as if conftest.c tried
to call FFI_STATIC_CLOSURE() from within a function, which can't
possibly work.
Can you provide a more precise pointer where this conftest.c is being
generated?
Thanks,
--david
Randolph> .file "conftest.i"
Randolph> .pred.safe_across_calls p1-p5,p16-p63
Randolph> .text
Randolph> .align 16
Randolph> .global main#
Randolph> .proc main#
Randolph> main:
Randolph> .prologue 2, 2
Randolph> .vframe r2
Randolph> mov r2 = r12
Randolph> .body
Randolph> ;;
Randolph> #APP
Randolph> .data
Randolph> .align 8
Randolph> 1: data8 @fptr(ffi_closure_UNIX)
Randolph> data8 1b
Randolph> data8 0
Randolph> data8 bar
Randolph> data8 @fptr(baz)
Randolph> data8 quux
Randolph> .text
Randolph> .global foo
Randolph> .proc foo
Randolph> foo:
Randolph> addl r16 = @ltoff(1b), gp;;
Randolph> ld8 gp = [r16];;
Randolph> ld8 r17 = [gp];;
Randolph> ld8 r19 = [r17],8;
Randolph> adds r18 = 16,gp;;
Randolph> ld8 r20 = [r17];;
Randolph> st8 [r18]=r20;
Randolph> mov b6 = r19
Randolph> br.cond.sptk.many b6
Randolph> .endp
Randolph> #NO_APP
Randolph> ;;
Randolph> mov r8 = r0
Randolph> .restore sp
Randolph> mov r12 = r2
Randolph> br.ret.sptk.many b0
Randolph> .endp main#
Randolph> .ident "GCC: (GNU) 3.0.4"
Randolph> _______________________________________________
Randolph> Linux-IA64 mailing list
Randolph> Linux-IA64@linuxia64.org
Randolph> http://lists.linuxia64.org/lists/listinfo/linux-ia64
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-ia64] epilogue count exceeds number of nested prologues
2002-04-08 21:48 ` David Mosberger
@ 2002-04-08 21:55 ` Randolph Chung
2002-04-08 22:57 ` Jeff Licquia
0 siblings, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2002-04-08 21:55 UTC (permalink / raw)
To: davidm; +Cc: linux-ia64, binutils
> I'm unable to reproduce this. If I'm understanding you right, the
> problem occurred during the configure phase of mozilla (not libffi).
that's right
> I just rebuilt Mozilla from the current CVS tree with gcc3.1
> pre-release and the current CVS binutils. It built just fine and the
> resulting binary seems to work flawlessly.
I'm building from Debian sources. It's possible that it's simply out of
date (I'm building version 0.9.9).
> >From the assembly code you provided, it looks as if conftest.c tried
> to call FFI_STATIC_CLOSURE() from within a function, which can't
> possibly work.
indeed, mozilla's configure.in says:
if test "$LIBFFI_FOUND" = "yes"; then
AC_MSG_CHECKING("for FFI_STATIC_CLOSURE in libffi")
AC_TRY_COMPILE([#include "ffi.h"],
[ FFI_STATIC_CLOSURE(foo, bar, baz, quux); ],
[ LIBFFI_HAS_STATIC_CLOSURE=yes ])
AC_MSG_RESULT("$result")
fi
which generates (from config.log):
configure:13494: checking for FFI_STATIC_CLOSURE in libffi
configure:13503: gcc-3.0 -c -I/home/randolph/debian/mozilla-0.9.9/build-tree/libffi-install/include -fshort-wchar -pthread -pipe -I/usr/X11R6/include conftest.c 1>&5
{standard input}: Assembler messages:
{standard input}:40: Error: Epilogue count of 4294967296 exceeds number of nested prologues (0)
configure: failed program was:
#line 13496 "configure"
#include "confdefs.h"
#include "ffi.h"
int main() {
FFI_STATIC_CLOSURE(foo, bar, baz, quux);
; return 0; }
randolph
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linux-ia64] epilogue count exceeds number of nested prologues
2002-04-08 21:55 ` Randolph Chung
@ 2002-04-08 22:57 ` Jeff Licquia
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Licquia @ 2002-04-08 22:57 UTC (permalink / raw)
To: Randolph Chung; +Cc: davidm, linux-ia64, binutils, Takuo KITAME
On Tue, 2002-04-09 at 00:09, Randolph Chung wrote:
> > I'm unable to reproduce this. If I'm understanding you right, the
> > problem occurred during the configure phase of mozilla (not libffi).
>
> that's right
>
> > I just rebuilt Mozilla from the current CVS tree with gcc3.1
> > pre-release and the current CVS binutils. It built just fine and the
> > resulting binary seems to work flawlessly.
>
> I'm building from Debian sources. It's possible that it's simply out of
> date (I'm building version 0.9.9).
>
> > >From the assembly code you provided, it looks as if conftest.c tried
> > to call FFI_STATIC_CLOSURE() from within a function, which can't
> > possibly work.
>
> indeed, mozilla's configure.in says:
>
> if test "$LIBFFI_FOUND" = "yes"; then
> AC_MSG_CHECKING("for FFI_STATIC_CLOSURE in libffi")
> AC_TRY_COMPILE([#include "ffi.h"],
> [ FFI_STATIC_CLOSURE(foo, bar, baz, quux); ],
> [ LIBFFI_HAS_STATIC_CLOSURE=yes ])
> AC_MSG_RESULT("$result")
> fi
>
> which generates (from config.log):
>
> configure:13494: checking for FFI_STATIC_CLOSURE in libffi
> configure:13503: gcc-3.0 -c -I/home/randolph/debian/mozilla-0.9.9/build-tree/libffi-install/include -fshort-wchar -pthread -pipe -I/usr/X11R6/include conftest.c 1>&5
> {standard input}: Assembler messages:
> {standard input}:40: Error: Epilogue count of 4294967296 exceeds number of nested prologues (0)
> configure: failed program was:
> #line 13496 "configure"
> #include "confdefs.h"
> #include "ffi.h"
> int main() {
> FFI_STATIC_CLOSURE(foo, bar, baz, quux);
> ; return 0; }
I claim responsibility for this code. For some reason, it worked in
older revisions.
But yes, I can see how that's incorrect, and should be changed. I can
whip up a patch if no one else is tomorrow.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-04-09 5:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-07 17:15 epilogue count exceeds number of nested prologues Randolph Chung
2002-04-07 22:53 ` Richard Henderson
2002-04-08 8:52 ` [Linux-ia64] " David Mosberger
2002-04-08 10:29 ` David Mosberger
2002-04-08 21:48 ` David Mosberger
2002-04-08 21:55 ` Randolph Chung
2002-04-08 22:57 ` Jeff Licquia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).