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 15745 - Inline Assembly stomped on by Profiling #11608

Merged
merged 1 commit into from Aug 24, 2020

Conversation

WalterBright
Copy link
Member

The fix is to not insert profiling instrumentation into functions with inline assembler.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
15745 normal Inline Assembly stomped on by Profiling

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 "master + dmd#11608"

@@ -924,7 +924,7 @@ void FuncDeclaration_toObjFile(FuncDeclaration fd, bool multiobj)
* 2. impact on function inlining
* 3. what to do when writing out .di files, or other pretty printing
*/
if (global.params.trace && !fd.isCMain() && !fd.naked)
if (global.params.trace && !fd.isCMain() && !fd.naked && !(fd.hasReturnExp & 8))
Copy link
Member

Choose a reason for hiding this comment

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

hasReturnExp & 8
needs a comment, I know what it means but others might not

Copy link
Member Author

Choose a reason for hiding this comment

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

What it really needs is a refactoring of hasReturnExp into an enumeration of named flags, but refactoring that is beyond the scope of this fix. A grep of hasReturnExp will show where the bits are documented.

@dlang-bot dlang-bot merged commit de995df into dlang:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants