Personal computing discussed

Moderators: Flying Fox, morphine

 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Mon Apr 17, 2017 4:59 pm

ptsant wrote:
As far as I can tell, the first game that used the FPU was Quake (pentium era), which used FDIV (floating point division) to calculate 1/z to order the objects on the screen. It was also, due to the popularity of the Quake engine, one of the reasons the contemporary AMD CPUs (K5-K6) lost to Intel Pentiums, whose FPU was considerably faster, in many gaming tests.


Outside of perhaps some specialized flight sim or a special mode within one (a genre which was much, much more popular back then) I'm inclined to say you're correct about that.
 
morphine
Gold subscriber
Gerbilus Supremus
Posts: 11341
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: 80387 math coprocessors

Mon Apr 17, 2017 5:15 pm

one of the reasons the contemporary AMD CPUs (K5-K6) lost to Intel Pentiums, whose FPU actually warranted the name, in many gaming tests.

FTFY :D
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
 
caconym
Gerbil
Posts: 14
Joined: Tue May 17, 2016 3:28 pm
Location: Reno, NV
Contact:

Re: 80387 math coprocessors

Mon Apr 17, 2017 5:32 pm

I bought one for my 386SX 40 because you couldn't run Autodesk 3D Studio (version 1!) without it.
desktop: 6600k@4.2ghz - 32gb DDR4 2400 - 500gb m.2 850 EVO - GTX 1070 F.E. - FocusRite Scarlett - Phanteks P400
laptop: Thinkpad Yoga - i7 4500u - 8gb RAM - 128gb SSD - way too many Wacom EMR stylii
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Mon Apr 17, 2017 5:34 pm

All that said, I did get a few extra FPS out of Doom and Doom II on my old 486SX system by running an ancient shareware 8087 emulator. I suppose the game emulated a 387 if it didn't detect the real thing, and the simpler 8087 was faster to emulate.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
ptsant
Silver subscriber
Gerbil Team Leader
Posts: 237
Joined: Mon Oct 05, 2009 12:45 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 5:58 am

morphine wrote:
one of the reasons the contemporary AMD CPUs (K5-K6) lost to Intel Pentiums, whose FPU actually warranted the name, in many gaming tests.

FTFY :D


LOL
I don't remember the details from that era, although I could probably dig out the reference assembly manuals for the K5 and the Pentium at home. My general impression is that the K5 FPU was a little bit better than the 486 FPU but the Pentium FPU was really much faster. And, in that era, a generational leap was often N times faster, unlike today.
Image
 
srg86
Gerbil Team Leader
Posts: 208
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re: 80387 math coprocessors

Tue Apr 18, 2017 8:14 am

ptsant wrote:
morphine wrote:
one of the reasons the contemporary AMD CPUs (K5-K6) lost to Intel Pentiums, whose FPU actually warranted the name, in many gaming tests.

FTFY :D


LOL
I don't remember the details from that era, although I could probably dig out the reference assembly manuals for the K5 and the Pentium at home. My general impression is that the K5 FPU was a little bit better than the 486 FPU but the Pentium FPU was really much faster. And, in that era, a generational leap was often N times faster, unlike today.


The Pentium was the first x86 CPU with a fully pipelined FPU. When designing the Pentium, Intel wanted to go after the Workstation market which was dominated by RISC chips with fast floating point. The Pentium failed at that aim, but a side effect of this was that it had, for the x86 world, a super-fast FPU.

Until then, most games used Fixed-Point math, because the 386 and 486's non-pipelined FPUs couldn't keep up. The 387's interface with the 386 was the main bottle neck (sometimes it would take longer to pass data between the two chips than to execute the instruction). The 486 fixed that bottleneck, but then the execution unit wasn't fast enough. The Pentium finally had an FPU that was quick enough, so Quake used the FPU hardware. It probably also had better cache and memory bandwidth (since it had a 64-bit data bus).

AMD and Cyrix aimed their CPUs at the mainstream home and business markets, and they didn't think fast floating point would be a priority. For the most part they were right, but for games and multimedia they turned out to be wrong. The K5's FPU came from the Am29050 embedded RISC processor. The Cyrix 6x86's FPU was still largely based on the execution unit of the FasMath Cx387. The AMD K6 line also had a non-pipelined x87.

Oh and the FPU in the Motorola 68060 (68k equivalent to the Pentium) was also non-pipelined. The PowerPCs were piplined I think.
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 8:23 am

bthylafh wrote:
All that said, I did get a few extra FPS out of Doom and Doom II on my old 486SX system by running an ancient shareware 8087 emulator. I suppose the game emulated a 387 if it didn't detect the real thing, and the simpler 8087 was faster to emulate.


Something else was going on, DOOM (at least, not sure of DOOM II) didn't use the FPU. I just looked at the source code, there are only floats in p_matutl.c (which aren't even ifdef'd out, just #if 1 else'd) and r_main.c (#if 0). Only doubles in m_fixed.c (unreachable) and i_video.c (i_* is architecture specific stuff, in this case it's for running DOOM on X windows, I guess I got the unix port source?)

So, as far as I can see, no FPU at all. Just fixed_t everywhere.
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 8:47 am

srg86 wrote:
The Pentium was the first x86 CPU with a fully pipelined FPU. When designing the Pentium, Intel wanted to go after the Workstation market which was dominated by RISC chips with fast floating point. The Pentium failed at that aim, but a side effect of this was that it had, for the x86 world, a super-fast FPU.


Yeah, the advantage it had was primarily just that it was superscalar.
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 8:57 am

Glorious wrote:
bthylafh wrote:
All that said, I did get a few extra FPS out of Doom and Doom II on my old 486SX system by running an ancient shareware 8087 emulator. I suppose the game emulated a 387 if it didn't detect the real thing, and the simpler 8087 was faster to emulate.


Something else was going on, DOOM (at least, not sure of DOOM II) didn't use the FPU. I just looked at the source code, there are only floats in p_matutl.c (which aren't even ifdef'd out, just #if 1 else'd) and r_main.c (#if 0). Only doubles in m_fixed.c (unreachable) and i_video.c (i_* is architecture specific stuff, in this case it's for running DOOM on X windows, I guess I got the unix port source?)

So, as far as I can see, no FPU at all. Just fixed_t everywhere.


Dunno, but there wasn't any other variable in my setup, and I was certainly using the DOS version. Confirmed with the -devparm parameter which would display a line of dots in the bottom-left indicating FPS.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:06 am

Same video card (VGA performance mattered significantly), same soundcard, same motherboard, same RAM?

It wasn't the FPU.

What were the Gametics for each timedemo run on each system?
Last edited by Glorious on Tue Apr 18, 2017 9:08 am, edited 1 time in total.
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:07 am

there wasn't any other variable in my setup
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:08 am

OK, what were the gametics?
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:09 am

How the feck would I remember something like that from 1995? Don't be tiresome.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:15 am

bthylafh wrote:
How the feck would I remember something like that from 1995? Don't be tiresome.


Sorry, you said "confirmed" at one point, so I thought this was something you did more recently.

If you are talking about recollections from 22 years ago, I don't know what to tell you. I looked at the source code today. I don't have to personally guarantee that I'm remembering it correctly, because you can git clone it yourself.

It didn't use the FPU. The only floating point in it is code cruft: either hardcoded out by invariant preprocessor directives or simply unreachable.

EDIT: anyway, to be clear, the reason I asked about gametics is that there were several components to FPS and that's the one that would be determined by absolute CPU performance.
Last edited by Glorious on Tue Apr 18, 2017 9:21 am, edited 1 time in total.
 
just brew it!
Gold subscriber
Administrator
Posts: 48546
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:15 am

Lack of applications which were optimized for 3DNow! really hurt K6-x. If more applications had included 3DNow! code paths it would've been a lot more competitive for floating point workloads, but AMD was never able to get much buy-in from developers, and Intel's introduction of SSE was the nail in the coffin. AMD finally gave up on 3DNow! for good when they quietly dropped support for it in the Bulldozer architecture.
If the world isn't making sense to you, you're either drinking too much or not drinking enough.
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:16 am

This just in: Glorious has to be right on the Internet, again. :roll:

Must be time to killfile you again.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
srg86
Gerbil Team Leader
Posts: 208
Joined: Tue Apr 25, 2006 7:57 am
Location: Madison, WI

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:17 am

Glorious wrote:
srg86 wrote:
The Pentium was the first x86 CPU with a fully pipelined FPU. When designing the Pentium, Intel wanted to go after the Workstation market which was dominated by RISC chips with fast floating point. The Pentium failed at that aim, but a side effect of this was that it had, for the x86 world, a super-fast FPU.


Yeah, the advantage it had was primarily just that it was superscalar.


The Pentium's FPU wasn't superscalar. I don't think you could run other instructions at the same time as an FP instruction (I think they shared resoruces), if memory serves correctly.

Ager Fog's manuals may be a good reference. Oh then there's https://www.amazon.com/Michael-Abrashs-Graphics-Programming-Special/dp/1576101746 The graphics Programming Black Book This has chapters on the Pentium (and its FPU).

just brew it! wrote:
Lack of applications which were optimized for 3DNow! really hurt K6-x. If more applications had included 3DNow! code paths it would've been a lot more competitive for floating point workloads, but AMD was never able to get much buy-in from developers, and Intel's introduction of SSE was the nail in the coffin. AMD finally gave up on 3DNow! for good when they quietly dropped support for it in the Bulldozer architecture.


Agreed 100%, 3DNow! was pipelined, but not a lot used it. I remember back in my K6-2 days needing to get a DVD decoder card for DVD playback. PowerDVD had hand optimized assembly, but it was written for the P6's Pipelined x87 FPU so was useless on the K6-2.
Intel Core i7 4790K, Z97, 16GB RAM, 128GB m4 SSD, 480GB M500 SSD, 500GB WD Vel, Intel HD4600, Corsair HX650, Fedora x64.
Thinkpad T460p, Intel Core i5 6440HQ, 8GB RAM, 512GB SSD, Intel HD 530 IGP, Fedora x64, Win 10 x64.
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 9:34 am

bthylafh wrote:
This just in: Glorious has to be right on the Internet, again.


I don't understand this response.

I was curious, so I looked into it. I came to a conclusion that is wholly defensible.

I didn't beat you over the head at all, despite all your handwaving about 387/8087 emulation.

Why is this ruffling your feathers?

srg86 wrote:
The Pentium's FPU wasn't superscalar. I don't think you could run other instructions at the same time as an FP instruction (I think they shared resoruces), if memory serves correctly.


Well, the integer units weren't fully symmetric/independent either, but you could do a integer and floating point at the same time in some very limited circumstances.

There was only one FPU, so you're right, it's not actually superscalar, but it wasn't just pipelined either: there were "free" FP operations in limited circumstances.

What I did was mentally conflate pipelined into superscalar, and that isn't correct. They're related, the P5 itself is superscalar, but not the FPU. Anyway, I was trying to agree with you: the difference is indeed that the FPU is pipelined.
 
ludi
Darth Gerbil
Posts: 7112
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: 80387 math coprocessors

Tue Apr 18, 2017 11:31 am

psant wrote:
I don't remember the details from that era, although I could probably dig out the reference assembly manuals for the K5 and the Pentium at home. My general impression is that the K5 FPU was a little bit better than the 486 FPU but the Pentium FPU was really much faster. And, in that era, a generational leap was often N times faster, unlike today.

I spent many, many hours playing Quake and QWTF on a K5 "PR133" (100MHz) in software render. It was usable, but tended to hitch a bit while even a 75MHz Pentium would play smoothly.

bthylafh wrote:
This just in: Glorious has to be right on the Internet, again. :roll:

Must be time to killfile you again.

No, no -- he's got a point. We really don't know why the emulator was supposedly giving you an FPS boost, but the game code is out there to inspect. Possibly the emulator was doing something with memory management or interrupts that happened to benefit the game in an unexpected way?
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 12:00 pm

The guy curating the source dump and porting it into linux put the original inline assembly for the only places it was converted into floating pointing into a README.

You can even see it in 1.9 DOS binary:

This is _FixedDiv2
0004271E  55                push bp
0004271F  89E5              mov bp,sp
00042721  0F                db 0x0f
00042722  BF5D08            mov di,0x85d
00042725  8B450C            mov ax,[di+0xc]
00042728  99                cwd
00042729  F7FB              idiv bx
0004272B  5D                pop bp
0004272C  C20800            ret 0x8


This is _FixedMul
0004272F  55                push bp
00042730  89E5              mov bp,sp
00042732  0F                db 0x0f
00042733  BF4508            mov di,0x845
00042736  0FAF450C          imul ax,[di+0xc]
0004273A  5D                pop bp
0004273B  C20800            ret 0x8


The fact that it obviously isn't ELF means that I'm using raw ndisasm which makes this a crazy haystick of needles situation, but if you search for FMUL you just don't ever see anything that looks like actual x87 code; there's none of the required scaffolding:

$ grep fmul -A 200 tmpb.txt | grep fstp
$


I'm not trying to be jerk, I was honestly just extremely curious, going back to ptsant's original assertion about how quake was the first mainstream game to really use x87.

This is precisely the kind of obscure question of historical interest that catches my attention, and one of my frustrations in life is that it can be difficult to find reliable information.

I try to make that better. I'm obviously not the most genteel person, but I assure you, I was not out for scalps or anything like that in this particular case.
Last edited by Glorious on Tue Apr 18, 2017 12:01 pm, edited 1 time in total.
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 12:01 pm

ludi wrote:
the game code is out there to inspect.


To be pedantic, the Linux port is, not the original DOS version.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 12:07 pm

bthylafh wrote:
To be pedantic, the Linux port is, not the original DOS version.


Fair enough, but I've looked at the actual binary (which is conclusive) and there's even this note in the changelog:

ChangeLog wrote:
This stuff is defined in fpfunc.S (Fixed point) and
in r_draw.c (assembler in tmap.S not used).
However, "nm," shows that r_draw.o does not include
the drawing functions (see below - USE_ASM).
Furthermore, the global symbols in fpfunc.S begin
with an underscore, "_FixedMul" and "_FixedDiv2".


In fact, I think I was wrong: I don't think he made the code in m_fixed.c reachable, I think he might have actually have written it altogether:

ibid wrote:
I did remove DOS and Watcom specifics. I did also
remove the texture mapping and fixed point assembly.
From my experience, it isn't worth the trouble
to ue GCC inline assembler, as performance of
the same loop written in C is perfectly sufficient.


EDIT: Confirmed. There was no m_fixed.c in the original source dump from January 10, 1997. The curator added it sometime after January 18, 1997 as it is not listed in FILES which is a directory listing from that date.

It also does not exist in the heretic source, which was directly derived from the original MS-DOS source for DOOM.

EDIT2: For what it is worth, the Heretic source has inline assembly in the form of a pragma to the Watcom C compiler that also uses imul/idiv.
 
ludi
Darth Gerbil
Posts: 7112
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: 80387 math coprocessors

Tue Apr 18, 2017 1:18 pm

From a guy who apparently deconstructed most of the source code for porting purposes:

http://fabiensanglard.net/doomIphone/do ... nderer.php
Fabien Sanglard wrote:
Note : In 1993, only the very high-end 486DX machines had a FPU (floating point unit) hence Doom engine was doing all angles calculation via Binary Angular Measurement (BAMs), relying on int only, float is rarely used. For the same reason, sub integer precision is achieved via fixed_t a 16.16 binary fixed point (more about this here and here).

http://stackoverflow.com/questions/3639 ... ting-point
Fabien wrote:
Doom used fixed point regardless of the availability of a math coprocessor or not. As a result it performed the same on a 486-DX or 48-SX


And then, just to get an idea how little FPU time even Quake was using almost four years later, compared to what it was doing in integer operations:

https://channel9.msdn.com/Forums/TechOf ... capability
rhm wrote:
When FP instructions are executed on a machine with no FPU an interrupt occurs. The FPU emulator registers itself as the handler for that interrupt at startup time and so it traps those FPU instructions and emulates them with a few hundred integer instructions. It's VERY slow by comparison which is why floating point types were shunned by games programmers until the advent of the 486, and even then they were used sparingly as the 486 FPU wasn't that fast - things were much improved on the pentium. Writing 3D code without using floating point is no fun at all.

John Carmack was one of the first to say it's OK to use fp in a tight loop with Quake 1. Even then it was only one divide per 8 pixels of the triangle rasterizer to get the perspective correction (which had been the bane of software rasterizers up to that point). It was done that way because of the asynchronous nature of the FPU - you'd execute the fp divide and the processor would carry on executing integer instructions and not wait for the result of the divide until you requested it. In the time it took to get the result of the divide it could paint the 8 pixels using the results of the previous divide. Pretty neat.
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
bthylafh
Grand Gerbil Poohbah
Posts: 3827
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: 80387 math coprocessors

Tue Apr 18, 2017 1:51 pm

See? That's how you tell someone they're wrong without being a pompous ass.
Hakkaa päälle!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|SanDisk Ultra II 480GB|1988 Model M|Saitek X-45|Logitech MX 518 & F310|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
 
Glorious
Gold subscriber
Gerbil Khan
Posts: 9951
Joined: Tue Aug 27, 2002 6:35 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:02 pm

You're going to have to help me here then, because while I usually cop to being abrasive I actually have no idea how I was doing that this time.

If simply telling you what I saw in the source code is being pompous I guess I might as well just tell you that your offhanded supposition was absolutely ridiculous right off the bat next time.
 
setaG_lliB
Gerbil
Posts: 64
Joined: Wed Mar 03, 2010 6:02 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:08 pm

bthylafh wrote:
See? That's how you tell someone they're wrong without being a pompous ass.

I really, really don't see how he's being a pompous ass. You seem to be a little on the touchy side though.
 
Greyguy 1948
Gerbil
Posts: 15
Joined: Wed Mar 29, 2017 6:32 am

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:13 pm

http://performance.netlib.org/performance/html/new.spec.cfp92.col0.html
Some results in floating point:
Pentium Pro = 283 at 200 MHz
Pentium = 120 at 133 MHz
486 DX4 = 27 at 100 MHz
486 DX2 = 19 at 66 MHz
68040 = 13 at 33 MHz
 
ptsant
Silver subscriber
Gerbil Team Leader
Posts: 237
Joined: Mon Oct 05, 2009 12:45 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:22 pm

Glorious wrote:
bthylafh wrote:
All that said, I did get a few extra FPS out of Doom and Doom II on my old 486SX system by running an ancient shareware 8087 emulator. I suppose the game emulated a 387 if it didn't detect the real thing, and the simpler 8087 was faster to emulate.


Something else was going on, DOOM (at least, not sure of DOOM II) didn't use the FPU. I just looked at the source code, there are only floats in p_matutl.c (which aren't even ifdef'd out, just #if 1 else'd) and r_main.c (#if 0). Only doubles in m_fixed.c (unreachable) and i_video.c (i_* is architecture specific stuff, in this case it's for running DOOM on X windows, I guess I got the unix port source?)

So, as far as I can see, no FPU at all. Just fixed_t everywhere.


I second that. I spent some time back then converting vanilla DOOM to display 640x480 on linux. There was no significant use of FPU instructions in the source code.
Image
 
ptsant
Silver subscriber
Gerbil Team Leader
Posts: 237
Joined: Mon Oct 05, 2009 12:45 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:24 pm

srg86 wrote:
The Pentium was the first x86 CPU with a fully pipelined FPU. When designing the Pentium, Intel wanted to go after the Workstation market which was dominated by RISC chips with fast floating point. The Pentium failed at that aim, but a side effect of this was that it had, for the x86 world, a super-fast FPU.
....


Thanks for the detailed answer!
Image
 
setaG_lliB
Gerbil
Posts: 64
Joined: Wed Mar 03, 2010 6:02 pm

Re: 80387 math coprocessors

Tue Apr 18, 2017 2:32 pm

Greyguy 1948 wrote:
http://performance.netlib.org/performance/html/new.spec.cfp92.col0.html
Some results in floating point:
Pentium Pro = 283 at 200 MHz
Pentium = 120 at 133 MHz
486 DX4 = 27 at 100 MHz
486 DX2 = 19 at 66 MHz
68040 = 13 at 33 MHz

Look at the difference between the DX4 and Pentium! Makes me wonder how a 16 core Xeon would do using all threads and AVX2. :P

Who is online

Users browsing this forum: No registered users and 2 guests