public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Paul Brook <paul@codesourcery.com>
Cc: binutils@sourceware.org
Subject: Re: [patch] Thumb-2 add PC misassembly
Date: Tue, 18 Jul 2006 15:51:00 -0000	[thread overview]
Message-ID: <1153237849.20443.45.camel@pc960.cambridge.arm.com> (raw)
In-Reply-To: <200607130054.33837.paul@codesourcery.com>

On Thu, 2006-07-13 at 00:54, Paul Brook wrote:
> In Thumb-2 "add reg, pc, #imm" should be assembled to the addw instruction, 
> not add.w (PC is not a valid source for the latter).
> The patch below fixes this.  It also uses the addw instruction in other cases 
> where the immediate is not valid for a normal add.
> The same applies for sub.
> 
> Tested with cross to arm-none-eabi.
> 
> Ok?
> 
> 2006-07-13  Paul Brook  <paul@codesourcery.com>
> 
> bfd/
> 	* bfd-in2.h: Regenerate.
> 	* libbfd.h: Regenerate.
> 	* reloc.c: Add BFD_RELOC_ARM_T32_ADD_IMM.
> gas/
> 	* tc-arm.c (do_t_add_sub): Use addw/subw when source is PC.
> 	(md_convert_frag): Use correct reloc for add_pc.  Use
> 	BFD_RELOC_ARM_T32_ADD_IMM for normal add/sum.
> 	(md_apply_fix): Handle BFD_RELOC_ARM_T32_ADD_IMM.
> 	(arm_force_relocation): Handle BFD_RELOC_ARM_T32_ADD_IMM.
> gas/testsuite/
> 	* gas/arm/thumb2_add.d: New test.
> 	* gas/arm/thumb2_add.s: New test.

Ok,

R.

      reply	other threads:[~2006-07-18 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-12 23:54 Paul Brook
2006-07-18 15:51 ` Richard Earnshaw [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=1153237849.20443.45.camel@pc960.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=binutils@sourceware.org \
    --cc=paul@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).