public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Update OpenBSD/mips64 support
@ 2005-04-13 22:14 Mark Kettenis
  2005-04-13 22:30 ` Eric Christopher
  2005-04-13 22:35 ` Thiemo Seufer
  0 siblings, 2 replies; 13+ messages in thread
From: Mark Kettenis @ 2005-04-13 22:14 UTC (permalink / raw)
  To: binutils

This makes gas work for the new 64-bit OpenBSD/sgi aka OpenBSD/mips64.
It's fairly obvious, except for the fact that it replaces an older
32-bit OpenBSD/mips config.  I don't think it's worth retaining that
config since the members of that family have been discontinued with
OpenBSD/arc 2.3 and OpenBSD/pmax 2.7.  The latter was released over 5
years ago.

Ok?


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.tgt: Set emulation for mips-*-openbsd*.
	* configure.in: Set default ABI for mips64-*-openbsd*.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.176
diff -u -p -r1.176 configure.in
--- configure.in 6 Apr 2005 15:42:14 -0000 1.176
+++ configure.in 13 Apr 2005 22:07:41 -0000
@@ -281,6 +281,9 @@ changequote([,])dnl
 	  mips*-linux*)
 	    mips_default_abi=O32_ABI
 	    ;;
+	  mips64*-openbsd*)
+	    mips_default_abi=N64_ABI
+	    ;;
 	  *)
 	    mips_default_abi=NO_ABI
 	    ;;
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gas/configure.tgt,v
retrieving revision 1.7
diff -u -p -r1.7 configure.tgt
--- configure.tgt 11 Apr 2005 22:31:37 -0000 1.7
+++ configure.tgt 13 Apr 2005 22:07:41 -0000
@@ -300,7 +300,7 @@ case ${generic_target} in
   mips-*-sysv*)				fmt=ecoff ;;
   mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
   mips-*-netbsd*)			fmt=elf ;;
-  mips-*-openbsd*)			fmt=elf ;;
+  mips-*-openbsd*)			fmt=elf em=tmips ;;
 
   mmix-*-*)				fmt=elf ;;
 

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:14 [RFA] Update OpenBSD/mips64 support Mark Kettenis
@ 2005-04-13 22:30 ` Eric Christopher
  2005-04-13 22:37   ` Mark Kettenis
  2005-04-13 22:35 ` Thiemo Seufer
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Christopher @ 2005-04-13 22:30 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils


> +	  mips64*-openbsd*)
> +	    mips_default_abi=N64_ABI
> +	    ;;

Not n32?

-eric

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:14 [RFA] Update OpenBSD/mips64 support Mark Kettenis
  2005-04-13 22:30 ` Eric Christopher
@ 2005-04-13 22:35 ` Thiemo Seufer
  2005-04-13 22:45   ` Mark Kettenis
  1 sibling, 1 reply; 13+ messages in thread
From: Thiemo Seufer @ 2005-04-13 22:35 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils

Mark Kettenis wrote:
> This makes gas work for the new 64-bit OpenBSD/sgi aka OpenBSD/mips64.
> It's fairly obvious, except for the fact that it replaces an older
> 32-bit OpenBSD/mips config.  I don't think it's worth retaining that
> config since the members of that family have been discontinued with
> OpenBSD/arc 2.3 and OpenBSD/pmax 2.7.  The latter was released over 5
> years ago.
> 
> Ok?
> 
> 
> Index: ChangeLog
> from  Mark Kettenis  <kettenis@gnu.org>
> 
> 	* configure.tgt: Set emulation for mips-*-openbsd*.
> 	* configure.in: Set default ABI for mips64-*-openbsd*.
> 	* configure: Regenerate.
> 
> Index: configure.in
> ===================================================================
> RCS file: /cvs/src/src/gas/configure.in,v
> retrieving revision 1.176
> diff -u -p -r1.176 configure.in
> --- configure.in 6 Apr 2005 15:42:14 -0000 1.176
> +++ configure.in 13 Apr 2005 22:07:41 -0000
> @@ -281,6 +281,9 @@ changequote([,])dnl
>  	  mips*-linux*)
>  	    mips_default_abi=O32_ABI
>  	    ;;
> +	  mips64*-openbsd*)
> +	    mips_default_abi=N64_ABI

Is n64 as default a good choice? n32 provides better performance unless
you exceed 2GB address space.

> +	    ;;
>  	  *)
>  	    mips_default_abi=NO_ABI
>  	    ;;
> Index: configure.tgt
> ===================================================================
> RCS file: /cvs/src/src/gas/configure.tgt,v
> retrieving revision 1.7
> diff -u -p -r1.7 configure.tgt
> --- configure.tgt 11 Apr 2005 22:31:37 -0000 1.7
> +++ configure.tgt 13 Apr 2005 22:07:41 -0000
> @@ -300,7 +300,7 @@ case ${generic_target} in
>    mips-*-sysv*)				fmt=ecoff ;;
>    mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
>    mips-*-netbsd*)			fmt=elf ;;
> -  mips-*-openbsd*)			fmt=elf ;;
> +  mips-*-openbsd*)			fmt=elf em=tmips ;;
>  

Is mips-dec-openbsd* mentioned above it obsolete? I figure that's the
pmax port you mentioned above.


Thiemo

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:30 ` Eric Christopher
@ 2005-04-13 22:37   ` Mark Kettenis
  2005-04-13 22:39     ` Eric Christopher
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Kettenis @ 2005-04-13 22:37 UTC (permalink / raw)
  To: echristo; +Cc: binutils

   From: Eric Christopher <echristo@redhat.com>
   Date: Wed, 13 Apr 2005 15:30:53 -0700

   > +	  mips64*-openbsd*)
   > +	    mips_default_abi=N64_ABI
   > +	    ;;

   Not n32?

Nope.  OpenBSD/sgi is fully 64-bit.  Don't think it even can execute
32-bit code.

Mark

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:37   ` Mark Kettenis
@ 2005-04-13 22:39     ` Eric Christopher
  2005-04-13 22:48       ` Mark Kettenis
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Christopher @ 2005-04-13 22:39 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils

On Thu, 2005-04-14 at 00:37 +0200, Mark Kettenis wrote:
>    From: Eric Christopher <echristo@redhat.com>
>    Date: Wed, 13 Apr 2005 15:30:53 -0700
> 
>    > +	  mips64*-openbsd*)
>    > +	    mips_default_abi=N64_ABI
>    > +	    ;;
> 
>    Not n32?
> 
> Nope.  OpenBSD/sgi is fully 64-bit.  Don't think it even can execute
> 32-bit code.

n32 is 32-bit pointers and 64-bit registers. 64-bit registers are
required. It's also a heck of a lot faster than n64 :)

-eric

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:35 ` Thiemo Seufer
@ 2005-04-13 22:45   ` Mark Kettenis
  2005-04-13 23:34     ` Thiemo Seufer
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Kettenis @ 2005-04-13 22:45 UTC (permalink / raw)
  To: ths; +Cc: binutils

   Date: Wed, 13 Apr 2005 23:56:33 +0200
   From: Thiemo Seufer <ths@networkno.de>

   Mark Kettenis wrote:
   > diff -u -p -r1.176 configure.in
   > --- configure.in 6 Apr 2005 15:42:14 -0000 1.176
   > +++ configure.in 13 Apr 2005 22:07:41 -0000
   > @@ -281,6 +281,9 @@ changequote([,])dnl
   >  	  mips*-linux*)
   >  	    mips_default_abi=O32_ABI
   >  	    ;;
   > +	  mips64*-openbsd*)
   > +	    mips_default_abi=N64_ABI

   Is n64 as default a good choice? n32 provides better performance unless
   you exceed 2GB address space.

OpenBSD/mips64 only supports fully 64-bit code.

   > diff -u -p -r1.7 configure.tgt
   > --- configure.tgt 11 Apr 2005 22:31:37 -0000 1.7
   > +++ configure.tgt 13 Apr 2005 22:07:41 -0000
   > @@ -300,7 +300,7 @@ case ${generic_target} in
   >    mips-*-sysv*)				fmt=ecoff ;;
   >    mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
   >    mips-*-netbsd*)			fmt=elf ;;
   > -  mips-*-openbsd*)			fmt=elf ;;
   > +  mips-*-openbsd*)			fmt=elf em=tmips ;;
   >  

   Is mips-dec-openbsd* mentioned above it obsolete? I figure that's the
   pmax port you mentioned above.

Suppose so.  The current config.guess won't produce that triplet.  And
specifying that target by hand won't work either since that results in
an attempt to build an ELF gas with a BFD that only supports ECOFF.

I'll happily remove that config.

Mark

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:39     ` Eric Christopher
@ 2005-04-13 22:48       ` Mark Kettenis
  2005-04-13 22:51         ` Eric Christopher
  2005-04-14  1:24         ` Richard Henderson
  0 siblings, 2 replies; 13+ messages in thread
From: Mark Kettenis @ 2005-04-13 22:48 UTC (permalink / raw)
  To: echristo; +Cc: binutils

   From: Eric Christopher <echristo@redhat.com>
   Date: Wed, 13 Apr 2005 15:39:16 -0700

   On Thu, 2005-04-14 at 00:37 +0200, Mark Kettenis wrote:
   >    From: Eric Christopher <echristo@redhat.com>
   >    Date: Wed, 13 Apr 2005 15:30:53 -0700
   > 
   >    > +	  mips64*-openbsd*)
   >    > +	    mips_default_abi=N64_ABI
   >    > +	    ;;
   > 
   >    Not n32?
   > 
   > Nope.  OpenBSD/sgi is fully 64-bit.  Don't think it even can execute
   > 32-bit code.

   n32 is 32-bit pointers and 64-bit registers. 64-bit registers are
   required. It's also a heck of a lot faster than n64 :)

And a bit of a security nightmare if you have a 64-bit kernel...
That's why OpenBSD doesn't do it that way.  It's a deliberate choice ;-).

Mark

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:48       ` Mark Kettenis
@ 2005-04-13 22:51         ` Eric Christopher
  2005-04-14 10:42           ` Maciej W. Rozycki
  2005-04-14  1:24         ` Richard Henderson
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Christopher @ 2005-04-13 22:51 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils


> And a bit of a security nightmare if you have a 64-bit kernel...
> That's why OpenBSD doesn't do it that way.  It's a deliberate choice ;-).

*shrug* OK. Just checking.

The patch is OK then.

-eric

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:45   ` Mark Kettenis
@ 2005-04-13 23:34     ` Thiemo Seufer
  2005-04-14 17:04       ` Mark Kettenis
  0 siblings, 1 reply; 13+ messages in thread
From: Thiemo Seufer @ 2005-04-13 23:34 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: binutils

Mark Kettenis wrote:
[snip]
>    > diff -u -p -r1.7 configure.tgt
>    > --- configure.tgt 11 Apr 2005 22:31:37 -0000 1.7
>    > +++ configure.tgt 13 Apr 2005 22:07:41 -0000
>    > @@ -300,7 +300,7 @@ case ${generic_target} in
>    >    mips-*-sysv*)				fmt=ecoff ;;
>    >    mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
>    >    mips-*-netbsd*)			fmt=elf ;;
>    > -  mips-*-openbsd*)			fmt=elf ;;
>    > +  mips-*-openbsd*)			fmt=elf em=tmips ;;
>    >  
> 
>    Is mips-dec-openbsd* mentioned above it obsolete? I figure that's the
>    pmax port you mentioned above.
> 
> Suppose so.  The current config.guess won't produce that triplet.  And
> specifying that target by hand won't work either since that results in
> an attempt to build an ELF gas with a BFD that only supports ECOFF.
> 
> I'll happily remove that config.

Please do so.


Thiemo

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:48       ` Mark Kettenis
  2005-04-13 22:51         ` Eric Christopher
@ 2005-04-14  1:24         ` Richard Henderson
  2005-04-14 10:44           ` Maciej W. Rozycki
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2005-04-14  1:24 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: echristo, binutils

On Thu, Apr 14, 2005 at 12:48:30AM +0200, Mark Kettenis wrote:
>    n32 is 32-bit pointers and 64-bit registers. 64-bit registers are
>    required. It's also a heck of a lot faster than n64 :)
> 
> And a bit of a security nightmare if you have a 64-bit kernel...

I wouldn't say that.  Think of it as merely a 64-bit application that
Just So Happens to only use the low 31 bits.

The only thing the kernel needs to do is for mmap (0, ...) choose an
address in the low 32 bits.  For everything else, the application will
provide a correct value or its broken and will suffer the consequences.

Unlike o32, you don't have to sign or zero-extend syscall arguments at
kernel entry points, because the application will have already done
that because of how n32 passes 32-bit arguments.

But it's not like I'm going to work on it, so feel free to ignore me.


r~

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 22:51         ` Eric Christopher
@ 2005-04-14 10:42           ` Maciej W. Rozycki
  0 siblings, 0 replies; 13+ messages in thread
From: Maciej W. Rozycki @ 2005-04-14 10:42 UTC (permalink / raw)
  To: Eric Christopher; +Cc: Mark Kettenis, binutils

On Wed, 13 Apr 2005, Eric Christopher wrote:

> > And a bit of a security nightmare if you have a 64-bit kernel...
> > That's why OpenBSD doesn't do it that way.  It's a deliberate choice ;-).
> 
> *shrug* OK. Just checking.

 Well I'm glad to see another person sharing my view.  N32 is backwards.

  Maciej

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-14  1:24         ` Richard Henderson
@ 2005-04-14 10:44           ` Maciej W. Rozycki
  0 siblings, 0 replies; 13+ messages in thread
From: Maciej W. Rozycki @ 2005-04-14 10:44 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Mark Kettenis, echristo, binutils

On Wed, 13 Apr 2005, Richard Henderson wrote:

> I wouldn't say that.  Think of it as merely a 64-bit application that
> Just So Happens to only use the low 31 bits.
> 
> The only thing the kernel needs to do is for mmap (0, ...) choose an
> address in the low 32 bits.  For everything else, the application will
> provide a correct value or its broken and will suffer the consequences.

 Well, that's the kernel part.  There's userland as well -- and welcome to 
the world of LFS: -EFBIG and unmappable files...

  Maciej

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

* Re: [RFA] Update OpenBSD/mips64 support
  2005-04-13 23:34     ` Thiemo Seufer
@ 2005-04-14 17:04       ` Mark Kettenis
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Kettenis @ 2005-04-14 17:04 UTC (permalink / raw)
  To: ths; +Cc: binutils

   Date: Thu, 14 Apr 2005 00:55:17 +0200
   From: Thiemo Seufer <ths@networkno.de>

   >    Is mips-dec-openbsd* mentioned above it obsolete? I figure that's the
   >    pmax port you mentioned above.
   > 
   > Suppose so.  The current config.guess won't produce that triplet.  And
   > specifying that target by hand won't work either since that results in
   > an attempt to build an ELF gas with a BFD that only supports ECOFF.
   > 
   > I'll happily remove that config.

   Please do so.

Thanks,

The attached patch is what I committed.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.tgt: Set emulation for mips-*-openbsd*.
	Remove broken mips-dec-openbsd* config.
	* configure.in: Set default ABI for mips64-*-openbsd*.
	* configure: Regenerate.

Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gas/configure.tgt,v
retrieving revision 1.7
diff -u -p -r1.7 configure.tgt
--- configure.tgt 11 Apr 2005 22:31:37 -0000 1.7
+++ configure.tgt 14 Apr 2005 16:53:18 -0000
@@ -284,7 +284,6 @@ case ${generic_target} in
   mcore-*-pe)				fmt=coff em=pe bfd_gas=yes ;;
 
   # don't change em like *-*-bsd does
-  mips-dec-openbsd*)			fmt=elf endian=little ;;
   mips-sony-bsd*)			fmt=ecoff ;;
   mips-*-ultrix*)			fmt=ecoff endian=little ;;
   mips-*-osf*)				fmt=ecoff endian=little ;;
@@ -300,7 +299,7 @@ case ${generic_target} in
   mips-*-sysv*)				fmt=ecoff ;;
   mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
   mips-*-netbsd*)			fmt=elf ;;
-  mips-*-openbsd*)			fmt=elf ;;
+  mips-*-openbsd*)			fmt=elf em=tmips ;;
 
   mmix-*-*)				fmt=elf ;;
 
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.177
diff -u -p -r1.177 configure.in
--- configure.in 14 Apr 2005 05:26:31 -0000 1.177
+++ configure.in 14 Apr 2005 16:53:19 -0000
@@ -246,6 +246,9 @@ changequote([,])dnl
 	  mips*-linux*)
 	    mips_default_abi=O32_ABI
 	    ;;
+	  mips64*-openbsd*)
+	    mips_default_abi=N64_ABI
+	    ;;
 	  *)
 	    mips_default_abi=NO_ABI
 	    ;;

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

end of thread, other threads:[~2005-04-14 17:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-13 22:14 [RFA] Update OpenBSD/mips64 support Mark Kettenis
2005-04-13 22:30 ` Eric Christopher
2005-04-13 22:37   ` Mark Kettenis
2005-04-13 22:39     ` Eric Christopher
2005-04-13 22:48       ` Mark Kettenis
2005-04-13 22:51         ` Eric Christopher
2005-04-14 10:42           ` Maciej W. Rozycki
2005-04-14  1:24         ` Richard Henderson
2005-04-14 10:44           ` Maciej W. Rozycki
2005-04-13 22:35 ` Thiemo Seufer
2005-04-13 22:45   ` Mark Kettenis
2005-04-13 23:34     ` Thiemo Seufer
2005-04-14 17:04       ` Mark Kettenis

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