From: David Daney <ddaney@caviumnetworks.com>
To: Matthew Fortune <Matthew.Fortune@imgtec.com>
Cc: David Daney <david.s.daney@gmail.com>,
Rich Felker <dalias@libc.org>,
Andy Lutomirski <luto@amacapital.net>,
David Daney <ddaney.cavm@gmail.com>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
David Daney <david.daney@cavium.com>,
Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Subject: Re: [PATCH resend] MIPS: Allow FPU emulator to use non-stack area.
Date: Tue, 7 Oct 2014 09:04:36 -0700 [thread overview]
Message-ID: <54340F14.6030809@caviumnetworks.com> (raw)
In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235320F1E173@LEMAIL01.le.imgtec.org>
On 10/07/2014 02:13 AM, Matthew Fortune wrote:
>>>> the out-of-line execution trick, but do it somewhere other than in
>>>> stack memory.
>>> How do you answer Andy Lutomirski's question about what happens when a
>>> signal handler interrupts execution while the program counter is
>>> pointing at this "out-of-line execution" trampoline? This seems like a
>>> show-stopper for using anything other than the stack.
>> It would be nice to support, but not doing so would not be a regression
>> from current behavior.
>
> It seems appropriate to mention another issue which should be addressed as
> part of the overall FPU emulation work...
>
> From what I can see the out-of-line execution of delay slot instructions
> will break micromips R3 addiupc, and all MIPS32r6 and MIPS64r6 PC-relative
> instructions (inc load/store) as they will have the wrong base. Is there
> anything in the current set of proposals that can address this (beyond
> adding restrictions to what is ABI allowed in FPU branch delay slots)?
>
> This is an issue whether the stack is executable or not but does directly
> relate to the topic of FPU emulation. It sounds like the kernel would not
> be able to emulate a pc-relative load/store even if it was a special case
> as it would not run in the correct MM context? [be gentle, I'm no expert
> in this area].
>
I haven't studied the r6 ISA in depth. But you are correct, the r6 ISA
cannot be supported with the eXecute-Out-of-Line tricks due to the PC
relative instructions.
So probably the best path forward is to abandon the current method, and
bite the bullet and write an entire instruction set emulator. It
doesn't have to be fast.
David Daney
> Matthew
>
next prev parent reply other threads:[~2014-10-07 16:04 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 20:23 [PATCH resend] MIPS: Allow FPU emulator to use non-stack area David Daney
2014-10-06 20:54 ` Rich Felker
2014-10-06 21:18 ` David Daney
2014-10-06 21:18 ` David Daney
2014-10-06 21:31 ` Rich Felker
2014-10-06 21:45 ` David Daney
2014-10-06 21:45 ` David Daney
2014-10-06 21:58 ` Rich Felker
2014-10-06 22:17 ` David Daney
2014-10-06 22:17 ` David Daney
2014-10-06 23:08 ` Rich Felker
2014-10-06 23:38 ` Andy Lutomirski
2014-10-06 23:48 ` David Daney
2014-10-06 23:48 ` David Daney
2014-10-06 23:54 ` Andy Lutomirski
2014-10-07 0:05 ` Rich Felker
2014-10-07 0:11 ` Andrew Pinski
2014-10-07 0:21 ` Rich Felker
2014-10-07 0:28 ` Andrew Pinski
2014-10-07 0:29 ` Andy Lutomirski
2014-10-07 0:32 ` David Daney
2014-10-07 0:33 ` David Daney
2014-10-07 0:33 ` David Daney
2014-10-07 0:48 ` Andy Lutomirski
2014-10-07 0:49 ` Rich Felker
2014-10-07 4:50 ` David Daney
2014-10-07 9:13 ` Matthew Fortune
2014-10-07 9:13 ` Matthew Fortune
2014-10-07 9:13 ` Matthew Fortune
2014-10-07 10:52 ` James Hogan
2014-10-07 11:19 ` Rich Felker
2014-10-07 16:04 ` David Daney [this message]
2014-10-07 18:32 ` Leonid Yegoshin
2014-10-07 18:43 ` David Daney
2014-10-07 19:13 ` Leonid Yegoshin
2014-10-07 18:44 ` Andy Lutomirski
2014-10-07 18:50 ` David Daney
2014-10-07 19:09 ` Rich Felker
2014-10-07 19:16 ` Leonid Yegoshin
2014-10-07 19:21 ` Rich Felker
2014-10-07 19:27 ` Leonid Yegoshin
2014-10-07 19:28 ` Andy Lutomirski
2014-10-07 20:03 ` David Daney
2014-10-08 0:22 ` Andy Lutomirski
2014-10-07 19:40 ` Matthew Fortune
2014-10-07 19:40 ` Matthew Fortune
2014-10-07 11:11 ` Rich Felker
2014-10-07 16:08 ` David Daney
2014-10-07 16:08 ` David Daney
2014-10-07 18:16 ` Andy Lutomirski
2014-10-07 23:20 ` Ralf Baechle
2014-10-07 23:59 ` David Daney
2014-10-07 23:59 ` David Daney
2014-10-08 0:18 ` Chuck Ebbert
2014-10-08 0:18 ` Chuck Ebbert
2014-10-08 2:37 ` Rich Felker
2014-10-08 10:31 ` Paul Burton
2014-10-08 10:31 ` Paul Burton
2014-10-07 1:02 ` Kevin D. Kissell
2014-10-07 1:38 ` Rich Felker
2014-10-07 4:32 ` David Daney
2014-10-07 11:53 ` James Hogan
2014-10-07 11:53 ` James Hogan
2014-10-07 12:22 ` James Hogan
2014-10-07 12:22 ` James Hogan
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=54340F14.6030809@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=Leonid.Yegoshin@imgtec.com \
--cc=Matthew.Fortune@imgtec.com \
--cc=dalias@libc.org \
--cc=david.daney@cavium.com \
--cc=david.s.daney@gmail.com \
--cc=ddaney.cavm@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=luto@amacapital.net \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.