bypass sse2 intrsuction set

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

bypass sse2 intrsuction set

Post by dave67 »

will reactos offer a patch for systems with cpu's with no sse2 support, because firefox chromium and a few other programs require it. sorry if this question was answered. ;) :D :D :?:
PurpleGurl
Posts: 1790
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: bypass sse2 intrsuction set

Post by PurpleGurl »

I don't remember. I thought they had removed any such instruction. Plus you can compile it yourself.

Oh, you mean if an app requests it. Shouldn't that depend on the CPU you have? If your CPU doesn't have such instructions, I don't think ROS will emulate them. I remember the x86 machines that lacked an FPU, how programs would play with the interrupts and remap to internal code if no FPU was found. So could that be possible for SSE2? It would likely be much slower, but it would still work if that is possible.

This could come in handy with early P1 boxes.
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

Re: bypass sse2 intrsuction set

Post by dave67 »

thanks the oldest setup i have is a pentium 2 350mhz and a dual pentium 3 at 1ghz :)
ThFabba
Developer
Posts: 293
Joined: Sun Jul 11, 2010 11:39 am

Re: bypass sse2 intrsuction set

Post by ThFabba »

Emulation would be possible, but we don't do it yet, and nobody is working on implementing it. It's also not a Windows feature, which means:
a) it's not a priority,
b) we have to find a way to make it configurable in case it causes app compat problems.
middings
Posts: 1073
Joined: Tue May 07, 2013 9:18 pm
Location: California, USA

Re: bypass sse2 instruction set

Post by middings »

This conversation in the Bochs x86 PC Emulator discussion area at SourceForge suggests that Bochs can emulate x86 SSE2 instructions on an x86 device that lacks them. If so, then the SSE2 instruction emulation code might be adaptable for use in ReactOS. This would be a challenging project. As ThFabba pointed out, the current members of ReactOS's development (dev) team are working on other priorities. But they probably would not turn down a tested patch to emulate SSE2 instructions on CPUs that lack it if someone offered one.

Bochs appears to use the GNU Library or Lesser General Public License version 2.0 (LGPLv2). Good luck, dave67.
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

Re: bypass sse2 intrsuction set

Post by dave67 »

:) i'm not a coder but i'll check it out. and plans on finishing the kernel?
PurpleGurl
Posts: 1790
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: bypass sse2 intrsuction set

Post by PurpleGurl »

But you know, if someone wanted to volunteer such, it might open ROS to more testers, since it could mean more hardware. And without the knowledge to fully implement replacement microcodes, that could be used for CPUs with fatal SSE2 bugs, for instance, if they exist. Or maybe certain newer CPUs if any lack that.
ThFabba
Developer
Posts: 293
Joined: Sun Jul 11, 2010 11:39 am

Re: bypass sse2 intrsuction set

Post by ThFabba »

To be clear, it's not really ROS's problem. ROS works fine without SSE(2) -- it's just specific apps that either forget to check for the presence of such instructions or actively made a design decision to require them. So from the OS's perspective it's a feature to work around buggy apps.
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

Re: bypass sse2 intrsuction set

Post by dave67 »

thanks :)
justincase
Posts: 441
Joined: Sat Nov 15, 2008 4:13 pm

Re: bypass sse2 intrsuction set

Post by justincase »

As cool as this would be, it would likely not be easy. This is because SSE & SSE2 instructions don't all trap properly on all CPUs.
Assuming we don't want to patch the binary files of the executables that rely on SSE/SSE2 (because this can lead to other issues), a way to work around the SSE/SSE2 instructions' failure to trap would be to include some kind of JIT analysis that watches for these instructions before they're executed and dynamically replaces them as they're executed with non-SSE equivalents. This would be similar to what Intel's SDE (Intel Software Development Emulator) does for (among other things) SSE4, but it slows down all execution of the affected process(es), because it has to check each and every instruction the program runs to see if it should execute it or do the non-SSE equivalent. Theoretically our JIT could probably slow the process down less than a separate program like the SDE does, because our SSE emulation would be built into the operating system, and not tacked on top as a separate executable, but it would still be slower than simply executing the instructions as per normal.

If interested in the problems associated with the normal method of emulating only after capturing a trap, take a look at this article: Why MMX CPUs cannot emulate SSE
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

Re: bypass sse2 intrsuction set

Post by dave67 »

justincase wrote: Fri Dec 14, 2018 12:53 am As cool as this would be, it would likely not be easy. This is because SSE & SSE2 instructions don't all trap properly on all CPUs.
Assuming we don't want to patch the binary files of the executables that rely on SSE/SSE2 (because this can lead to other issues), a way to work around the SSE/SSE2 instructions' failure to trap would be to include some kind of JIT analysis that watches for these instructions before they're executed and dynamically replaces them as they're executed with non-SSE equivalents. This would be similar to what Intel's SDE (Intel Software Development Emulator) does for (among other things) SSE4, but it slows down all execution of the affected process(es), because it has to check each and every instruction the program runs to see if it should execute it or do the non-SSE equivalent. Theoretically our JIT could probably slow the process down less than a separate program like the SDE does, because our SSE emulation would be built into the operating system, and not tacked on top as a separate executable, but it would still be slower than simply executing the instructions as per normal.

If interested in the problems associated with the normal method of emulating only after capturing a trap, take a look at this article: Why MMX CPUs cannot emulate SSE
i remember when i used to run windows xp i found a piece of software that allowed you to changed it's internal settings like which windows version it's required to be installed is it possible to do it that way or no?
User avatar
onestop_mid
Posts: 41
Joined: Fri Nov 09, 2018 5:05 am

Re: bypass sse2 intrsuction set

Post by onestop_mid »

dave67 wrote: Fri Dec 14, 2018 7:33 am
justincase wrote: Fri Dec 14, 2018 12:53 am As cool as this would be, it would likely not be easy. This is because SSE & SSE2 instructions don't all trap properly on all CPUs.
Assuming we don't want to patch the binary files of the executables that rely on SSE/SSE2 (because this can lead to other issues), a way to work around the SSE/SSE2 instructions' failure to trap would be to include some kind of JIT analysis that watches for these instructions before they're executed and dynamically replaces them as they're executed with non-SSE equivalents. This would be similar to what Intel's SDE (Intel Software Development Emulator) does for (among other things) SSE4, but it slows down all execution of the affected process(es), because it has to check each and every instruction the program runs to see if it should execute it or do the non-SSE equivalent. Theoretically our JIT could probably slow the process down less than a separate program like the SDE does, because our SSE emulation would be built into the operating system, and not tacked on top as a separate executable, but it would still be slower than simply executing the instructions as per normal.

If interested in the problems associated with the normal method of emulating only after capturing a trap, take a look at this article: Why MMX CPUs cannot emulate SSE
i remember when i used to run windows xp i found a piece of software that allowed you to changed it's internal settings like which windows version it's required to be installed is it possible to do it that way or no?
No.
karlexceed
Posts: 531
Joined: Thu Jan 10, 2013 6:17 pm
Contact:

Re: bypass sse2 intrsuction set

Post by karlexceed »

dave67 wrote: Fri Dec 14, 2018 7:33 am allowed you to changed it's internal settings like which windows version it's required to be
I assume if this feature makes it to ROS, it would be in the form of a checkbox under "Compatibility Settings" in the properties window.
justincase
Posts: 441
Joined: Sat Nov 15, 2008 4:13 pm

Re: bypass sse2 intrsuction set

Post by justincase »

ThFabba wrote: Sat Dec 08, 2018 9:54 pmEmulation would be possible, but we don't do it yet, and nobody is working on implementing it. It's also not a Windows feature, which means:
a) it's not a priority,
b) we [would] have to find a way to make it configurable in case it causes app compat problems.
karlexceed wrote: Fri Dec 14, 2018 4:38 pmI assume if this feature makes it to ROS, it would be in the form of a checkbox under "Compatibility Settings" in the properties window.
This seems like a good place for the user to be able to configure it, but where the configuration option appears isn't the difficult part. Figuring out how to add the feature, actually writing the code for it, make that code able to be activated and deactivated by some user configurable mechanism, and test it to make sure it doesn't break things; these are the difficult parts. Adding a checkbox (or similar) to the GUI is likely the easiest part of what this feature would require.

If anyone wants to actually start working on this feature, I'd recommend they look up more information about how the Intel SDE works.
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.
User avatar
dave67
Posts: 28
Joined: Thu May 22, 2014 8:15 am

Re: bypass sse2 intrsuction set

Post by dave67 »

thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests