From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27046 invoked by alias); 17 May 2012 18:55:36 -0000 Received: (qmail 27033 invoked by uid 22791); 17 May 2012 18:55:34 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 May 2012 18:55:22 +0000 Received: from farm-0002.internal.tilera.com (10.2.0.32) by USMAEXCH2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.694.0; Thu, 17 May 2012 14:55:21 -0400 Received: (from cmetcalf@localhost) by farm-0002.internal.tilera.com (8.13.8/8.12.11/Submit) id q4HItK7E023422; Thu, 17 May 2012 14:55:20 -0400 Message-ID: <201205171855.q4HItK7E023422@farm-0002.internal.tilera.com> From: Chris Metcalf Date: Thu, 17 May 2012 18:55:00 -0000 Subject: [PATCH] tile: support tilegx32 in stackguard-macros.h To: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00104.txt.bz2 --- 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 + * 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 + #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