CosmosOS / IL2CPU

IL2CPU is a compiler for .NET IL code to compile to assembly language for direct booting.
BSD 3-Clause "New" or "Revised" License
279 stars 71 forks source link

Performance improvements, modulo and Exception fix, minor refactoring #177

Closed AnErrupTion closed 1 year ago

AnErrupTion commented 1 year ago

This PR makes the Clt, Clt_Un, Cgt, Cgt_Un and Ceq opcodes use SetByteOnCondition(), which replaces the manual branching that had to be done originally. It also introduces minor refactoring, like removing unused parentheses and converting fields to auto-properties.

AnErrupTion commented 1 year ago

I've pushed some more changes including a fix for modulo on doubles specifically, and a temporary fix which adds an infinite loop if an exception wasn't thrown.

AnErrupTion commented 1 year ago

Could you please make a small PR to the Cosmos repo to add a test to ensure that modulo now works correctly?

Will do soon!