From: Tom Storey <tom@snnap.net>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Building for m68k
Date: Fri, 24 Apr 2020 11:14:38 +1000 [thread overview]
Message-ID: <CAFDgZgW9AUMzwh_fqo3vN97Xp2X12-1wuGU+htGH7nPk_25YWw@mail.gmail.com> (raw)
In-Reply-To: <20200424005101.GA11469@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
Sorry to ask what sounds like a dumb question, but is
cli;nonatomic_cas;sti
basically "disable interrupts, do something equivalent to cas, re-enable
interrupts"?
That is what I had intended to do by ifdefing out the cas instruction
itself. I wasn't going to leave it out because it's obviously there for a
reason. :-)
But simply for testing, it let me get beyond that point to see what else
was hiding away that would cause some problems.
On Fri, Apr 24, 2020, 10:51 Rich Felker <dalias@libc.org> wrote:
> On Fri, Apr 24, 2020 at 10:36:23AM +1000, Tom Storey wrote:
> > Thanks Rich.
> >
> > Just for gits and shiggles I tried #ifdef'ing out the cas.l instruction
> in
> > the atomic_arch.h file for 68020+ processors, and compilation then
>
> That won't work. But for NOMMU without a separate kernel domain it
> would work to do cli;nonatomic_cas;sti (not sure what the actual m68k
> insns for that are). There are plenty of places where a cas that does
> nothing will break code, probably even during common paths in simple
> programs.
>
> > proceeded along very smoothly for a while, but then hit another roadblock
> > in src/setjmp/m68k/longjmp.s where it tries to execute a floating point
> > instruction, and then subsequently fails with a "needs M68K fpu" error
> > message. So maybe there was a way to work around that, but FPU adds
> another
> > dimension to this problem.
>
> You can add a softfloat ABI; nominally there even is one, but it's
> clearly not working. The setjmp/longjmp files should be made .S
> instead of .s with #if around the floating point save/restore
> conditioned on being hardfloat ABI.
>
> > Trying to make this work is probably more than I'm really willing to take
> > on for this project, so I may put it on the back burner and perhaps look
> at
>
> You're really probably 90% there to at least having something that'll
> build and that should run if you wire up syscalls.
>
> Rich
>
[-- Attachment #2: Type: text/html, Size: 2545 bytes --]
next prev parent reply other threads:[~2020-04-24 1:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 2:05 Tom Storey
2020-04-23 2:32 ` Rich Felker
2020-04-23 5:04 ` Tom Storey
2020-04-23 16:30 ` Rich Felker
2020-04-24 0:36 ` Tom Storey
2020-04-24 0:51 ` Rich Felker
2020-04-24 1:14 ` Tom Storey [this message]
2020-04-24 1:20 ` Rich Felker
2020-04-24 2:29 ` Tom Storey
2020-04-24 2:37 ` 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=CAFDgZgW9AUMzwh_fqo3vN97Xp2X12-1wuGU+htGH7nPk_25YWw@mail.gmail.com \
--to=tom@snnap.net \
--cc=dalias@libc.org \
--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).