thiscall calling convention (-gen gcc only) #304
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on PR #303 (Add deleting destructor for c++ ABI) to add
__thiscallkeyword to specify the the thiscall calling convention and add additional tests for 32-bit windows gcc for the c++ ABI.32-bit windows should be only target in need of the
thiscallcalling convention.To allow some flexibility for testing code, fbc does not automatically apply the thiscall calling convention, though this could be changed in a later update. Currently
__thiscallmust be explicitly specified. For example:Additionally, the fbc command line option
-z no-thiscallis added to effectively disable (ignore) the__thiscallkeyword to assist in moving between use and testing of the thiscall calling convention.__thiscall is only implemented for the gcc backend. The gas backend needs many internal changes to support passing arguments in registers to support the thiscall calling convention. It seems prudent to build up the test cases in gcc before modifying the gas backend possible in a later update.
Some tests are disabled with a
ENABLE_CHECK_BUGSguard because: