From: David Daney <ddaney.cavm@gmail.com>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org, Paul Burton <paul.burton@imgtec.com>,
"Maciej W. Rozycki" <macro@linux-mips.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: asm: asmmacro: Replace "add" instructions with "addu"
Date: Wed, 21 Jan 2015 09:58:12 -0800 [thread overview]
Message-ID: <54BFE8B4.7060506@gmail.com> (raw)
In-Reply-To: <1421853983-28858-1-git-send-email-markos.chandras@imgtec.com>
On 01/21/2015 07:26 AM, Markos Chandras wrote:
> The "add" instruction is actually a macro in binutils and depending on
> the size of the immediate it can expand to an "addi" instruction.
> However, the "addi" instruction traps on overflows which is not
> something we want on address calculation.
>
I like it:
Acked-by: David Daney <david.daney@cavium.com>
> Link: http://www.linux-mips.org/archives/linux-mips/2015-01/msg00121.html
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: Maciej W. Rozycki <macro@linux-mips.org>
> Cc: <stable@vger.kernel.org> # v3.15+
Is it causing problems with existing kernels, or is it only in
preparation for MIPS r6? If the later, it probably isn't stable material.
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
> Moving this out of the R6 patchset as requested by Maciej
> ---
> arch/mips/include/asm/asmmacro.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
> index fe08084f5adb..42b90c9fd756 100644
> --- a/arch/mips/include/asm/asmmacro.h
> +++ b/arch/mips/include/asm/asmmacro.h
> @@ -304,7 +304,7 @@
> .set push
> .set noat
> SET_HARDFLOAT
> - add $1, \base, \off
> + addu $1, \base, \off
> .word LDD_MSA_INSN | (\wd << 6)
> .set pop
> .endm
> @@ -313,7 +313,7 @@
> .set push
> .set noat
> SET_HARDFLOAT
> - add $1, \base, \off
> + addu $1, \base, \off
> .word STD_MSA_INSN | (\wd << 6)
> .set pop
> .endm
>
prev parent reply other threads:[~2015-01-21 17:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 15:26 [PATCH] MIPS: asm: asmmacro: Replace "add" instructions with "addu" Markos Chandras
2015-01-21 15:26 ` Markos Chandras
2015-01-21 17:58 ` David Daney [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=54BFE8B4.7060506@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=markos.chandras@imgtec.com \
--cc=paul.burton@imgtec.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox