cdt/cdt_5_0_x/org.eclipse.cdt.core.tests/resources/asmTests/AsmTest.S
changeset 0 0e6d23e2b466
equal deleted inserted replaced
-1:000000000000 0:0e6d23e2b466
       
     1 /*
       
     2  * AsmTest.S
       
     3  */
       
     4 
       
     5 #include <include1.h>
       
     6 #include "include2.h"
       
     7 
       
     8 	.globl globalLabel1
       
     9 	.global globalLabel2, globalLabel3
       
    10 
       
    11 nonGlobalLabel:
       
    12 	nop
       
    13 	ret   @ arm style comment
       
    14 /* end */
       
    15 
       
    16 globalLabel1:
       
    17 	movl    %esp, %eax
       
    18 	movl    %eax, storage
       
    19 otherLabel1:
       
    20 	movb	$0x81, %ah  # end-of-line comment
       
    21 	jmp	globalLabel2
       
    22 
       
    23 ; data	
       
    24 storage:
       
    25 	.long 0
       
    26 /* end */
       
    27 
       
    28 #define MACRO mmm
       
    29 
       
    30 	/*
       
    31 	 * block comment
       
    32 	 */	
       
    33 globalLabel2:
       
    34 	movl    %esp, %eax
       
    35 	movl    %eax, storage
       
    36 
       
    37 ; line comment
       
    38 
       
    39 otherLabel2:
       
    40 	movb	$0x81, %ah  ; end-of-line comment
       
    41 	jmp	globalLabel3    # comment
       
    42 /* end */
       
    43 
       
    44 globalLabel3:
       
    45 	movl    %esp, %eax
       
    46 	movl    %eax, storage
       
    47 	
       
    48 otherLabel3:
       
    49 	movb	$0x81, %ah
       
    50 	jmp	globalLabel3
       
    51 	nop
       
    52 /* end */
       
    53 
       
    54 	.global alloca
       
    55 alloca:
       
    56 	popl %edx
       
    57 	popl %eax
       
    58 	addl $3,%eax
       
    59 	andl $0xfffffffc,%eax
       
    60 	subl %eax,%esp
       
    61 	movl %esp,%eax
       
    62 	pushl %eax
       
    63 	pushl %edx
       
    64 	ret
       
    65 /* end */