[Issue 9167] A failed inlining of inner function
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 12 16:05:56 PST 2014
https://issues.dlang.org/show_bug.cgi?id=9167
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |hsteoh at quickfur.ath.cx
Resolution|--- |WORKSFORME
--- Comment #1 from hsteoh at quickfur.ath.cx ---
Seems to be fixed in git HEAD; the generated code with `dmd -O -inline
-release` is now:
------
000000000041b188 <_Dmain>:
41b188: 55 push %rbp
41b189: 48 8b ec mov %rsp,%rbp
41b18c: 48 83 ec 10 sub $0x10,%rsp
41b190: 31 c0 xor %eax,%eax
41b192: 89 45 f8 mov %eax,-0x8(%rbp)
41b195: 48 8b e5 mov %rbp,%rsp
41b198: 5d pop %rbp
41b199: c3 retq
41b19a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
000000000041b1a0 <_D4test4mainFZ3fooMFZi>:
41b1a0: 55 push %rbp
41b1a1: 48 8b ec mov %rsp,%rbp
41b1a4: 48 83 ec 10 sub $0x10,%rsp
41b1a8: 8b 47 f8 mov -0x8(%rdi),%eax
41b1ab: 48 8b e5 mov %rbp,%rsp
41b1ae: 5d pop %rbp
41b1af: c3 retq
000000000041b1b0 <_D4test4mainFZ3barMFZi>:
41b1b0: 55 push %rbp
41b1b1: 48 8b ec mov %rsp,%rbp
41b1b4: 48 83 ec 10 sub $0x10,%rsp
41b1b8: 8b 47 f8 mov -0x8(%rdi),%eax
41b1bb: 48 8b e5 mov %rbp,%rsp
41b1be: 5d pop %rbp
41b1bf: c3 retq
------
Tested on Linux/64bit. Not sure if Windows might give different results.
--
More information about the Digitalmars-d-bugs
mailing list