This is the mail archive of the gcc-help@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]

What's the meaning of #APP and #NOAPP


The following C souce file is compiled and produce relevant assembly
language file.

#include <stdio.h>

int main()
{
   int a = 10;
   int b = 20;
   int result;
   result = a * b;
   asm ( "nop");
   printf("The result is %d\n", result);
   return 0;
}

        .file   "asmtest.c"
        .section        .rodata
.LC0:
        .string "The result is %d\n"
        .text
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        andl    $-16, %esp
        subl    $32, %esp
        movl    $10, 28(%esp)
        movl    $20, 24(%esp)
        movl    28(%esp), %eax
        imull   24(%esp), %eax
        movl    %eax, 20(%esp)
#APP
# 10 "asmtest.c" 1
        nop
# 0 "" 2
#NO_APP
        movl    $.LC0, %eax
        movl    20(%esp), %edx
        movl    %edx, 4(%esp)
        movl    %eax, (%esp)
        call    printf
        movl    $0, %eax
        leave
        ret
        .size   main, .-main
        .ident  "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3"
        .section        .note.GNU-stack,"",@progbits

what's the meaning of the following slice of code?

#APP
# 10 "asmtest.c" 1
        nop
# 0 "" 2
#NO_APP


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