From owner-freebsd-mips@FreeBSD.ORG Thu Feb 25 01:38:31 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 CF6161065673 for ; Thu, 25 Feb 2010 01:38:31 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB5A8FC2A for ; Thu, 25 Feb 2010 01:38:31 +0000 (UTC) Received: from mahan.org (crowTrobot [67.116.10.140]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id o1P1gbRe024016 for ; Wed, 24 Feb 2010 17:42:37 -0800 (PST) (envelope-from mahan@mahan.org) To: freebsd-mips@freebsd.org X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1 Date: Wed, 24 Feb 2010 17:38:26 -0800 Message-ID: <17060.1267061906@mahan.org> From: Patrick Mahan Subject: Writing MIPS assembler instructions in C 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, 25 Feb 2010 01:38:31 -0000 All, I keep banging my head against this one with little luck. I need to specify a specific MIPS register in some inline assembly code. Here is roughly the code I need to write - ld t0, 0(%0) .... : /* no output */ : "r" (addr) : "t0" ); I can post more later if required, but I have a very good reason for needing "t0". This is part of some code built on the linux platform and there they are using "%[rt]" which I cannot find a description. Thanks for the help, Patrick