Skip to content

x64 - #499

Merged
AmyrAhmady merged 10 commits into
masterfrom
Y_Less/x64
Feb 7, 2023
Merged

x64#499
AmyrAhmady merged 10 commits into
masterfrom
Y_Less/x64

Conversation

@Y-Less

@Y-Less Y-Less commented Sep 10, 2022 •

Copy link
Copy Markdown
Collaborator

I could split this in to two PRs if people don't want to read through two bits of code. It actually adds two things:

  1. Config improvements:
  • Save unknown legacy options from server.cfg, so they can still be used even if they aren't recognised. Attempts to type them based on value.
  • Add special case for reading gamemode0 etc config options in pawn, since that needs to be converted to a string array access.
  1. Building pawn with x64 support:
  • The weird DB natives that return pointers won't work, but they're the only ones.
  • amxfile now uses IDs instead of pointers for returned values when the pointers won't fit in. I think this also fixes the use-after-close problems people were having, as a side-effect, but this isn't enabled on the 32-bit version by default. It could be. Edit: It now is, so this also fixes that unfixable bug.
  • OP_SWITCH now uses a binary search.
  • There is a caveat to this. The 64-bit upgrade for 32-bit pawn is based on the work done upstream, which still stores the 64-bit pointers to the native implementations in the header as before. But obviously they're now twice as wide, which means they take up twice as much space as is available. This thus clobbers the pointers to the native's names, so once a script is loaded in 64-bit you can't look up a native by name.

@Y-Less Y-Less changed the title Y less/x64 x64 Sep 10, 2022
@Hual
Hual force-pushed the master branch 2 times, most recently from ae39de9 to 5744c0a Compare October 3, 2022 11:21
@Y-Less Y-Less mentioned this pull request Dec 14, 2022
12 tasks done
@ksenonadv ksenonadv changed the title x64 [DRAFT] x64 Dec 29, 2022
@Y-Less Y-Less changed the title [DRAFT] x64 x64 Jan 9, 2023
@Y-Less

Y-Less commented Jan 9, 2023

Copy link
Copy Markdown
Collaborator Author

I'm pretty happy with the state of this now.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ AGraber
❌ Y_Less


Y_Less seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@AGraber

AGraber commented Jan 28, 2023

Copy link
Copy Markdown
Collaborator

I took the liberty to add some non-code changes that were required for keeping builds and GitHub CI working:

  • Small fix on CMakeLists to avoid x86_64 builds matching the x86 part of the string resulting in -m32 being added to 64bit builds on Linux
  • Changes to GitHub CI workflows to simplify them while adding x64 support to them as well

Reusing va_list is actually undefined behaviour, but only triggers on Linux 64bit.
Also update pawn submodule for more 64bit fixes
@AGraber
AGraber requested a review from AmyrAhmady February 1, 2023 18:39
@AmyrAhmady
AmyrAhmady merged commit 426bb8e into master Feb 7, 2023
@AmyrAhmady
AmyrAhmady deleted the Y_Less/x64 branch February 7, 2023 18:02
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.

4 participants