D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15121 - Unneeded stack frame generated
Summary: Unneeded stack frame generated
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: backend, performance
Depends on:
Blocks:
 
Reported: 2015-09-26 21:36 UTC by Walter Bright
Modified: 2024-12-13 18:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Walter Bright 2015-09-26 21:36:45 UTC
The code:

    int test(int x) { return x; }

generates:

        55                      push    RBP
        48 8B EC                mov     RBP,RSP
        48 89 C8                mov     RAX,RCX
        5D                      pop     RBP
        C3                      ret

The stack frame is not necessary, and the 48 REX prefix on the RAX register move is also unnecessary.
Comment 1 dlangBugzillaToGithub 2024-12-13 18:44:57 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17725

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB