From patchwork Mon Jun 13 10:38:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 13030 Received: (qmail 10216 invoked by alias); 13 Jun 2016 10:48:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9334 invoked by uid 89); 13 Jun 2016 10:48:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [RFC v2][PATCH 16/27] Add Infinity THREAD_SELF macros to sysdeps/tile/nptl/tls.h Date: Mon, 13 Jun 2016 11:38:20 +0100 Message-Id: <1465814311-31470-17-git-send-email-gbenson@redhat.com> In-Reply-To: <1465814311-31470-1-git-send-email-gbenson@redhat.com> References: <1465814311-31470-1-git-send-email-gbenson@redhat.com> This commit adds Infinity THREAD_SELF macros for tile. --- sysdeps/tile/nptl/tls.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h index c908fb8..c98761b 100644 --- a/sysdeps/tile/nptl/tls.h +++ b/sysdeps/tile/nptl/tls.h @@ -122,13 +122,18 @@ register void *__thread_pointer asm ("tp"); ((struct pthread *) (__thread_pointer \ - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)) +/* Magic for Infinity to know how to do THREAD_SELF. */ +# define I8_THREAD_SELF I8_TS_REGISTER +# define I8_TS_REG_OFFSET REG_TP * sizeof (void *) +# define I8_TS_REG_BIAS -(TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + /* Magic for libthread_db to know how to do THREAD_SELF. */ #ifdef __tilegx__ # define DB_THREAD_SELF \ - REGISTER (64, 64, REG_TP * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + REGISTER (64, 64, REG_TP * 8, I8_TS_REG_BIAS) #else # define DB_THREAD_SELF \ - REGISTER (32, 32, REG_TP * 4, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + REGISTER (32, 32, REG_TP * 4, I8_TS_REG_BIAS) #endif /* Read member of the thread descriptor directly. */