From: "David S. Miller" <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: Sparc32 long long division patch
Date: Fri, 21 Jan 2005 22:27:38 +0000 [thread overview]
Message-ID: <20050121142738.34b3cb84.davem@davemloft.net> (raw)
In-Reply-To: <41D1D929.8090004@wp.pl>
On Tue, 28 Dec 2004 23:07:37 +0100
Krzysztof Helt <krzysztof.h1@wp.pl> wrote:
> I discovered a bug in multiply/division trap code for sun4m CPUs. This
> bug comes from not quite correct register declaration for inline
> assembly.
Good catch Krzysztof. I've applied your patch to both 2.4.x and 2.6.x
I think it's still not %100 accurate, and could be cleaned up even
further. The only reason this code is the way it is, is so that
we can generate calls to the library functions with "." prefixes in
the symbol name which are hard to generate using normal C function
calls.
So the idea I have is to just make stubs with C callable names that
just jump to the real routines. So we'd have something like this:
1) A set of assembler stubs, such as:
.globl sparc_udiv, sparc_sdiv, sparc_umul, sparc_smul
sparc_udiv:
ba .udiv
nop
sparc_sdiv:
ba .sdiv
nop
sparc_umul:
ba .umul
nop
sparc_smul:
ba .mul
nop
Place this somewhere like arch/sparc/lib/muldiv_stubs.S and then
create a header file include/asm-sparc/muldiv.h that contains the
necessary extern declaractions for these functions.
2) Make muldiv.c call these stubs.
Then we don't need any of this fancy inline assembler.
next prev parent reply other threads:[~2005-01-21 22:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-28 22:07 Sparc32 long long division patch Krzysztof Helt
2004-12-28 22:18 ` William Lee Irwin III
2005-01-21 22:27 ` David S. Miller [this message]
2005-01-21 22:49 ` William Lee Irwin III
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=20050121142738.34b3cb84.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=sparclinux@vger.kernel.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 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.