public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Georgi Georgiev <chutz@gg3.net>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] Script to test instruction set.
Date: Wed, 13 Aug 2003 17:08:51 +0900	[thread overview]
Message-ID: <20030813080851.GB19641%chutz@gg3.net> (raw)
In-Reply-To: <87k79idu7q.fsf@psyche.kn-bremen.de>

On 13/08/2003 at 07:04:09(+0200), Joerg Plate used 0.6K just to say:
> --- analyse-x86.pl	2003-08-13 06:46:05.000000000 +0200
> +++ analyse-x86	2003-08-13 06:53:16.424813198 +0200
> @@ -59,4 +59,7 @@
>  my $print;
> +my %done;
>  while (defined (my $instruction = <PIPE>)) {
>  	chomp $instruction; 
> +	next if $done{$instruction};
> +	$done{$instruction}++;
>  	if (scalar (grep /^$instruction$/, "cmpxchg","xadd","bswap","invd","wbinvd","invlpg")) { $i486++; $print=1 }
> 

Nice. Here is a little cosmetic patch to finish this off

$ patch
--- analyse-x86     2003-08-13 16:53:05.000000000 +0900
+++ analyse-x86     2003-08-13 16:50:58.000000000 +0900
@@ -8,7 +8,7 @@
 #

 # initialize everything to zero.
-my ($i486,$i586,$ppro,$mmx,$sse,$sse2,$amd,$amd2,$cpuid) = (0,0,0,0,0,0,0,0,0);
+my ($i486,$i586,$ppro,$mmx,$sse,$sse2,$amd,$amd2,$cpuid) = ("","","","","","","","","");
 my ($vendor, $subarch);
 # unfortunately there are mnemonic collissions between vendor sets
 # so check vendor_id string, and enable relevant sets.

patching file analyse-x86
$ perl -pi -e 's/%4u/[%1.1s]/g' analyse-x86
$ perl -pi -e 's/\+\+/="Y"/g'   analyse-x86
$ ./analyse-x86 /bin/ls
Checking vendor_id string...AuthenticAMD
Disassembling /bin/ls, please wait...
i486: [ ] i586: [ ] mmx: [ ] sse: [ ] 3dnow: [ ] ext3dnow: [Y]
/bin/ls will run on AMD Athlon (athlon) or higher processor.


-- 
(*   Georgi Georgiev   (* Are you tired of being a crash test dummy    (*
*)    chutz@gg3.net    *) for Microsoft? Discover Linux. -- Gareth     *)
(*  +81(90)6266-1163   (* Barnard                                      (*

--
gentoo-dev@gentoo.org mailing list


  reply	other threads:[~2003-08-13  8:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-12 11:55 [gentoo-dev] Script to test instruction set Tavis Ormandy
2003-08-12 14:13 ` Norbert Kamenicky
2003-08-12 14:45   ` Tavis Ormandy
2003-08-12 14:26 ` Philippe Lafoucrière
2003-08-12 14:43   ` Tavis Ormandy
2003-08-12 15:37 ` Ned Ludd
2003-08-12 18:23 ` Georgi Georgiev
2003-08-13  5:04   ` Joerg Plate
2003-08-13  8:08     ` Georgi Georgiev [this message]
2003-08-13  8:24       ` Georgi Georgiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030813080851.GB19641%chutz@gg3.net \
    --to=chutz@gg3.net \
    --cc=chutz-dated-1061971733.2ba5e7f93fc9@gg3.net \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox