Skip to content
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

Add units tests to check that the Floating Point registers are being properly saved #31

Open
RichieSams opened this issue Mar 22, 2017 · 1 comment

Comments

@RichieSams
Copy link
Owner

Previous versions of the asm files ignored the FP registers. So a fiber switch could corrupt the data left in the registers.

We should create a set of unit tests to check that this does not happen. I'm thinking something similar to the current SingleFiberSwitch and NestedFiberSwitch, but using floating point numbers instead of integers.

The hard part will be dealing with floating point rounding errors.

@RichieSams RichieSams changed the title Add units tests to check that the Floating Point regsiters are being properly saved Add units tests to check that the Floating Point registers are being properly saved Mar 22, 2017
@RichieSams
Copy link
Owner Author

RichieSams commented Jan 5, 2018

After testing a bit with Godbolt, the floating point tests I added don't accomplish anything. Everything is saved through the stack.

To get a real test of all the registers, we will need to create asm functions that do the following:

  1. Fill all the registers
  2. Call jump_fcontext
  3. In the new context, modify the registers
  4. Jump back to the first context
  5. Test the contents of the registers to see that they are preserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant