This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

inline assembly uses a different nameset


Source:

asm("sub $0x0c,%esp");
asm ("push %0" : : "o" (v));
asm("call  %0" :: "m"(printf));
asm("add    $0x10,%esp");
printf(v);

Disassembly:
0x80483f8 <main+30>:    sub    $0xc,%esp
0x80483fb <main+33>:    pushl  0x80494a0
0x8048401 <main+39>:    call   0x8048490 <_IO_stdin_used+32>
0x8048406 <main+44>:    add    $0x10,%esp

0x8048409 <main+47>:    sub    $0xc,%esp
0x804840c <main+50>:    pushl  0x80494a0
0x8048412 <main+56>:    call   0x8048268 <printf>
0x8048417 <main+61>:    add    $0x10,%esp

Note the two different results for the value of printf=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]