public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: add SDIV/UDIV emulation for ARMv7 processors
Date: Sat, 22 Sep 2012 13:57:37 +0100	[thread overview]
Message-ID: <20120922125737.GJ15609@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1348314563-8436-1-git-send-email-murzin.v@gmail.com>

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.

We learnt that with the old FPA emulation code.  We're not making the same
mistake again.

If there's a problem with that, the folk to complain to are at ARM Ltd
for this "implementation defined" madness when it comes to instructions.

  reply	other threads:[~2012-09-22 12:57 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 [this message]
2012-09-24 10:17   ` Will Deacon

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=20120922125737.GJ15609@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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