public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@tilera.com>
To: <libc-ports@sourceware.org>
Subject: [PATCH] tile: support tilegx32 in stackguard-macros.h
Date: Thu, 17 May 2012 18:55:00 -0000	[thread overview]
Message-ID: <201205171855.q4HItK7E023422@farm-0002.internal.tilera.com> (raw)

---
Pushed as trivial.

 ChangeLog.tile                   |    2 ++
 sysdeps/tile/stackguard-macros.h |    9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog.tile b/ChangeLog.tile
index 51acbc6..52b38b4 100644
--- a/ChangeLog.tile
+++ b/ChangeLog.tile
@@ -1,5 +1,7 @@
 2012-05-17  Chris Metcalf  <cmetcalf@tilera.com>
 
+	* sysdeps/tile/stackguard-macros.h: Support tilegx32.
+
 	* data/c++-types-tilepro-linux-gnu.data: Renamed from
 	data/c++-types-tile-linux-gnu.data.
 	* data/c++-types-tilegx-linux-gnu.data: New file.
diff --git a/sysdeps/tile/stackguard-macros.h b/sysdeps/tile/stackguard-macros.h
index 7679c0a..589ea2b 100644
--- a/sysdeps/tile/stackguard-macros.h
+++ b/sysdeps/tile/stackguard-macros.h
@@ -1,6 +1,13 @@
+#include <bits/wordsize.h>
+
 #ifdef __tilegx__
-# define STACK_CHK_GUARD \
+# if __WORDSIZE == 64
+#  define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; })
+# else
+#  define STACK_CHK_GUARD \
+  ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; })
+# endif
 #else
 # define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; })
-- 
1.7.1

                 reply	other threads:[~2012-05-17 18:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201205171855.q4HItK7E023422@farm-0002.internal.tilera.com \
    --to=cmetcalf@tilera.com \
    --cc=libc-ports@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).