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 Issue 16400 - naked variadic C function emits broken prologue #11550

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

dlang-bot commented Aug 11, 2020

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
16400 normal naked variadic C function emits broken prologue

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#11550"

@thewilsonator
Copy link
Contributor

This seems like this should target stable.

@ghost ghost changed the base branch from master to stable August 11, 2020 14:34
@ghost ghost changed the base branch from stable to master August 11, 2020 14:34
if (funcsym_p.ty() & mTYnaked)
{ // do not generate prolog
el_free(e);
e = el_long(TYint, 0);
Copy link
Member

@UplinkCoder UplinkCoder Aug 11, 2020

Choose a reason for hiding this comment

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

this is a 0 literal, no?

why is it needed?

Copy link

Choose a reason for hiding this comment

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

I'm 99% sure that this is a kind of noop, as when using the elxxx table there's always an elem expected as result, but later it's eliminated. I want to learn a bit the backend, a confirmation would be nice.

Also look at elinfo(), same trick already used.

@UplinkCoder
Copy link
Member

@NilsLankila I am not sure if this is ready yet?

@ghost
Copy link

ghost commented Aug 11, 2020

this is ready to me ;)

@thewilsonator
Copy link
Contributor

This codegen bug is still not targeting stable...

@ghost ghost force-pushed the fix16400 branch from 842c572 to c5d5d3d Compare August 12, 2020 00:40
@ghost ghost changed the base branch from master to stable August 12, 2020 00:40
@ghost ghost changed the base branch from stable to master August 12, 2020 00:47
@ghost ghost changed the base branch from master to stable August 12, 2020 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants