public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: Use PTR_REG macro to fix ILP32 bug and make code consistent
@ 2017-08-22 17:28 Steve Ellcey
  0 siblings, 0 replies; only message in thread
From: Steve Ellcey @ 2017-08-22 17:28 UTC (permalink / raw)
  To: libc-alpha; +Cc: Szabolcs Nagy

This patch is a one line change to use the PTR_REG macro in a cmp instruction
in dl-tlsdesc.S.  It only causes a problem in ILP32 mode but I would like
to submit it and check it in now so that the source code is consistent in
its use of PTR_REG.  Tested in ILP32 and LP64 modes on aarch64.

I think this counts as an 'obvious' fix, so I will check it in later today
if there are no objections.

Steve Ellcey
sellcey@cavium.com


2017-08-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
            Steve Ellcey  <sellcey@caviumnetworks.com>

        * sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_dynamic):
        Use PTR_REG macro in cmp instruction.


diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
index a70cfd5..3b2da62 100644
--- a/sysdeps/aarch64/dl-tlsdesc.S
+++ b/sysdeps/aarch64/dl-tlsdesc.S
@@ -208,7 +208,7 @@ _dl_tlsdesc_dynamic:
 	ldr	PTR_REG (2), [x1,#TLSDESC_MODID]
 	add	PTR_REG (0), PTR_REG (0), PTR_REG (2), lsl #(PTR_LOG_SIZE + 1)
 	ldr	PTR_REG (0), [x0] /* Load val member of DTV entry.  */
-	cmp	x0, #TLS_DTV_UNALLOCATED
+	cmp	PTR_REG (0), #TLS_DTV_UNALLOCATED
 	b.eq	2f
 	ldr	PTR_REG (1), [x1,#TLSDESC_MODOFF]
 	add	PTR_REG (0), PTR_REG (0), PTR_REG (1)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-22 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 17:28 [PATCH] aarch64: Use PTR_REG macro to fix ILP32 bug and make code consistent Steve Ellcey

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).