This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 3.4/3.5] libffi & libjava port for hppa-linux
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Cc: doko at cs dot tu-berlin dot de, tausq at debian dot org, java-patches at gcc dot gnu dot org, mark at codesourcery dot com, gdr at integrable-solutions dot net
- Date: Tue, 16 Mar 2004 17:29:34 -0500 (EST)
- Subject: Re: [patch 3.4/3.5] libffi & libjava port for hppa-linux
> Ok to checkin?
Ok for 3.5 with the cosmetic changes noted below.
Gaby and Mark, would please consider this patch for 3.3.4 and 3.4,
respectively. I believe that this patch is safe in that it provides
an optional feature and only touches the configuration/Makefile
infrastructure in a limited number of places.
> libjava:
> 2004-02-10 Randolph Chung <tausq@debian.org>
>
> * configure.in: Build java for hppa target.
> * libjava/configure.host (hppa-*): Add target.
> * libjava/sysdeps/pa/lock.h: New file.
>
>
> libffi:
> 2004-03-13 Matthias Klose <doko@debian.org>
>
> * Makefile.am: Update
> * Makefile.in: Regenerate.
> * src/pa/ffi.h.in: Remove.
> * src/pa/ffitarget.h: New file.
>
> 2004-02-10 Randolph Chung <tausq@debian.org>
>
> * Makefile.am: Add PA support.
> * Makefile.in: Regenerate.
> * include/Makefile.in: Regenerate.
> * configure.in: Add PA target.
> * configure: Regenerate.
> * src/pa/ffi.c: New file.
> * src/pa/ffi.h.in: Add PA support.
> * src/pa/linux.S: New file.
> * prep_cif.c: Add PA support.
>
> toplevel:
> 2004-03-13 Matthias Klose <doko@debian.org>
>
> * configure.in: For hppa-linux enable libgcj and dependent libs.
> * configure: Regenerate.
> + /* Make a small trampoline that will branch to our
> + * handler function. Use PC-relative addressing.
> + */
Remove extra '*'s and place final '*/' two spaces after final period.
Two spaces after a period. The same applies in other places.
> + tramp[0] = 0xeaa00000; /* b,l .+8, %r21 ; %r21 <- pc+8 */
> + tramp[1] = 0xd6a01c1e; /* depi 0,31,2,%r21 ; mask priv bits */
> + tramp[2] = 0x4aa10028; /* ldw 20(%r21),%r1 ; load plabel */
> + tramp[3] = 0x36b53ff1; /* ldo -8(%r21),%r21 ; get closure addr */
> + tramp[4] = 0x0c201096; /* ldw 0(%r1),%r22 ; address of handler */
> + tramp[5] = 0xeac0c000; /* bv %r0(%r22) ; branch to handler */
> + tramp[6] = 0x0c281093; /* ldw 4(%r1),%r19 ; GP of handler */
> + tramp[7] = ((UINT32)(ffi_closure_LINUX) & ~2);
The whitespace in the comments can be improved.
> + /* Flush d/icache -- have to flush up 2 two lines because of
+ * alignment
+ */
Same as above. Period needed at end of sentence.
+ /* Put arguments onto the stack and call ffi_closure_inner */
Ditto.
+#if 0 // defined _RELOCATABLE || defined __PIC__
+ .uleb128 0x1 ;# Augmentation size
+ .byte 0x1b ;# FDE Encoding (pcrel sdata4)
+#endif
Remove unnecessary code. You may want to provide a
comment why this isn't implemented.
+#if 1
+ {
+ int n;
+
+ debug(5, "Stack setup:\n");
+ for (n = 0; n < (bytes + 3) / 4; n++)
+ {
+ if ((n%4) == 0) { debug(5, "\n%08x: ", (unsigned int)(stack - n)); }
+ debug(5, "%08x ", *(stack - n));
+ }
+ debug(5, "\n");
+ }
+#endif
Remove unnecessary '#if 1' and '#endif' lines.
This is a very significant addition to the PA port.
Thanks,
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)