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 RegisterFunc on unsupported platforms #234

Merged
merged 45 commits into from
Apr 29, 2024

Conversation

TotallyGamerJet
Copy link
Collaborator

Closes #230

NewCallback can't return bigger than uintptr which is 32bits on 386. Make value the largest that fits on whatever platform this runs on
@TotallyGamerJet
Copy link
Collaborator Author

Current outstanding issues:

  1. Windows 386 qsort test fails. I don't have a Windows computer to investigate so I just disabled it.
  2. Add more "unsupported" platforms to the GitHub workflows.

func_test.go Outdated Show resolved Hide resolved
@hajimehoshi
Copy link
Member

Hmm, let's fix the issue with 386 and RegisterFunc first, and then address on #230.

@TotallyGamerJet TotallyGamerJet mentioned this pull request Apr 21, 2024
6 tasks
@TotallyGamerJet
Copy link
Collaborator Author

TotallyGamerJet commented Apr 23, 2024

Well it is now confirmed it is something wrong in RegisterFunc as just directly calling SyscallN worked just fine

I had forgotten to enable the test again. It now fails. This deserves a deeper investigation now.

syscall.go Outdated Show resolved Hide resolved
func_test.go Show resolved Hide resolved
@TotallyGamerJet TotallyGamerJet marked this pull request as ready for review April 24, 2024 16:46
Copy link
Member

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

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

We want to have tests with Linux 386, if it is possible.

syscall.go Outdated Show resolved Hide resolved
@TotallyGamerJet
Copy link
Collaborator Author

@hajimehoshi this is ready for review

Copy link
Member

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work! IIUC, this PR solves multiple problems at the same time: #230 and Linux 32bit. What about splitting this PR? NVM, #230 includes every architectures that PureGo doesn't support.

.github/workflows/test.yml Show resolved Hide resolved
dlfcn_test.go Show resolved Hide resolved
func.go Show resolved Hide resolved
Copy link
Member

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@TotallyGamerJet TotallyGamerJet merged commit 1ff8716 into ebitengine:main Apr 29, 2024
20 checks passed
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.

enable RegisterFunc and RegisterLibFunc for non-supported architectures
2 participants