mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Bits deduplication: current situation
Date: Tue, 26 Jan 2016 21:26:00 +0100	[thread overview]
Message-ID: <20160126202559.GM9621@port70.net> (raw)
In-Reply-To: <CACcSVPHzHEo8f7VzoX9W7EGV-q_oqsYHeKW6bUg7Wg5=7MdBaQ@mail.gmail.com>

* Dan Gohman <sunfish@mozilla.com> [2016-01-26 07:16:08 -0800]:
> On Tue, Jan 26, 2016 at 2:18 AM, Szabolcs Nagy <nsz@port70.net> wrote:
> > * Dan Gohman <sunfish@mozilla.com> [2016-01-25 21:03:54 -0800]:
> > > On Mon, Jan 25, 2016 at 1:32 PM, Szabolcs Nagy <nsz@port70.net> wrote:
> > > > * Rich Felker <dalias@libc.org> [2016-01-25 16:00:05 -0500]:
> > > > >
> > > > > I'm pretty sure int64_t is long on all LP64 targets we support. Are
> > > > > there others that differ?
> > > >
> > >
> > > I'm working on an architecture which does, though there's no musl support
> > > for it currently.
> > >
> >
> > in gcc stdint.h only depends on libc/os and sizeof(long),
> > not on architecture.
> >
> > (e.g. openbsd uses long long, glibc uses long consistently
> > for all LP64 arch abis.)
> >
> 
> I've been assuming that, in the absence of compatibility constraints (for
> example on a new architecture), it would be reasonable for hypothetical new
> musl, glibc, or newlib ports to arrange to be ABI compatible at the level
> of a freestanding implementation (in the C standard sense), which would
> include <stdint.h>. Is this an incorrect assumption, from your perspective?

it is correct in principle, but it means a bit more toolchain
work to support an inconsistent arch and it can bite you if
you work with historical code with invalid assumptions.

gcc/musl/glibc/linux all use consistent typedefs for all
64bit archs, most likely other projects do the same.
in most cases it should be easy to do the typedefs
differently for a new arch, but there might be caveats..

i think if you want to design a freestanding c language abi
for your arch then it makes sense to follow what's already
there (unless you have some specific reason to deviate).


  reply	other threads:[~2016-01-26 20:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25  3:59 Rich Felker
2016-01-25  8:08 ` Natanael Copa
2016-01-25 17:17   ` Rich Felker
2016-01-25 10:46 ` Laurent Bercot
2016-01-25 14:56 ` Ward Willats
2016-01-25 15:37   ` Szabolcs Nagy
2016-01-25 19:22 ` Dan Gohman
2016-01-25 21:00   ` Rich Felker
2016-01-25 21:32     ` Szabolcs Nagy
2016-01-26  5:03       ` Dan Gohman
2016-01-26 10:18         ` Szabolcs Nagy
2016-01-26 15:16           ` Dan Gohman
2016-01-26 20:26             ` Szabolcs Nagy [this message]
2016-01-26 20:17         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160126202559.GM9621@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).