[roland/arm] ARM: Add missing sfi_breg in LDR_GLOBAL macro.

Message ID 20150206185148.806C02C3A92@topped-with-meat.com
State Committed
Headers

Commit Message

Roland McGrath Feb. 6, 2015, 6:51 p.m. UTC
  The main motivation for my refactoring of LDR_GLOBAL and making more things
use it was to consolidate the sfi_* uses there.  But then I forgot to add
the necessary ones to the rewritten macros!

I think it's trivially obvious that this does not affect arm*-linux*
configurations.  OK?


Thanks,
Roland


	* sysdeps/arm/sysdep.h [!PROF] [ARCH_HAS_T2 && !PIC] (LDR_GLOBAL):
	Use sfi_breg on ldr.
	[!PROF] [ARCH_HAS_T2 && PIC && ARM_PCREL_MOVW_OK] (LDR_GLOBAL):
	Likewise.
  

Comments

Joseph Myers Feb. 6, 2015, 8:55 p.m. UTC | #1
On Fri, 6 Feb 2015, Roland McGrath wrote:

> The main motivation for my refactoring of LDR_GLOBAL and making more things
> use it was to consolidate the sfi_* uses there.  But then I forgot to add
> the necessary ones to the rewritten macros!
> 
> I think it's trivially obvious that this does not affect arm*-linux*
> configurations.  OK?

OK.
  
Roland McGrath Feb. 6, 2015, 10:42 p.m. UTC | #2
Committed.

Thanks,
Roland
  

Patch

--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -198,7 +198,7 @@ 
 #  define LDR_GLOBAL(R, T, SYMBOL, CONSTANT)				\
 	movw	T, #:lower16:SYMBOL;					\
 	movt	T, #:upper16:SYMBOL;					\
-	ldr	R, [T, $CONSTANT]
+	sfi_breg T, ldr R, [\B, $CONSTANT]
 # elif defined (ARCH_HAS_T2) && defined (PIC) && ARM_PCREL_MOVW_OK
 #  define LDR_GLOBAL(R, T, SYMBOL, CONSTANT)				\
 	movw	R, #:lower16:_GLOBAL_OFFSET_TABLE_ - 97f - PC_OFS;	\
@@ -212,7 +212,7 @@ 
 97:	add	R, R, pc;						\
 98:	LDST_PC_INDEXED (ldr, T, T, T);					\
 	LDST_INDEXED (ldr, R, T, R, T);					\
-	ldr	R, [R, $CONSTANT]
+	sfi_breg R, ldr	R, [\B, $CONSTANT]
 # else
 #  define LDR_GLOBAL(R, T, SYMBOL, CONSTANT)		\
 	ldr	T, 99f;					\