public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: add SDIV/UDIV emulation for ARMv7 processors
Date: Mon, 24 Sep 2012 11:17:09 +0100	[thread overview]
Message-ID: <20120924101708.GA18669@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20120922125737.GJ15609@n2100.arm.linux.org.uk>

On Sat, Sep 22, 2012 at 01:57:37PM +0100, Russell King - ARM Linux wrote:
> On Sat, Sep 22, 2012 at 03:49:23PM +0400, Vladimir Murzin wrote:
> > The Virtualization Extensions introduce the requirement for an ARMv7-A
> > implementation to include SDIV and UDIV.  Any implementation of the
> > Virtualization Extensions must include the SDIV and UDIV instructions
> > in the Thumb and ARM instruction sets.
> > 
> > In an ARMv7-A implementation that does not include the Virtualization
> > Extensions, it is IMPLEMENTATION DEFINED whether:
> >  *  SDIV and UDIV are not implemented
> >  *  SDIV and UDIV are implemented only in the Thumb instruction set
> >  *  SDIV and UDIV are implemented in the Thumb and ARM instruction sets.
> 
> We don't want to do emulation of instructions in the kernel because it's
> slow.  It's far better for userspace to figure this stuff out itself and
> select appropriate libraries and instructions to use than to have the CPU
> take an exception, have to save a lot of state, and then emulate the
> instruction.

I added some hwcaps for precisely this purpose. Please see idiva and idivt.

Will

      reply	other threads:[~2012-09-24 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22 11:49 [PATCH] arm: add SDIV/UDIV emulation for ARMv7 processors Vladimir Murzin
2012-09-22 12:57 ` Russell King - ARM Linux
2012-09-24 10:17   ` Will Deacon [this message]

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=20120924101708.GA18669@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox