486 or 686 default for 32bit ?

General FreeBASIC programming questions.
Post Reply
SARG
Posts: 1763
Joined: May 27, 2005 7:15
Location: FRANCE

486 or 686 default for 32bit ?

Post by SARG »

Following this topic viewtopic.php?t=31534 I did some changes related to floats (comparison, loading, sign) in the x86 emitter using faster instructions, less instructions, less registers. All of that needs an asm instruction brought by 686 processor.

I wonder if changing the default architecture 486 by 686 could be a big problem ?

As 686 appears in 1995 I guess that not a lot of used PC are still 486. In case of issue using -arch 486 allows to go back.
coderJeff
Site Admin
Posts: 4323
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: 486 or 686 default for 32bit ?

Post by coderJeff »

Sounds good to me.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: 486 or 686 default for 32bit ?

Post by marcov »

The introduction date of the 1995 is not relevant. The date that the last non 686 CPU stopped selling is the date you are searching for. and non 686 CPUs were sold till say 2010. Specially with low power industrial and networking stuff you could find them (like Via C7/Eden), because the lower end Intel CPUs of the day were still P4s and ran hot.

Afaik the Linux kernel has done this long ago, so on Linux 686 should be the norm.
SARG
Posts: 1763
Joined: May 27, 2005 7:15
Location: FRANCE

Re: 486 or 686 default for 32bit ?

Post by SARG »

1995 was just a landmark. Anyway thanks for the precisions. :)

And as no one reacts, let's go.
deltarho[1859]
Posts: 4306
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: 486 or 686 default for 32bit ?

Post by deltarho[1859] »

I have been using '-arch 686' hard-wired in my WinFBE SetCompilerSwitches User Tool for over two years and, apparently, without issue. The form has a 'Check3State button' ( -arch ? ). I also wrote a little User Tool called 'Architecture settings' as an aide-memoir. Its use is covered in the drWinFBE_Tools Help file.
deltarho[1859]
Posts: 4306
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: 486 or 686 default for 32bit ?

Post by deltarho[1859] »

I have just checked out my original tests using 686. Much of the time, there was little difference between 486 and 686. However, with one code snippet used for testing, there was a performance boost of 11.5%. I am not talking about an application boost, but a code snippet boost. On one occasion there was a performance hit, but it was minimal.
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: 486 or 686 default for 32bit ?

Post by marcov »

(since Core 2nd generation, the uop cache can react heavily to small increases of code. If some minor optimization makes the code fit within a 32-byte cache line, that can be very noticeable)
coderJeff
Site Admin
Posts: 4323
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: 486 or 686 default for 32bit ?

Post by coderJeff »

I made a change that makes 586 the default but only when targeting DOS. With the 686 default, compiled programs were immediately failing for me in dosbox because of the CPU check.
Post Reply