Skip to content

fuzz: Add host operations for testing x87_f80#35

Open
tgross35 wants to merge 1 commit intorust-lang:mainfrom
tgross35:x87-f80-host
Open

fuzz: Add host operations for testing x87_f80#35
tgross35 wants to merge 1 commit intorust-lang:mainfrom
tgross35:x87-f80-host

Conversation

@tgross35
Copy link
Copy Markdown
Contributor

No description provided.

@tgross35 tgross35 force-pushed the x87-f80-host branch 2 times, most recently from be3ca92 to 8a4fc55 Compare April 14, 2026 05:17
@tgross35 tgross35 marked this pull request as ready for review April 14, 2026 05:20
@tgross35
Copy link
Copy Markdown
Contributor Author

I think this should be reasonable but I don't know this area especially well @quaternic or @programmerjake would you mind checking that the x87 asm is sane?

// We need to use fnstenv since there is no way to load only the status word. We
// take two copies and modify one.
"fnstenv [{orig_env}]",
"fnstenv [{env}]",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why store the env twice? can't you just read from orig_env and write the new env to env?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, writing twice is easier since the env has a whole bunch of stuff other than status and control words.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, as far as I know there is no way to set the status register directly without storing the whole thing. But now that I think about it, fstcw followed by fnclex should do all we need, testing...

@programmerjake
Copy link
Copy Markdown
Member

the x87 assembly looks good to me.

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.

2 participants