cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/01/16:28:44

From: lubaldo AT adinet DOT com DOT uy
Message-Id: <3.0.1.32.19980801182427.007aaa30@adinet.com.uy>
Date: Sat, 01 Aug 1998 18:24:27 -0300
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>, djgpp AT delorie DOT com
Subject: Re: -m and -march= switches and a 5x86...
In-Reply-To: <m0z2EqC-000S4TC@inti.gov.ar>
References: <3 DOT 0 DOT 1 DOT 32 DOT 19980730202035 DOT 007a4c80 AT adinet DOT com DOT uy>
Mime-Version: 1.0

	Hello

At 10:13 AM 31/07/1998 +0000, SET wrote:
>lubaldo AT adinet DOT com DOT uy wrote:
>> 	I have GCC 2.8.1 installed.
>> 	I have tryed the -m386, -m486, -mpentium and -mpentiumpro switches and
>> they generate the exact same code... why is that?
>
>I tried -mpentiumpro and the code miserably(?) died with SIGILL because gcc 
>used the conditional assigment instruction (P6 core only).
	Mmm... with GCC 2.8.1? For me that doesn't happen... and in the
documentation says that the -m switch is to optimize for a certain
processor but the code will run on any processor (386 and up... unless
-march used...).

>Are you sure the assembler generated doesn't have even 1 line of difference? 
	I have not looked at the assembly... but I have used DOS 6.22 FC.EXE with
the /b switch on the executables (FC /b exe1.exe exe2.exe).

>What are you compiling?
	My game... 280kb (uncompressed and stripped, without debugging
information) C (not C++) executable.

>> 	I have tryed the -march=586 switch. It produces Pentium code that it is
>> not compatible with earlyer CPU's, like 486, 386... but it works on my
>> machine! 
>
>Who said GCC produces code that doesn't run in 486 when you use 586? Is in 
>the manuals?
	Yes, it is in the manuals, it says that the -march switch is to generate
code for a certain processor and up, but it will not be compatible with
older processors.

>I think gcc only changes the instruction order and aligment. 
	But also for the -m486 switch? It generates the same code for 386, 486,
pentiums and pentiums pro. Thats with the -m switch, but with the -march
switch it generates different code (and that OK, whats not OK is that with
the -march=pentium switch, the code works on my machine...).

>What P5 instruction is used?
	Hey SET: do you know me, and do you know that I don't know anything of
assembly... so I don't know what instructions it is using... why you ask then?

>> I have an AMD 5x86 processor, to my knowledge, this is a 486DX
>> compatible processor but it is not meant to be Pentium compatible... 
>
>True.
>
>> so what? 
>
>Yes, so what? ;-)))
	:-))) Tell me why it works with my super AMD 5x86 (super is kidding)! You
are the genius, not me! You have to know... If you have time, try it...

>> I have tryed also the -march=686 and that it doesn't work and thats
>> Ok... And the code produced by GCC with the -march=586 directive is
>> different from the one produced with the -march=486 directive... so: I
>> don't understand why it works... someone knows something?
>
>I think is just reordered to exploit the P5 pipes, that's all.
	Maybe... someone else knows? SET doesnt know anything... :-))) (just
kidding).
	And also, if it where that only, why with the -m586 switch it not produces
the same code? If it is compatible and it is only the reordering of the
instructions...

>> 	I hope I am not bothering too much with my silly intrigues...
>
>Why? I saw worst ;-)))
	((-: Thank you... :-))

>SET
>
>P.S. He is my friend, some answers are jokes. 
	Who have said that we are friends? :-b


Ivan Baldo:
lubaldo AT adinet DOT com DOT uy - http://members.xoom.com/baldo - ICQ 10215364
Phone: (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.

(If you have problems with the previous addresses, try this ones:
ibaldo AT usa DOT net, http://baldo.home.ml.org).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019