From owner-freebsd-sparc64@FreeBSD.ORG Tue Feb 17 20:51:41 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FFB616A4CE for ; Tue, 17 Feb 2004 20:51:41 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5680643D6A for ; Tue, 17 Feb 2004 20:51:41 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 1708 invoked from network); 18 Feb 2004 04:51:40 -0000 Received: from dsl017-045-168.spk4.dsl.speakeasy.net (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 18 Feb 2004 04:51:40 -0000 Received: from hydrogen.funkthat.com (uhktgb@localhost.funkthat.com [127.0.0.1])i1I4pc7Y091518; Tue, 17 Feb 2004 20:51:39 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i1I4pcvH091517; Tue, 17 Feb 2004 20:51:38 -0800 (PST) Date: Tue, 17 Feb 2004 20:51:38 -0800 From: John-Mark Gurney To: Greg Lewis Message-ID: <20040218045138.GH85686@funkthat.com> Mail-Followup-To: Greg Lewis , freebsd-sparc64@freebsd.org References: <20040217063042.GA94592@misty.eyesbeyond.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040217063042.GA94592@misty.eyesbeyond.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-sparc64@freebsd.org Subject: Re: Sparc assembler help (jdk13 port) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2004 04:51:41 -0000 Greg Lewis wrote this message on Mon, Feb 16, 2004 at 23:30 -0700: > I'm trying to get the jdk13 port running on sparc64. Unfortunately JDK > 1.3.1 runs on the Sparc in 32 bit mode under Solaris, so there were a > number of 32 bit vs. 64 bit problems. I think I've got most of the initial > stage of the build working correctly, however I'm running into some trouble > with the assembler code which 'translates the "Java" calling convention > into the "C" * calling convention used in native methods'. Since the code > was written for 32 bit mode it assumes a pointer can be passed in a single > 32 bit register, etc. Unfortunately my knowledge of assembler is very > limited and in particular I know nothing about Sparc assembler. > > I'd love to hear from someone who knows some Sparc assembler and in > particular how FreeBSD calls functions (i.e. how the arguments are > placed into registers or on the stack). Short of this, some pointers > to the right information may eventually yield some results. I have some experience in assembly, and can try to answer your questions.. Sparcs put the arguments into the o? registers (upto to 8)... You might want to check out www.sparc.com, and look at the SPARCv9 arch manual... check out chapter 5 which talks about registers... > The code itself is quite short, however I can't post it due to the way Sun > licenses their Java source code. If you've compiled any of the jdk* ports > though, then you've agreed to the appropriate license (Sun Community Source > License). I did d/l the sun java code a while back.. j2sdk-1_3_1-src.tar.gz.. guess it wasn't as far back as I thought.. :) > Note that I'm working on getting jdk13 working with the Classic VM. The > HotSpot VM is a whole lot more work (which is also why I'm not starting > with the jdk14 port). -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."