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

enc: asm: add memory and flags as clobbers #118

Closed
aklomp opened this issue Jan 6, 2023 · 0 comments
Closed

enc: asm: add memory and flags as clobbers #118

aklomp opened this issue Jan 6, 2023 · 0 comments
Assignees
Labels

Comments

@aklomp
Copy link
Owner

aklomp commented Jan 6, 2023

Add the memory and flags ("cc") as clobbers to all assembly encoder implementations. This informs the compiler that the assembly will access an unspecified amount of memory and will modify the flags. The compiler will not use any dangling references to memory or keep a cached copy of the flags register.

In tests, the compilers seem to output the exact same code as before, so this should have no functional impact beyond ensuring correctness.

@aklomp aklomp self-assigned this Jan 6, 2023
aklomp added a commit that referenced this issue Jan 6, 2023
Add the memory and flags ("cc") as clobbers to all assembly encoder
implementations. This informs the compiler that the assembly will access
an unspecified amount of memory and will modify the flags. The compiler
will not use any dangling references to memory or keep a cached copy of
the flags register.

In tests, the compilers seem to output the exact same code as before, so
this should have no functional impact beyond ensuring correctness.
@aklomp aklomp closed this as completed in e77bd70 Jan 6, 2023
@aklomp aklomp added bug and removed enhancement labels Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant