From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Re: Custom __set_thread_area for ARM
Date: Wed, 28 Jan 2015 09:59:05 +0100 [thread overview]
Message-ID: <20150128085905.GD32318@port70.net> (raw)
In-Reply-To: <54C8200B.8060102@mit.edu>
* Andy Lutomirski <luto@amacapital.net> [2015-01-27 15:32:27 -0800]:
> Does musl not use inline asm? ISTM something like:
>
it is arch specific code, which is currently either
- in asm in src/DIR/ARCH/foo.s if there is appropriate src/DIR/foo.c
- in c in a header under arch/ARCH
- in c in arch/ARCH/src/foo.c
- in asm in arch/ARCH/src/ARCH/foo.s if there is appropriate foo.c
so under src/thread you cannot have arch specific c code
with the current makefile, it has to be asm there
> struct user_desc desc;
> memset(&desc, 0, sizeof(desc));
> desc.base = whatever;
> // assign other fields
> if (set_thread_area(&desc) != 0)
> handle error;
>
> asm volatile ("mov %0,%%fs" : : "=rm" ((desc.entry_number << 3) | 3));
>
> would be a lot more comprehensible.
>
> --Andy
next prev parent reply other threads:[~2015-01-28 8:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 20:19 Oleg Ranevskyy
2015-01-14 3:09 ` Rich Felker
2015-01-22 1:45 ` Andy Lutomirski
2015-01-22 5:10 ` Rich Felker
2015-01-27 23:32 ` Andy Lutomirski
2015-01-28 8:59 ` Szabolcs Nagy [this message]
2015-01-28 14:47 ` 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=20150128085905.GD32318@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).