From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15347 invoked by alias); 9 Oct 2007 07:53:14 -0000 Received: (qmail 15338 invoked by uid 22791); 9 Oct 2007 07:53:13 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Oct 2007 07:53:09 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id l997r7eb000831 for ; Tue, 9 Oct 2007 03:53:07 -0400 Received: from pobox-2.corp.redhat.com (pobox-2.corp.redhat.com [10.11.255.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l997r6ie014521; Tue, 9 Oct 2007 03:53:06 -0400 Received: from localhost.localdomain (vpn-6-23.fab.redhat.com [10.33.6.23]) by pobox-2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l997r5kf027492; Tue, 9 Oct 2007 03:53:06 -0400 Message-ID: <470B3361.90608@redhat.com> Date: Tue, 09 Oct 2007 07:53:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: Andrew Cagney CC: Frysk Hackers Subject: Re: ISA checks for factories References: <4703549C.30709@redhat.com> <4703F084.8050301@redhat.com> In-Reply-To: <4703F084.8050301@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00026.txt.bz2 Andrew Cagney wrote: > Phil, > > There is now also: > ISA isa = task.getISA() > which returns a frysk.isa.ISA, which looks smells and behaves like an > ENUM. This new ISA just the following attributes: > - family (i386, x8664, PPC) > - word size (4, 8) > - byte order (little, big) > leading to the combinations: IA32, X8664, PPC32LE, PPC32BE, PPC64LE, > PPC64BE. > Ok that makes sense, I got that from the original email, but ... > or better?: > > ISAMap map = new ISAMap("why am I here") > .put(ISA.IA32, new My(IA32)) > .put(ISA.X8664, new My(X8664)) > ; > ... > // Throws a RuntimeException if ISA missing > My o = (My) map.get(task.getISA); > > I'm still a little fuzzy on how it can be used to detected IA 32 on 64, or PPC32 On 64? Regards Phil