From: "Charles L. Chandler" <cchandle@x2356.resnet.cornell.edu>
To: axp-list@redhat.com
Subject: Re: which alpha cpu???
Date: Wed, 27 Oct 1999 20:33:53 -0400 [thread overview]
Message-ID: <199910280033.UAA03890@x2356.resnet.cornell.edu> (raw)
In-Reply-To: Your message of "Wed, 27 Oct 1999 16:06:51 EDT." <38175B5B.2C6676E9@innova.net>
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
yep. compile and run the following program with ccc (the Compaq C Compiler).
I can provide a binary if you need it.
-Chaz
[-- Attachment #2: alpha_implver_amask_features.c --]
[-- Type: text/plain, Size: 1461 bytes --]
/*
// ALPHA_IMPLVER_AMASK_FEATURES.C V1.1
// Retrieve the Alpha microprocessor family and features
//
// Author: Steve Hoffman, Digital Equipment Corporation
// hoffman@xdelta.enet.dec.com, 3-Feb-1997.
//
// DEC C V5 and later under OpenVMS.
// Also operates under DEC C on Digital UNIX.
//
// See the Alpha Architecture Reference Manual for the current
// microprocessor family codes, as well as the instruction set
// extension definition codes.
*/
#include <stdio.h>
#include <c_asm.h>
main()
{
int implver = asm("implver %r0;");
int amask = asm("amask %a0,%r0;", -1 );
int definedbits = 0;
printf("Alpha Microprocessor Family:\n");
/*
// The "microprocessor family" includes the named microprocessor,
// and various microprocessors (if any) derived from it.
*/
printf(" DECchip 21%1.1d64 or variant\n", implver );
printf(" (EV%1.1d microprocessor core)\n", implver + 4 );
/*
// The amask bit is *clear* if the capability is *present*...
*/
printf("Alpha extensions available:\n");
if ( !~amask ) printf(" none.\n");
definedbits |= 1L<<0;
if ( ~amask & 1L<<0 ) printf(" byte-word, et al.\n");
definedbits |= 1L<<1;
if ( ~amask & 1L<<1 ) printf(" square root, et al.\n");
definedbits |= 1L<<8;
if ( ~amask & 1L<<8 ) printf(" Audio-video, et al.\n");
if ( ~amask & ~definedbits ) printf(" Unknown capability bit(s) present.");
return 1;
}
prev parent reply other threads:[~1999-10-28 0:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-27 20:06 which alpha cpu??? wae
1999-10-27 20:10 ` Michael Wm. Gilbert
1999-10-27 20:11 ` Matti Aarnio
1999-10-27 23:47 ` Uncle George
1999-10-28 11:22 ` Gaboli Ivan
1999-10-28 0:33 ` Charles L. Chandler [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox