public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [libffi] Provide unwind info for Tru64 UNIX in osf.S
@ 2011-04-29  9:13 Uros Bizjak
  0 siblings, 0 replies; 4+ messages in thread
From: Uros Bizjak @ 2011-04-29  9:13 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Henderson, Rainer Orth

Hello!

> On 04/28/2011 10:55 AM, Rainer Orth wrote:
> > I cannot test the Alpha/Linux side, though.

> Neither can I, at the moment.

The bootstrap fails due to link error [1] on alphaev68-pc-linux-gnu
for some time ...

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47230

Uros.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [libffi] Provide unwind info for Tru64 UNIX in osf.S
  2011-04-28 23:19 ` Richard Henderson
@ 2011-04-29 10:58   ` Rainer Orth
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Orth @ 2011-04-29 10:58 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gcc-patches, java-patches, Anthony Green

Richard Henderson <rth@redhat.com> writes:

>> 2011-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>> 
>> 	* src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
>> 	Define.
>> 	Use them to handle ELF vs. ECOFF differences.
>> 	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
>
> Looks good.  If there are any hidden Linux problems, we can
> fix them up with another patch.

I've installed it on mainline now.  Unless 4.5 and 4.6 testing over the
weekend shows any problems, I'll install there, too.  The 4.5 branch
shouldn't be affected by the bug Uros mentioned, so the Linux side could
be tested there.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [libffi] Provide unwind info for Tru64 UNIX in osf.S
  2011-04-28 18:11 Rainer Orth
@ 2011-04-28 23:19 ` Richard Henderson
  2011-04-29 10:58   ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2011-04-28 23:19 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, java-patches, Anthony Green

On 04/28/2011 10:55 AM, Rainer Orth wrote:
> I cannot test the Alpha/Linux side, though.

Neither can I, at the moment.

> 2011-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
> 	Define.
> 	Use them to handle ELF vs. ECOFF differences.
> 	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.

Looks good.  If there are any hidden Linux problems, we can
fix them up with another patch.


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [libffi] Provide unwind info for Tru64 UNIX in osf.S
@ 2011-04-28 18:11 Rainer Orth
  2011-04-28 23:19 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2011-04-28 18:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, Richard Henderson, Anthony Green

While investigating the remaining testsuite failures on Tru64 UNIX, I
found that both two libffi failures and several libjava failures had a
common cause: libffi/src/alpha/osf.S lacks unwind info that is usable on
Tru64 UNIX.

The following patch fixes this, along the same lines of what was done in
src/x86/sysv.S for Solaris/x86.

Tested by rebuilding libffi and running make check and relinking the
java libraries and also running make check.

In libffi, only

FAIL: libffi.call/huge_struct.c -O0 -W -Wall execution test

and variants remains which has a different cause (still investigating),
but many libjava failures are now gone.  The remaining ones are unrelated:

FAIL: Throw_2 execution - source compiled test

SEGVs here:

java.lang.String.length()int (this=null)
    at /vol/gcc/src/hg/trunk/local/libjava/java/lang/String.java:451
451         return count;

FAIL: md5test output - source compiled test

java.lang.ArrayIndexOutOfBoundsException

gdb is no help investigating.

FAIL: shatest execution - source compiled test

Probably same issue.

Ok for mainline and the 4.5 and 4.6 branches after testing there?

I cannot test the Alpha/Linux side, though.

Thanks.
	Rainer


2011-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
	Define.
	Use them to handle ELF vs. ECOFF differences.
	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.

diff --git a/libffi/src/alpha/osf.S b/libffi/src/alpha/osf.S
--- a/libffi/src/alpha/osf.S
+++ b/libffi/src/alpha/osf.S
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat
+   osf.S - Copyright (c) 1998, 2001, 2007, 2008, 2011 Red Hat
    
    Alpha/OSF Foreign Function Interface 
 
@@ -299,33 +299,51 @@ ffi_closure_osf:
 #endif
 
 #ifdef __ELF__
+# define UA_SI		.4byte
+# define FDE_ENCODING	0x1b	/* pcrel sdata4 */
+# define FDE_ENCODE(X)	.4byte X-.
+# define FDE_ARANGE(X)	.4byte X
+#elif defined __osf__
+# define UA_SI		.align 0; .long
+# define FDE_ENCODING	0x50	/* aligned absolute */
+# define FDE_ENCODE(X)	.align 3; .quad X
+# define FDE_ARANGE(X)	.align 0; .quad X
+#endif
+
+#ifdef __ELF__
 	.section	.eh_frame,EH_FRAME_FLAGS,@progbits
+#elif defined __osf__
+	.data
+	.align 3
+	.globl _GLOBAL__F_ffi_call_osf
+_GLOBAL__F_ffi_call_osf:
+#endif
 __FRAME_BEGIN__:
-	.4byte	$LECIE1-$LSCIE1	# Length of Common Information Entry
+	UA_SI	$LECIE1-$LSCIE1	# Length of Common Information Entry
 $LSCIE1:
-	.4byte	0x0		# CIE Identifier Tag
+	UA_SI	0x0		# CIE Identifier Tag
 	.byte	0x1		# CIE Version
 	.ascii "zR\0"		# CIE Augmentation
 	.byte	0x1		# uleb128 0x1; CIE Code Alignment Factor
 	.byte	0x78		# sleb128 -8; CIE Data Alignment Factor
 	.byte	26		# CIE RA Column
 	.byte	0x1		# uleb128 0x1; Augmentation size
-	.byte	0x1b		# FDE Encoding (pcrel sdata4)
+	.byte	FDE_ENCODING	# FDE Encoding
 	.byte	0xc		# DW_CFA_def_cfa
 	.byte	30		# uleb128 column 30
 	.byte	0		# uleb128 offset 0
 	.align 3
 $LECIE1:
 $LSFDE1:
-	.4byte	$LEFDE1-$LASFDE1		# FDE Length
+	UA_SI	$LEFDE1-$LASFDE1		# FDE Length
 $LASFDE1:
-	.4byte	$LASFDE1-__FRAME_BEGIN__	# FDE CIE offset
-	.4byte	$LFB1-.		# FDE initial location
-	.4byte	$LFE1-$LFB1	# FDE address range
+	UA_SI	$LASFDE1-__FRAME_BEGIN__	# FDE CIE offset
+	FDE_ENCODE($LFB1)			# FDE initial location
+	FDE_ARANGE($LFE1-$LFB1)			# FDE address range
 	.byte	0x0		# uleb128 0x0; Augmentation size
 
 	.byte	0x4		# DW_CFA_advance_loc4
-	.4byte	$LCFI1-$LFB1
+	UA_SI	$LCFI1-$LFB1
 	.byte	0x9a		# DW_CFA_offset, column 26
 	.byte	4		# uleb128 4*-8
 	.byte	0x8f		# DW_CFA_offset, column 15
@@ -335,32 +353,35 @@ __FRAME_BEGIN__:
 	.byte	32		# uleb128 offset 32
 
 	.byte	0x4		# DW_CFA_advance_loc4
-	.4byte	$LCFI2-$LCFI1
+	UA_SI	$LCFI2-$LCFI1
 	.byte	0xda		# DW_CFA_restore, column 26
 	.align 3
 $LEFDE1:
 
 $LSFDE3:
-	.4byte	$LEFDE3-$LASFDE3		# FDE Length
+	UA_SI	$LEFDE3-$LASFDE3		# FDE Length
 $LASFDE3:
-	.4byte	$LASFDE3-__FRAME_BEGIN__	# FDE CIE offset
-	.4byte	$LFB2-.		# FDE initial location
-	.4byte	$LFE2-$LFB2	# FDE address range
+	UA_SI	$LASFDE3-__FRAME_BEGIN__	# FDE CIE offset
+	FDE_ENCODE($LFB2)			# FDE initial location
+	FDE_ARANGE($LFE2-$LFB2)			# FDE address range
 	.byte	0x0		# uleb128 0x0; Augmentation size
 
 	.byte	0x4		# DW_CFA_advance_loc4
-	.4byte	$LCFI5-$LFB2
+	UA_SI	$LCFI5-$LFB2
 	.byte	0xe		# DW_CFA_def_cfa_offset
 	.byte	0x80,0x1	# uleb128 128
 
 	.byte	0x4		# DW_CFA_advance_loc4
-	.4byte	$LCFI6-$LCFI5
+	UA_SI	$LCFI6-$LCFI5
 	.byte	0x9a		# DW_CFA_offset, column 26
 	.byte	16		# uleb128 offset 16*-8
 	.align 3
 $LEFDE3:
+#if defined __osf__
+	.align 0
+	.long	0		# End of Table
+#endif
 
-#ifdef __linux__
+#if defined __ELF__ && defined __linux__
 	.section	.note.GNU-stack,"",@progbits
 #endif
-#endif


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-29  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29  9:13 [libffi] Provide unwind info for Tru64 UNIX in osf.S Uros Bizjak
  -- strict thread matches above, loose matches on Subject: below --
2011-04-28 18:11 Rainer Orth
2011-04-28 23:19 ` Richard Henderson
2011-04-29 10:58   ` Rainer Orth

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).