Skip to content

Conversation

fuel-pcbox
Copy link
Contributor

No description provided.

@yz70s
Copy link
Contributor

yz70s commented Feb 22, 2015

This patch seems to make assumptions about the host processor running the emulator.
If some exception flags were previously set not beacuse of the current sse instruction, but because of something else inside the emulator, those flags will be set even in the emulated processor where they souldn't be.
Then there is the call to fesetround() that will effect all calculations, even those done outside the processor core. Consider also a system with two emulated processors with different rounding modes.

@fuel-pcbox

This comment was marked as abuse.

@yz70s
Copy link
Contributor

yz70s commented Feb 22, 2015

The easy way is to backup the current mode, set the new one, execute the instruction and restore the old mode.
The other way is to rewrite all the sse mathematical instructions to use the softfloat library.

@rb6502
Copy link
Contributor

rb6502 commented Feb 22, 2015

Yeah, this is pretty much exactly why the x87 and 680x0 FPUs are done in SoftFloat. (Also MSVC doesn't support 80-bit extended floats). Also keep in mind that we do support PowerPC and ARM targets to some extent (ARM support will be growing this year probably).

@firewave
Copy link
Contributor

Err...what? GCC is way more stupid about floating-point than Visual
Studio (as seen with the optimization issues with FLAC).

https://msdn.microsoft.com/en-us/library/e7s85ffb.aspx

Yeah, this is pretty much exactly why the x87 and 680x0 FPUs are done in SoftFloat. (Also MSVC doesn't support 80-bit extended floats). Also keep in mind that we do support PowerPC and ARM targets to some extent (ARM support will be growing this year probably).


Reply to this email directly or view it on GitHub:
#125 (comment)

@rb6502
Copy link
Contributor

rb6502 commented Feb 22, 2015

GCC on x86 and x64 always picks 32-bit registers for 'float', 64-bit for 'double', and 80-bit for 'long double'. Those sizes are 100% guaranteed to be selected based on the variable type, which is ideal for emulation (and certain other use cases). MSVC doesn't support 'long double' at all (it's either an error or it's silently treated as a plain 'double'). This is among VIsual C's most well-known incompatibilities with other compilers (it's why Bochs and Mini vMac use SoftFloat).

@firewave
Copy link
Contributor

Ah...right..."long double"...

GCC on x86 and x64 always picks 32-bit registers for 'float', 64-bit for 'double', and 80-bit for 'long double'. Those sizes are 100% guaranteed to be selected based on the variable type, which is ideal for emulation (and certain other use cases). MSVC doesn't support 'long double' at all (it's either an error or it's silently treated as a plain 'double'). This is among VIsual C's most well-known incompatibilities with other compilers (it's why Bochs and Mini vMac use SoftFloat).


Reply to this email directly or view it on GitHub:
#125 (comment)

@yz70s
Copy link
Contributor

yz70s commented Mar 3, 2015

I close this because is superseded by #133

@yz70s yz70s closed this Mar 3, 2015
Zoltan45 pushed a commit to Zoltan45/mame-mkp that referenced this pull request Jun 28, 2021
disable asserts() on retro builds
ICEknigh7 added a commit to ICEknigh7/mame that referenced this pull request Jun 8, 2022
- Balalín (type-in, MicroHobby mamedev#125) [Ignacio Prini]
- Magnus Zone (type-in, MicroHobby mamedev#126) [Ignacio Prini]
- Oráculo Egipcio (type-in, MicroHobby mamedev#127) [Ignacio Prini]
- Demolition (type-in, MicroHobby mamedev#128) [Ignacio Prini]
- Basket Trainer (type-in, MicroHobby mamedev#129) [Ignacio Prini]
- Galaxy Fun (type-in, MicroHobby mamedev#130) [Ignacio Prini]
- Micro Draw (type-in, MicroHobby mamedev#131, mamedev#132) [Ignacio Prini]
- El Alambrista (type-in, MicroHobby mamedev#133) [Ignacio Prini]
- Ranamirez (type-in, MicroHobby mamedev#134) [Ignacio Prini]
- Fórmula Suicida (type-in, MicroHobby mamedev#135) [Ignacio Prini]
- Phantasmas (type-in, MicroHobby mamedev#136) [Ignacio Prini]
- Dardos (type-in, MicroHobby mamedev#137) [Ignacio Prini]
- S.E.M.I.S.I.S. (type-in, MicroHobby mamedev#138, mamedev#139) [Ignacio Prini]
- Alley's Gun (type-in, MicroHobby mamedev#140) [Ignacio Prini]
- Kleingeld (type-in, MicroHobby mamedev#141, mamedev#142) [Ignacio Prini]
- Caribe’s Day (type-in, MicroHobby mamedev#143) [Ignacio Prini]
- Rally (type-in, MicroHobby mamedev#144) [Ignacio Prini]
- La Profecía (type-in, MicroHobby mamedev#145) [Ignacio Prini]
- Mine Alert (type-in, MicroHobby mamedev#146, mamedev#147) [Ignacio Prini]
- Freddy (type-in, MicroHobby mamedev#148) [Ignacio Prini]
- Russian's Attack (type-in, MicroHobby mamedev#149, mamedev#150) [Ignacio Prini]
- En Ruta (type-in, MicroHobby mamedev#151) [Ignacio Prini]
- Zinco (type-in, MicroHobby mamedev#152) [Ignacio Prini]
- Ruffo’s Dream (type-in, MicroHobby mamedev#153) [Ignacio Prini]
- Crozet (type-in, MicroHobby mamedev#154) [Ignacio Prini]
- Rock Animation (type-in, MicroHobby mamedev#155) [Ignacio Prini]
- Bunker (type-in, MicroHobby mamedev#156) [Ignacio Prini]
- Telepuzzle (type-in, MicroHobby mamedev#157) [Ignacio Prini]
- Golfo Pérsico (type-in, MicroHobby mamedev#158) [Ignacio Prini]
- Mad Drivers (type-in, MicroHobby mamedev#159) [Ignacio Prini]
- Bowling Star (type-in, MicroHobby mamedev#160) [Ignacio Prini]
- Gas-Car (type-in, MicroHobby mamedev#161) [Ignacio Prini]
- Ghost Like (type-in, MicroHobby mamedev#162) [Ignacio Prini]
- Sky Invaders (type-in, MicroHobby mamedev#163) [Ignacio Prini]
- Perico Jones (type-in, MicroHobby mamedev#164) [Ignacio Prini]
- Brad Zotes (type-in, MicroHobby mamedev#165) [Ignacio Prini]
- Striker (type-in, MicroHobby mamedev#166) [Ignacio Prini]
- Indy (type-in, MicroHobby mamedev#167) [Ignacio Prini]
- Topin (type-in, MicroHobby mamedev#168) [Ignacio Prini]
- Starlike (type-in, MicroHobby mamedev#169) [Ignacio Prini]
- Tres en Raya (type-in, MicroHobby mamedev#170) [Ignacio Prini]
- Goteras (type-in, MicroHobby mamedev#171) [Ignacio Prini]
- Parvision (type-in, MicroHobby mamedev#172) [Ignacio Prini]
- Furax (type-in, MicroHobby mamedev#173) [Ignacio Prini]
- Duck Shooting (type-in, MicroHobby mamedev#174) [Ignacio Prini]
- Nomen Rosae (type-in, MicroHobby mamedev#175) [Ignacio Prini]
- PunkyMan (type-in, MicroHobby mamedev#176) [Ignacio Prini]
- El Retorno del Yedi (type-in, MicroHobby mamedev#177) [Ignacio Prini]
- Sky Warrior (type-in, MicroHobby mamedev#178) [Ignacio Prini]
- Reptkon (type-in, MicroHobby mamedev#179) [Ignacio Prini]
- Intro (type-in, MicroHobby mamedev#180) [Ignacio Prini]
- Keops (type-in, MicroHobby mamedev#181) [Ignacio Prini]
- Sir Gawain (type-in, MicroHobby mamedev#182) [Ignacio Prini]
- Snake (type-in, MicroHobby mamedev#183) [Ignacio Prini]
- Microbowl (type-in, MicroHobby mamedev#184) [Ignacio Prini]
- God Save the Punk (type-in, MicroHobby mamedev#185) [Ignacio Prini]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants