-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Closed
Labels
backend:X86bugzillaIssues migrated from bugzillaIssues migrated from bugzillaconfirmedVerified by a second partyVerified by a second partyrelease:backportrelease:mergedrelease:reviewed
Milestone
Description
| Bugzilla Link | 47531 |
| Version | trunk |
| OS | Linux |
| Blocks | #4440 |
| Reporter | LLVM Bugzilla Contributor |
| CC | @topperc,@majnemer,@RKSimon,@nickdesaulniers,@zygoloid,@rnk,@rotateright,@tstellar |
Extended Description
This code:
unsigned long read_eflags(void)
{
return __builtin_ia32_readeflags_u64();
}compiles to:
read_eflags:
pushq %rbp
movq %rsp, %rbp
pushfq
popq %rax
popq %rbp
retqwhich has an unnecessary frame pointer. (I'm somewhat puzzled as to why this happened. Sure, the redzone slot clobbered by the pushfq can't be used, but I don't see what this has to do with a frame pointer.)
gcc generates:
read_eflags:
pushfq
popq %rax
retMetadata
Metadata
Labels
backend:X86bugzillaIssues migrated from bugzillaIssues migrated from bugzillaconfirmedVerified by a second partyVerified by a second partyrelease:backportrelease:mergedrelease:reviewed