Gentoo Archives: gentoo-dev

From: Georgi Georgiev <chutz@×××.net>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Script to test instruction set.
Date: Wed, 13 Aug 2003 08:08:55
Message-Id: 20030813080851.GB19641%chutz@gg3.net
In Reply to: Re: [gentoo-dev] Script to test instruction set. by Joerg Plate
1 On 13/08/2003 at 07:04:09(+0200), Joerg Plate used 0.6K just to say:
2 > --- analyse-x86.pl 2003-08-13 06:46:05.000000000 +0200
3 > +++ analyse-x86 2003-08-13 06:53:16.424813198 +0200
4 > @@ -59,4 +59,7 @@
5 > my $print;
6 > +my %done;
7 > while (defined (my $instruction = <PIPE>)) {
8 > chomp $instruction;
9 > + next if $done{$instruction};
10 > + $done{$instruction}++;
11 > if (scalar (grep /^$instruction$/, "cmpxchg","xadd","bswap","invd","wbinvd","invlpg")) { $i486++; $print=1 }
12 >
13
14 Nice. Here is a little cosmetic patch to finish this off
15
16 $ patch
17 --- analyse-x86 2003-08-13 16:53:05.000000000 +0900
18 +++ analyse-x86 2003-08-13 16:50:58.000000000 +0900
19 @@ -8,7 +8,7 @@
20 #
21
22 # initialize everything to zero.
23 -my ($i486,$i586,$ppro,$mmx,$sse,$sse2,$amd,$amd2,$cpuid) = (0,0,0,0,0,0,0,0,0);
24 +my ($i486,$i586,$ppro,$mmx,$sse,$sse2,$amd,$amd2,$cpuid) = ("","","","","","","","","");
25 my ($vendor, $subarch);
26 # unfortunately there are mnemonic collissions between vendor sets
27 # so check vendor_id string, and enable relevant sets.
28
29 patching file analyse-x86
30 $ perl -pi -e 's/%4u/[%1.1s]/g' analyse-x86
31 $ perl -pi -e 's/\+\+/="Y"/g' analyse-x86
32 $ ./analyse-x86 /bin/ls
33 Checking vendor_id string...AuthenticAMD
34 Disassembling /bin/ls, please wait...
35 i486: [ ] i586: [ ] mmx: [ ] sse: [ ] 3dnow: [ ] ext3dnow: [Y]
36 /bin/ls will run on AMD Athlon (athlon) or higher processor.
37
38
39 --
40 (* Georgi Georgiev (* Are you tired of being a crash test dummy (*
41 *) chutz@×××.net *) for Microsoft? Discover Linux. -- Gareth *)
42 (* +81(90)6266-1163 (* Barnard (*
43
44 --
45 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Script to test instruction set. Georgi Georgiev <chutz@×××.net>