Created
December 4, 2016 13:46
-
-
Save yohhoy/76b9e0d7c30ccd81317fecb71c734847 to your computer and use it in GitHub Desktop.
gcc 7.0(HEAD) -std=c++1z -03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <string> | |
int main() { | |
using namespace std::literals::string_literals; | |
for (char c: "Hello"s) { | |
std::printf("(%d)", c); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.LC0: | |
.string "(%d)" | |
main: | |
pushq %rbp | |
pushq %rbx | |
subq $40, %rsp | |
leaq 16(%rsp), %rbx | |
leaq 21(%rsp), %rbp | |
movl $1819043144, 16(%rsp) | |
movq $5, 8(%rsp) | |
movb $111, 4(%rbx) | |
movq %rbx, (%rsp) | |
movb $0, 21(%rsp) | |
.L2: | |
movsbl (%rbx), %esi | |
movl $.LC0, %edi | |
xorl %eax, %eax | |
call printf | |
addq $1, %rbx | |
cmpq %rbx, %rbp | |
jne .L2 | |
movq (%rsp), %rdi | |
leaq 16(%rsp), %rax | |
cmpq %rax, %rdi | |
je .L7 | |
call operator delete(void*) | |
.L7: | |
addq $40, %rsp | |
xorl %eax, %eax | |
popq %rbx | |
popq %rbp | |
ret | |
movq (%rsp), %rdi | |
leaq 16(%rsp), %rdx | |
movq %rax, %rbx | |
cmpq %rdx, %rdi | |
je .L5 | |
call operator delete(void*) | |
.L5: | |
movq %rbx, %rdi | |
call _Unwind_Resume |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://d.hatena.ne.jp/yohhoy/20161204/p1 (ja)