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

Fix tcc build, remove PACK macro #271

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

bnoordhuis
Copy link
Contributor

There was no definition of the macro for compilers that were not gcc, clang or msvc. While it would be easy to add one, a better approach is to switch to memcpy() and avoid type punning altogether.

Fixes: #270

There was no definition of the macro for compilers that were not gcc,
clang or msvc. While it would be easy to add one, a better approach is
to switch to memcpy() and avoid type punning altogether.

Fixes: quickjs-ng#270
@bnoordhuis bnoordhuis merged commit 56d6002 into quickjs-ng:master Feb 18, 2024
35 checks passed
@bnoordhuis bnoordhuis deleted the fix270 branch February 18, 2024 12:39
@chqrlie
Copy link
Collaborator

chqrlie commented Feb 18, 2024

The PACK macro was ugly indeed. Does the assembly look good in the code generator?

@bnoordhuis
Copy link
Contributor Author

Yes, it's pretty much what you'd expect on x86: a single load or store.

(You have to look pretty hard because the get and put functions all get inlined themselves too.)

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.

Commit 48e4c63a breaks tcc build
3 participants