GAS LISTING /tmp/ccRZh6If.s page 1 1 .file "user-literal.cpp" 2 .text 3 .Ltext0: 5 _Z41__static_initialization_and_destruction_0ii: 6 .LFB1405: 7 .file 1 "user-literal.cpp" 1:user-literal.cpp **** #include <iostream> 2:user-literal.cpp **** #include <math.h> 3:user-literal.cpp **** 4:user-literal.cpp **** constexpr double operator "" _deg (long double deg) { 5:user-literal.cpp **** return deg * M_PI / 180; 6:user-literal.cpp **** } 7:user-literal.cpp **** 8:user-literal.cpp **** class SomeLiteral { 9:user-literal.cpp **** double m; 10:user-literal.cpp **** public: 11:user-literal.cpp **** SomeLiteral(double arg) { 12:user-literal.cpp **** m = arg; 13:user-literal.cpp **** } 14:user-literal.cpp **** double get() const { 15:user-literal.cpp **** return m; 16:user-literal.cpp **** } 17:user-literal.cpp **** }; 18:user-literal.cpp **** 19:user-literal.cpp **** SomeLiteral operator "" _m (long double arg) { 20:user-literal.cpp **** return SomeLiteral(arg); 21:user-literal.cpp **** } 22:user-literal.cpp **** 23:user-literal.cpp **** void userLiteral() { 24:user-literal.cpp **** double d = 30.0_deg; 25:user-literal.cpp **** SomeLiteral s = 1.3_m; 26:user-literal.cpp **** 27:user-literal.cpp **** std::cout << "userLiteral " << d << " " << s.get() << std::endl; 28:user-literal.cpp **** } 8 .loc 1 28 0 9 .cfi_startproc 10 .LVL0: 11 0000 83FF01 cmpl $1, %edi 12 0003 752E jne .L5 13 .loc 1 28 0 discriminator 1 14 0005 81FEFFFF cmpl $65535, %esi 14 0000 15 000b 7526 jne .L5 16 .loc 1 28 0 is_stmt 0 17 000d 4883EC08 subq $8, %rsp 18 .cfi_def_cfa_offset 16 19 .file 2 "/usr/include/c++/4.8/iostream" 1:/usr/include/c++/4.8/iostream **** // Standard iostream objects -*- C++ -*- 2:/usr/include/c++/4.8/iostream **** 3:/usr/include/c++/4.8/iostream **** // Copyright (C) 1997-2013 Free Software Foundation, Inc. 4:/usr/include/c++/4.8/iostream **** // 5:/usr/include/c++/4.8/iostream **** // This file is part of the GNU ISO C++ Library. This library is free 6:/usr/include/c++/4.8/iostream **** // software; you can redistribute it and/or modify it under the 7:/usr/include/c++/4.8/iostream **** // terms of the GNU General Public License as published by the 8:/usr/include/c++/4.8/iostream **** // Free Software Foundation; either version 3, or (at your option) 9:/usr/include/c++/4.8/iostream **** // any later version. 10:/usr/include/c++/4.8/iostream **** GAS LISTING /tmp/ccRZh6If.s page 2 11:/usr/include/c++/4.8/iostream **** // This library is distributed in the hope that it will be useful, 12:/usr/include/c++/4.8/iostream **** // but WITHOUT ANY WARRANTY; without even the implied warranty of 13:/usr/include/c++/4.8/iostream **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14:/usr/include/c++/4.8/iostream **** // GNU General Public License for more details. 15:/usr/include/c++/4.8/iostream **** 16:/usr/include/c++/4.8/iostream **** // Under Section 7 of GPL version 3, you are granted additional 17:/usr/include/c++/4.8/iostream **** // permissions described in the GCC Runtime Library Exception, version 18:/usr/include/c++/4.8/iostream **** // 3.1, as published by the Free Software Foundation. 19:/usr/include/c++/4.8/iostream **** 20:/usr/include/c++/4.8/iostream **** // You should have received a copy of the GNU General Public License and 21:/usr/include/c++/4.8/iostream **** // a copy of the GCC Runtime Library Exception along with this program; 22:/usr/include/c++/4.8/iostream **** // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23:/usr/include/c++/4.8/iostream **** // <http://www.gnu.org/licenses/>. 24:/usr/include/c++/4.8/iostream **** 25:/usr/include/c++/4.8/iostream **** /** @file include/iostream 26:/usr/include/c++/4.8/iostream **** * This is a Standard C++ Library header. 27:/usr/include/c++/4.8/iostream **** */ 28:/usr/include/c++/4.8/iostream **** 29:/usr/include/c++/4.8/iostream **** // 30:/usr/include/c++/4.8/iostream **** // ISO C++ 14882: 27.3 Standard iostream objects 31:/usr/include/c++/4.8/iostream **** // 32:/usr/include/c++/4.8/iostream **** 33:/usr/include/c++/4.8/iostream **** #ifndef _GLIBCXX_IOSTREAM 34:/usr/include/c++/4.8/iostream **** #define _GLIBCXX_IOSTREAM 1 35:/usr/include/c++/4.8/iostream **** 36:/usr/include/c++/4.8/iostream **** #pragma GCC system_header 37:/usr/include/c++/4.8/iostream **** 38:/usr/include/c++/4.8/iostream **** #include <bits/c++config.h> 39:/usr/include/c++/4.8/iostream **** #include <ostream> 40:/usr/include/c++/4.8/iostream **** #include <istream> 41:/usr/include/c++/4.8/iostream **** 42:/usr/include/c++/4.8/iostream **** namespace std _GLIBCXX_VISIBILITY(default) 43:/usr/include/c++/4.8/iostream **** { 44:/usr/include/c++/4.8/iostream **** _GLIBCXX_BEGIN_NAMESPACE_VERSION 45:/usr/include/c++/4.8/iostream **** 46:/usr/include/c++/4.8/iostream **** /** 47:/usr/include/c++/4.8/iostream **** * @name Standard Stream Objects 48:/usr/include/c++/4.8/iostream **** * 49:/usr/include/c++/4.8/iostream **** * The <iostream> header declares the eight <em>standard stream 50:/usr/include/c++/4.8/iostream **** * objects</em>. For other declarations, see 51:/usr/include/c++/4.8/iostream **** * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html 52:/usr/include/c++/4.8/iostream **** * and the @link iosfwd I/O forward declarations @endlink 53:/usr/include/c++/4.8/iostream **** * 54:/usr/include/c++/4.8/iostream **** * They are required by default to cooperate with the global C 55:/usr/include/c++/4.8/iostream **** * library's @c FILE streams, and to be available during program 56:/usr/include/c++/4.8/iostream **** * startup and termination. For more information, see the HOWTO 57:/usr/include/c++/4.8/iostream **** * linked to above. 58:/usr/include/c++/4.8/iostream **** */ 59:/usr/include/c++/4.8/iostream **** //@{ 60:/usr/include/c++/4.8/iostream **** extern istream cin; /// Linked to standard input 61:/usr/include/c++/4.8/iostream **** extern ostream cout; /// Linked to standard output 62:/usr/include/c++/4.8/iostream **** extern ostream cerr; /// Linked to standard error (unbuffered) 63:/usr/include/c++/4.8/iostream **** extern ostream clog; /// Linked to standard error (buffered) 64:/usr/include/c++/4.8/iostream **** 65:/usr/include/c++/4.8/iostream **** #ifdef _GLIBCXX_USE_WCHAR_T 66:/usr/include/c++/4.8/iostream **** extern wistream wcin; /// Linked to standard input 67:/usr/include/c++/4.8/iostream **** extern wostream wcout; /// Linked to standard output GAS LISTING /tmp/ccRZh6If.s page 3 68:/usr/include/c++/4.8/iostream **** extern wostream wcerr; /// Linked to standard error (unbuffered) 69:/usr/include/c++/4.8/iostream **** extern wostream wclog; /// Linked to standard error (buffered) 70:/usr/include/c++/4.8/iostream **** #endif 71:/usr/include/c++/4.8/iostream **** //@} 72:/usr/include/c++/4.8/iostream **** 73:/usr/include/c++/4.8/iostream **** // For construction of filebuffers for cout, cin, cerr, clog et. al. 74:/usr/include/c++/4.8/iostream **** static ios_base::Init __ioinit; 20 .loc 2 74 0 is_stmt 1 21 0011 BF000000 movl $_ZStL8__ioinit, %edi 21 00 22 .LVL1: 23 0016 E8000000 call _ZNSt8ios_base4InitC1Ev 23 00 24 .LVL2: 25 001b BA000000 movl $__dso_handle, %edx 25 00 26 0020 BE000000 movl $_ZStL8__ioinit, %esi 26 00 27 0025 BF000000 movl $_ZNSt8ios_base4InitD1Ev, %edi 27 00 28 002a E8000000 call __cxa_atexit 28 00 29 .LVL3: 30 .loc 1 28 0 31 002f 4883C408 addq $8, %rsp 32 .cfi_def_cfa_offset 8 33 .L5: 34 0033 C3 ret 35 .cfi_endproc 36 .LFE1405: 38 .section .text._Zli4_dege,"axG",@progbits,_Zli4_dege,comdat 39 .weak _Zli4_dege 41 _Zli4_dege: 42 .LFB1243: 4:user-literal.cpp **** return deg * M_PI / 180; 43 .loc 1 4 0 44 .cfi_startproc 45 .LVL4: 5:user-literal.cpp **** } 46 .loc 1 5 0 47 0000 DB6C2408 fldt 8(%rsp) 48 0004 DC0D0000 fmull .LC0(%rip) 48 0000 49 000a D8350000 fdivs .LC1(%rip) 49 0000 50 0010 DD5C24F0 fstpl -16(%rsp) 51 0014 F20F1044 movsd -16(%rsp), %xmm0 51 24F0 6:user-literal.cpp **** 52 .loc 1 6 0 53 001a C3 ret 54 .cfi_endproc 55 .LFE1243: 57 .section .text._ZN11SomeLiteralC2Ed,"axG",@progbits,_ZN11SomeLiteralC5Ed,comdat 58 .align 2 59 .weak _ZN11SomeLiteralC2Ed 61 _ZN11SomeLiteralC2Ed: GAS LISTING /tmp/ccRZh6If.s page 4 62 .LFB1245: 11:user-literal.cpp **** m = arg; 63 .loc 1 11 0 64 .cfi_startproc 65 .LVL5: 66 .LBB2: 12:user-literal.cpp **** } 67 .loc 1 12 0 68 0000 F20F1107 movsd %xmm0, (%rdi) 69 0004 C3 ret 70 .LBE2: 71 .cfi_endproc 72 .LFE1245: 74 .weak _ZN11SomeLiteralC1Ed 75 .set _ZN11SomeLiteralC1Ed,_ZN11SomeLiteralC2Ed 76 .section .text._ZNK11SomeLiteral3getEv,"axG",@progbits,_ZNK11SomeLiteral3getEv,comdat 77 .align 2 78 .weak _ZNK11SomeLiteral3getEv 80 _ZNK11SomeLiteral3getEv: 81 .LFB1247: 14:user-literal.cpp **** return m; 82 .loc 1 14 0 83 .cfi_startproc 84 .LVL6: 15:user-literal.cpp **** } 85 .loc 1 15 0 86 0000 F20F1007 movsd (%rdi), %xmm0 16:user-literal.cpp **** }; 87 .loc 1 16 0 88 0004 C3 ret 89 .cfi_endproc 90 .LFE1247: 92 .text 93 .globl _Zli2_me 95 _Zli2_me: 96 .LFB1248: 19:user-literal.cpp **** return SomeLiteral(arg); 97 .loc 1 19 0 98 .cfi_startproc 99 .LVL7: 100 0034 4883EC28 subq $40, %rsp 101 .cfi_def_cfa_offset 48 20:user-literal.cpp **** } 102 .loc 1 20 0 103 0038 DB6C2430 fldt 48(%rsp) 104 003c DD5C2408 fstpl 8(%rsp) 105 0040 F20F1044 movsd 8(%rsp), %xmm0 105 2408 106 0046 488D7C24 leaq 16(%rsp), %rdi 106 10 107 004b E8000000 call _ZN11SomeLiteralC1Ed 107 00 108 .LVL8: 21:user-literal.cpp **** 109 .loc 1 21 0 110 0050 F20F1044 movsd 16(%rsp), %xmm0 110 2410 GAS LISTING /tmp/ccRZh6If.s page 5 111 0056 4883C428 addq $40, %rsp 112 .cfi_def_cfa_offset 8 113 005a C3 ret 114 .cfi_endproc 115 .LFE1248: 117 .section .rodata.str1.1,"aMS",@progbits,1 118 .LC5: 119 0000 75736572 .string "userLiteral " 119 4C697465 119 72616C20 119 00 120 .LC6: 121 000d 2000 .string " " 122 .text 123 .globl _Z11userLiteralv 125 _Z11userLiteralv: 126 .LFB1249: 23:user-literal.cpp **** double d = 30.0_deg; 127 .loc 1 23 0 128 .cfi_startproc 129 005b 55 pushq %rbp 130 .cfi_def_cfa_offset 16 131 .cfi_offset 6, -16 132 005c 53 pushq %rbx 133 .cfi_def_cfa_offset 24 134 .cfi_offset 3, -24 135 005d 4883EC38 subq $56, %rsp 136 .cfi_def_cfa_offset 80 137 .LBB3: 24:user-literal.cpp **** SomeLiteral s = 1.3_m; 138 .loc 1 24 0 139 0061 D9050000 flds .LC3(%rip) 139 0000 140 0067 DB3C24 fstpt (%rsp) 141 006a E8000000 call _Zli4_dege 141 00 142 .LVL9: 143 006f F20F1144 movsd %xmm0, 24(%rsp) 143 2418 144 0075 488B6C24 movq 24(%rsp), %rbp 144 18 145 .LVL10: 25:user-literal.cpp **** 146 .loc 1 25 0 147 007a DB2D0000 fldt .LC4(%rip) 147 0000 148 0080 DB3C24 fstpt (%rsp) 149 0083 E8000000 call _Zli2_me 149 00 150 .LVL11: 151 0088 F20F1144 movsd %xmm0, 32(%rsp) 151 2420 27:user-literal.cpp **** } 152 .loc 1 27 0 153 008e 488D7C24 leaq 32(%rsp), %rdi 153 20 154 0093 E8000000 call _ZNK11SomeLiteral3getEv GAS LISTING /tmp/ccRZh6If.s page 6 154 00 155 .LVL12: 156 0098 F20F1144 movsd %xmm0, 24(%rsp) 156 2418 157 009e 488B5C24 movq 24(%rsp), %rbx 157 18 158 00a3 BE000000 movl $.LC5, %esi 158 00 159 00a8 BF000000 movl $_ZSt4cout, %edi 159 00 160 00ad E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 160 00 161 .LVL13: 162 00b2 48896C24 movq %rbp, 24(%rsp) 162 18 163 00b7 F20F1044 movsd 24(%rsp), %xmm0 163 2418 164 00bd 4889C7 movq %rax, %rdi 165 00c0 E8000000 call _ZNSolsEd 165 00 166 .LVL14: 167 00c5 BE000000 movl $.LC6, %esi 167 00 168 00ca 4889C7 movq %rax, %rdi 169 00cd E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 169 00 170 .LVL15: 171 00d2 48895C24 movq %rbx, 24(%rsp) 171 18 172 00d7 F20F1044 movsd 24(%rsp), %xmm0 172 2418 173 00dd 4889C7 movq %rax, %rdi 174 00e0 E8000000 call _ZNSolsEd 174 00 175 .LVL16: 176 00e5 BE000000 movl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %esi 176 00 177 00ea 4889C7 movq %rax, %rdi 178 00ed E8000000 call _ZNSolsEPFRSoS_E 178 00 179 .LVL17: 180 .LBE3: 181 .loc 1 28 0 182 00f2 4883C438 addq $56, %rsp 183 .cfi_def_cfa_offset 24 184 00f6 5B popq %rbx 185 .cfi_def_cfa_offset 16 186 00f7 5D popq %rbp 187 .cfi_def_cfa_offset 8 188 .LVL18: 189 00f8 C3 ret 190 .cfi_endproc 191 .LFE1249: 194 _GLOBAL__sub_I__Zli2_me: 195 .LFB1406: 196 .loc 1 28 0 197 .cfi_startproc GAS LISTING /tmp/ccRZh6If.s page 7 198 00f9 4883EC08 subq $8, %rsp 199 .cfi_def_cfa_offset 16 200 .loc 1 28 0 201 00fd BEFFFF00 movl $65535, %esi 201 00 202 0102 BF010000 movl $1, %edi 202 00 203 0107 E8F4FEFF call _Z41__static_initialization_and_destruction_0ii 203 FF 204 .LVL19: 205 010c 4883C408 addq $8, %rsp 206 .cfi_def_cfa_offset 8 207 0110 C3 ret 208 .cfi_endproc 209 .LFE1406: 211 .section .init_array,"aw" 212 .align 8 213 0000 00000000 .quad _GLOBAL__sub_I__Zli2_me 213 00000000 214 .local _ZStL8__ioinit 215 .comm _ZStL8__ioinit,1,1 216 .section .rodata.cst8,"aM",@progbits,8 217 .align 8 218 .LC0: 219 0000 182D4454 .long 1413754136 220 0004 FB210940 .long 1074340347 221 .section .rodata.cst4,"aM",@progbits,4 222 .align 4 223 .LC1: 224 0000 00003443 .long 1127481344 225 .align 4 226 .LC3: 227 0004 0000F041 .long 1106247680 228 .section .rodata.cst16,"aM",@progbits,16 229 .align 16 230 .LC4: 231 0000 66666666 .long 1717986918 232 0004 666666A6 .long 2791728742 233 0008 FF3F0000 .long 16383 234 000c 00000000 .long 0 235 .text 236 .Letext0: 237 .file 3 "/usr/include/libio.h" 238 .file 4 "/usr/include/stdio.h" 239 .file 5 "<built-in>" 240 .file 6 "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h" 241 .file 7 "/usr/include/wchar.h" 242 .file 8 "/usr/include/c++/4.8/cwchar" 243 .file 9 "/usr/include/c++/4.8/bits/exception_ptr.h" 244 .file 10 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h" 245 .file 11 "/usr/include/c++/4.8/bits/char_traits.h" 246 .file 12 "/usr/include/c++/4.8/cstdint" 247 .file 13 "/usr/include/c++/4.8/clocale" 248 .file 14 "/usr/include/c++/4.8/cstdlib" 249 .file 15 "/usr/include/c++/4.8/cstdio" 250 .file 16 "/usr/include/c++/4.8/bits/ios_base.h" 251 .file 17 "/usr/include/c++/4.8/cwctype" GAS LISTING /tmp/ccRZh6If.s page 8 252 .file 18 "/usr/include/c++/4.8/ostream" 253 .file 19 "/usr/include/c++/4.8/iosfwd" 254 .file 20 "/usr/include/x86_64-linux-gnu/bits/wchar2.h" 255 .file 21 "/usr/include/time.h" 256 .file 22 "/usr/include/c++/4.8/ext/new_allocator.h" 257 .file 23 "/usr/include/c++/4.8/ext/numeric_traits.h" 258 .file 24 "/usr/include/c++/4.8/debug/debug.h" 259 .file 25 "/usr/include/stdint.h" 260 .file 26 "/usr/include/locale.h" 261 .file 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 262 .file 28 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/atomic_word.h" 263 .file 29 "/usr/include/stdlib.h" 264 .file 30 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 265 .file 31 "/usr/include/_G_config.h" 266 .file 32 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 267 .file 33 "/usr/include/wctype.h" 268 .file 34 "/usr/include/c++/4.8/bits/stl_pair.h" GAS LISTING /tmp/ccRZh6If.s page 9 DEFINED SYMBOLS *ABS*:0000000000000000 user-literal.cpp /tmp/ccRZh6If.s:5 .text:0000000000000000 _Z41__static_initialization_and_destruction_0ii .bss:0000000000000000 _ZStL8__ioinit /tmp/ccRZh6If.s:41 .text._Zli4_dege:0000000000000000 _Zli4_dege /tmp/ccRZh6If.s:61 .text._ZN11SomeLiteralC2Ed:0000000000000000 _ZN11SomeLiteralC2Ed /tmp/ccRZh6If.s:61 .text._ZN11SomeLiteralC2Ed:0000000000000000 _ZN11SomeLiteralC1Ed /tmp/ccRZh6If.s:80 .text._ZNK11SomeLiteral3getEv:0000000000000000 _ZNK11SomeLiteral3getEv /tmp/ccRZh6If.s:95 .text:0000000000000034 _Zli2_me /tmp/ccRZh6If.s:125 .text:000000000000005b _Z11userLiteralv /tmp/ccRZh6If.s:194 .text:00000000000000f9 _GLOBAL__sub_I__Zli2_me /tmp/ccRZh6If.s:226 .rodata.cst4:0000000000000004 .LC3 /tmp/ccRZh6If.s:230 .rodata.cst16:0000000000000000 .LC4 /tmp/ccRZh6If.s:218 .rodata.cst8:0000000000000000 .LC0 /tmp/ccRZh6If.s:223 .rodata.cst4:0000000000000000 .LC1 .group:0000000000000000 _ZN11SomeLiteralC5Ed UNDEFINED SYMBOLS _ZNSt8ios_base4InitC1Ev __dso_handle _ZNSt8ios_base4InitD1Ev __cxa_atexit _ZSt4cout _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc _ZNSolsEd _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ _ZNSolsEPFRSoS_E