From owner-freebsd-mips@FreeBSD.ORG Thu Dec 9 12:06:41 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 903E21065679 for ; Thu, 9 Dec 2010 12:06:41 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mx1.freebsd.org (Postfix) with ESMTP id 5524E8FC18 for ; Thu, 9 Dec 2010 12:06:41 +0000 (UTC) Received: by iwn9 with SMTP id 9so3633673iwn.19 for ; Thu, 09 Dec 2010 04:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=FMYdtexjV9QGDoczu4OnCUOdLFELls7uvyyO/+AXCko=; b=huWUSxHsF48RVVFfY108LIBt75q6CgJNXbzafjERxoXVJrWaSIPG/KK96W8/mCgBpC 4Grsbc1HshnEFZW+5HzpLUHYv0bJQAWYx0InKh/trSGB7itm9jOKtV7SeWZzWYWCX5kE jl4NJS+jQHy9KS10I/OADTi4rZtTxXiiCQyKs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=rTldz+xO/UcAanM5oaKK5xLlqrAIvm5Hr/FTuQQNe51u/rVoZlY8GIF909BYFEtPCE dtI+mFFjCoZJIwlyxivkUkNaq+E4Ofd9lZr43ZmaN9M4IZyoAczZCDh2PC3jh2ABjz4D a7jauJGpQyrGVAeA7ZTNzbOAHEQFlVzvC/rIs= MIME-Version: 1.0 Received: by 10.231.35.71 with SMTP id o7mr247994ibd.156.1291896400599; Thu, 09 Dec 2010 04:06:40 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.231.8.233 with HTTP; Thu, 9 Dec 2010 04:06:40 -0800 (PST) In-Reply-To: References: Date: Thu, 9 Dec 2010 13:06:40 +0100 X-Google-Sender-Auth: fc1GogP5YGsTO0-YqOLUNSPVb8M Message-ID: From: Robert Millan To: "Jayachandran C." Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: [PATCH] Retrieval of TLS pointer via RDHWR X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2010 12:06:41 -0000 2010/12/9 Jayachandran C. : > I'm not sure that the freebsd mips toolchain supports the __thread > directive yet. =C2=A0Were you able to test this from C? Yes, but not via __thread. I wrote a small program that sets the TLS pointer to an arbitrary value (via MIPS_SET_TLS), then issued rdhwr instruction using C inline assembly, and finally verified that both values are the same. (the toolchain I'm using doesn't support __thread either, but I submit this patch with the expectation that it can be useful later on) --=20 Robert Millan