-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Int64Fixture.RemI8I8 and Int64Fixture.DivI8I8 unit test case failures #54
Comments
Has it been considered to use the FPU for 64bit arithmetics on x86? |
No. We will use the SSE extensions. The old FPU is stacked based and too difficult to adapt with use with a register allocator. |
What about having the algorithm as a static method in the Runtime and calling that algorithm? It would be easier to implement and the only downside would be having a call. I think that would be a fair compromise in order to implement 64bit arithmetics in 32bit, maybe we can even improve the compiler by inlining that call. |
Yes; I have a branch of MOSA called 64BitIn32Bit that is working on just that. This would be a portable implementation divide and remainder for other 32bit architectures as well. Unfortunately, it's more buggy than what we have at the moment. BTW. x86 FPU does floating point, not integer, arithmetic |
@tgiphil I took a quick run at this and I have managed to get it working for 64bit integer division. The code is basically taken from here and re-jigged to suit our needs: |
Great! I'll take a look at this tonight. Note: I started to work on exceptions. |
@charsleysa - I was not able to confirm the implementation as working. The additional tests in TestWorld pass before the new 64bit integer division is implementation. In addition, the test suite had more failed test after the new implementation as well. You indicated TinySimulator was broken, can you be more specific? |
@tgiphil So I just found out (well this is embarrassing) that the C# compiler was optimizing the tests I had placed in TestWorld and no actual division takes place since it's pre-calculated. :( |
@tgiphil I found a bug in your 32bit memory storage code for TinySimulator that makes Unit Tests fail. |
@tgiphil after a few days of trial and error (I'm not great at 64bit signed arithmetics) I managed to create code that works and passes the Unit Tests. |
No description provided.
The text was updated successfully, but these errors were encountered: