diff mbox series

Fix a missing case of PR 21458 similar to fc6141f097056f830a412afebed8d81a9d72b696.

Message ID 20180724084825.GA18419@ulegcprs1.emea.nsn-net.net
State New
Headers show
Series Fix a missing case of PR 21458 similar to fc6141f097056f830a412afebed8d81a9d72b696. | expand

Commit Message

Robert Schiele July 24, 2018, 8:48 a.m. UTC
The original fix for PR 21458 was causing some issues, which were
addressed to be fixed with a follow-up fix
fc6141f097056f830a412afebed8d81a9d72b696.  Unfortunately that follow-up
fix missed one case, which is handled by this fix.

Change-Id: Ie32e3f2514b3e4b6b35c0a693de6b65ef010bb9d
---
 gas/config/tc-arm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Kyrill Tkachov July 24, 2018, 9:05 a.m. UTC | #1
Hi Robert,

On 24/07/18 09:48, Robert Schiele wrote:
> The original fix for PR 21458 was causing some issues, which were
> addressed to be fixed with a follow-up fix
> fc6141f097056f830a412afebed8d81a9d72b696.  Unfortunately that follow-up
> fix missed one case, which is handled by this fix.
>
> Change-Id: Ie32e3f2514b3e4b6b35c0a693de6b65ef010bb9d
> ---
>  gas/config/tc-arm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Patches to gas should be sent to the binutils list: binutils@sourceware.org
rather than gcc-patches.

Cheers,
Kyrill

> diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
> index feb725d..c92b6ef 100644
> --- a/gas/config/tc-arm.c
> +++ b/gas/config/tc-arm.c
> @@ -10836,11 +10836,12 @@ do_t_adr (void)
>        inst.instruction |= Rd << 4;
>      }
>
> -  if (inst.reloc.exp.X_op == O_symbol
> +  if (support_interwork
> +      && inst.reloc.exp.X_op == O_symbol
>        && inst.reloc.exp.X_add_symbol != NULL
>        && S_IS_DEFINED (inst.reloc.exp.X_add_symbol)
>        && THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))
> -    inst.reloc.exp.X_add_number += 1;
> +    inst.reloc.exp.X_add_number |= 1;
>  }
>
>  /* Arithmetic instructions for which there is just one 16-bit
> -- 
> 2.4.6
Robert Schiele July 24, 2018, 9:58 a.m. UTC | #2
On Tue, Jul 24, 2018 at 11:05 AM Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Patches to gas should be sent to the binutils list: binutils@sourceware.org
> rather than gcc-patches.

That indeed is a very good point and I'd like to express my apologies
for that. Obviously I did too many things at one point in time again.

Robert
diff mbox series

Patch

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index feb725d..c92b6ef 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -10836,11 +10836,12 @@  do_t_adr (void)
       inst.instruction |= Rd << 4;
     }
 
-  if (inst.reloc.exp.X_op == O_symbol
+  if (support_interwork
+      && inst.reloc.exp.X_op == O_symbol
       && inst.reloc.exp.X_add_symbol != NULL
       && S_IS_DEFINED (inst.reloc.exp.X_add_symbol)
       && THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))
-    inst.reloc.exp.X_add_number += 1;
+    inst.reloc.exp.X_add_number |= 1;
 }
 
 /* Arithmetic instructions for which there is just one 16-bit