This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/68331] [meta-bug] fipa-pta issues
- From: "david.abdurachmanov at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Apr 2016 20:28:27 +0000
- Subject: [Bug ipa/68331] [meta-bug] fipa-pta issues
- Auto-submitted: auto-generated
- References: <bug-68331-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68331
--- Comment #11 from David Abdurachmanov <david.abdurachmanov at gmail dot com> ---
"Good" code, annotated by me. Now notice from my previous message that the fix
for this PR, caused
49 89 1c 24 mov %rbx,(%r12)
to be removed. We lost one instruction which stored the address of allocated
objected via "pointer".
00000000000187b0 <std::_MakeUniq<edm::ParameterDescription<int>
>::__single_object std::make_unique<edm::ParameterDescription<int>, char const
(&) [16], int const&, bool&>(char const (&) [16], int const&, bool&) [clone
.isra.142]>:
187b0: 41 56 push %r14
187b2: 41 55 push %r13
187b4: 49 89 f6 mov %rsi,%r14
187b7: 41 54 push %r12
187b9: 55 push %rbp
187ba: 49 89 fc mov %rdi,%r12
187bd: 53 push %rbx
// Allocate 40 bytes on the heap
187be: bf 28 00 00 00 mov $0x28,%edi
187c3: 49 89 d5 mov %rdx,%r13
187c6: 0f b6 e9 movzbl %cl,%ebp
187c9: e8 62 e5 ff ff callq 16d30 <operator new(unsigned
long)@plt>
// Store returned pointer in RBX
187ce: 48 89 c3 mov %rax,%rbx
187d1: e8 da f8 ff ff callq 180b0 <edm::ParameterTypes
edm::ParameterTypeToEnum::toEnum<int>()@plt>
187d6: 41 b8 01 00 00 00 mov $0x1,%r8d
187dc: 89 e9 mov %ebp,%ecx
187de: 89 c2 mov %eax,%edx
187e0: 4c 89 f6 mov %r14,%rsi
// Call the ctor, pass pointer (this) from RBX
187e3: 48 89 df mov %rbx,%rdi
187e6: e8 75 e8 ff ff callq 17060
<edm::ParameterDescriptionBase::ParameterDescriptionBase(char const*,
edm::ParameterTypes, bool, bool)@plt>
187eb: 48 8b 05 a6 36 03 00 mov 0x336a6(%rip),%rax #
4be98 <_DYNAMIC+0x430>
// Store RBX to memory pointed by R12
187f2: 49 89 1c 24 mov %rbx,(%r12)
187f6: 48 83 c0 10 add $0x10,%rax
187fa: 48 89 03 mov %rax,(%rbx)
187fd: 41 8b 45 00 mov 0x0(%r13),%eax
18801: 89 43 20 mov %eax,0x20(%rbx)
// Put address in R12 into return register
18804: 4c 89 e0 mov %r12,%rax
18807: 5b pop %rbx
18808: 5d pop %rbp
18809: 41 5c pop %r12
1880b: 41 5d pop %r13
1880d: 41 5e pop %r14
1880f: c3 retq
18810: 48 89 c5 mov %rax,%rbp
18813: 48 89 df mov %rbx,%rdi
18816: be 28 00 00 00 mov $0x28,%esi
1881b: e8 50 e4 ff ff callq 16c70 <operator delete(void*,
unsigned long)@plt>
18820: 48 89 ef mov %rbp,%rdi
18823: e8 48 ef ff ff callq 17770 <_Unwind_Resume@plt>
18828: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
1882f: 00