From owner-freebsd-amd64@FreeBSD.ORG Fri Jan 4 21:43:14 2008 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BC1B16A418 for ; Fri, 4 Jan 2008 21:43:14 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5C54613C442 for ; Fri, 4 Jan 2008 21:43:14 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m04L7qep019183; Fri, 4 Jan 2008 13:07:52 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.1/8.14.1/Submit) id m04L7psh019182; Fri, 4 Jan 2008 13:07:51 -0800 (PST) (envelope-from obrien) Date: Fri, 4 Jan 2008 13:07:51 -0800 From: "David O'Brien" To: Nate Eldredge Message-ID: <20080104210751.GA18913@dragon.NUXI.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-amd64@freebsd.org Subject: Re: how do i write assembly code in amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 21:43:14 -0000 On Sat, Dec 22, 2007 at 08:29:46PM -0800, Nate Eldredge wrote: > On Sun, 23 Dec 2007, zhang feng wrote: >> i write asm32 code in linux.when i run the code in freebsd amd64, it >> cannt run. someone give me a help for coding asm64 in freebsd. > > amd64 has a whole different instruction set than 32-bit x86, Not true at all. 97% of the instructions are the same. What is different is the operand size and the C calling ABI. For the most part, code can be port by simple s/%e/%r/. -- -- David (obrien@FreeBSD.org)