# gas comment with ``gnu'' style quotes /* some directive tests */ .byte 0xff .byte 1, 2, 3 .short 1, 2, 3 .word 1, 2, 3 .long 1, 2, 3 .int 1, 2, 3 .align 8 .byte 1/* .align 16, 0x90 gas is too clever for us with 0x90 fill */ .balign 4, 0x92 .align 16, 0x91 /* 0x91 tests the non-clever behaviour */ .skip 3 .skip 15, 0x90 .string "hello\0world"/* Macro expansion should work like with C, the #n shouldn't be parsed as asm line comment */#define __stringify(n) #n#define stringify(n) __stringify(n) .skip 8,0x90 .asciz stringify(BLA) .skip 8,0x90 # 28 "asmtest.S" # a line directive (and a line comment) movl %eax, %ebx # some more asm comment/* some label tests */L1: movl %eax, %ebx mov 0x10000, %eaxL2: movl $L2 - L1, %ecxvar1: nop ; nop ; nop ; nop mov var1, %eax /* instruction tests */movl %eax, %ebxmov 0x10000, %eaxmov 0x10000, %axmov 0x10000, %almov %al, 0x10000 mov $1, %edxmov $1, %dxmov $1, %clmovb $2, 0x100(%ebx,%edx,2)movw $2, 0x100(%ebx,%edx,2)movl $2, 0x100(%ebx,%edx,2)movl %eax, 0x100(%ebx,%edx,2)movl 0x100(%ebx,%edx,2), %edxmovw %ax, 0x100(%ebx,%edx,2) movw $0x1122,%simovl $0x112233,%edxmovl $0x80000000, %esimovl $-0x7fffffff, %edi#ifdef __x86_64__mov $0x11223344,%rbxmovq $0x11223344,%rbxmov $0x1122334455,%rbxmovq $0x1122334455,%rbxmovl $0x11334455,(%rbx)#endif mov %eax, 0x12(,%edx,2) #ifdef __i386__mov %cr3, %edxmov %ecx, %cr3movl %cr3, %eaxmovl %tr3, %eaxmovl %db3, %ebxmovl %dr6, %eax#elsemov %cr3, %rdxmov %rcx, %cr3movq %cr3, %raxmovq %db3, %rbxmovq %dr6, %raxmov %cr8, %rsimov %rdi, %cr8#endifmovl %fs, %ecxmovl %ebx, %fs #ifdef __x86_64__movq %r8, %r9movq %r10, %r11movq %r12, %r13movq %r14, %r15movq %rax, %r9movq %r15, %rsiinc %r9bdec %r10wnot %r11dnegq %r12decb %r13bincw %r14wnotl %r15d#endif movsbl 0x1000, %eax movsbw 0x1000, %ax movswl 0x1000, %eax movzbl 0x1000, %eax movzbw 0x1000, %ax movzwl 0x1000, %eax movzb 0x1000, %eax movzb 0x1000, %ax mov $0x12345678,%eax #ifdef __x86_64__ movzb 0x1000, %rax movzbq 0x1000, %rbx movsbq 0x1000, %rdx movzwq 0x1000, %rdi movswq 0x1000, %rdx movslq %eax, %rcx mov $0x12345678,%rax mov $0x12345678,%rdx mov $0x12345678,%r10 mov $0x123456789abcdef0,%rax mov $0x123456789abcdef0,%rcx mov $0x123456789abcdef0,%r11#endif #ifdef __i386__ pushl %eax push %eax push %cs#else pushq %rax push %rax#endif pushw %ax push %gs push $1 push $100 push 0x42(%eax) pop 0x43(%esi) #ifdef __i386__ popl %eax pop %eax pop %ds#else popq %rax pop %rax#endif popw %ax pop %fs xchg %eax, %ecx xchg %edx, %eax xchg %bx, 0x10000 xchg 0x10000, %ebx xchg 0x10000, %dl in $100, %al in $100, %ax in $100, %eax in %dx, %al in %dx, %ax in %dx, %eax inb %dx inw %dx inl %dx out %al, $100 out %ax, $100 out %eax, $100 /* NOTE: gas is bugged here, so size must be added */ outb %al, %dx outw %ax, %dx outl %eax, %dx leal 0x1000(%ebx), %ecx lea 0x1000(%ebx), %ecx #ifdef __i386__ les 0x2000, %eax lds 0x2000, %ebx lss 0x2000, %edx#endif lfs 0x2000, %ecx lgs 0x2000, %edx addl $0x123, %eaxadd $0x123, %ebxadd $-16, %ecxadd $-0x123, %esiadd $1, %bxadd $1, %ebxadd $-1, %bxadd $-1, %ebxadd $127, %bxaddl $127, %ebxaddl $-128, %ebxaddl $-128, %ebxaddl $-129, %ebxaddl $128, %ebxaddl $255, %ebxaddl $256, %ebxandb $0xf, %ahandb $-15, %clxorb $127, %dhcmpb $42, (%eax)addl $0x123, 0x100addl $0x123, 0x100(%ebx)addl $0x123, 0x100(%ebx,%edx,2)addl $0x123, 0x100(%esp)addl $0x123, (3*8)(%esp)addl $0x123, (%ebp)addl $0x123, (%esp)cmpl $0x123, (%esp) #ifdef __x86_64__xor %bl,%ahxor %bl,%r8bxor %r9b,%blxor %sil,%cladd %eax,(%r8d)add %ebx,(%r9)add %edx,(%r10d,%r11d)add %ecx,(%r12,%r13)add %esi,(%r14,%r15,4)add %edi,0x1000(%rbx,%r12,8)add %r11,0x1000(%ebp,%r9d,8)movb $12, %ahmovb $13, %bplmovb $14, %dilmovb $15, %r12b#endif add %eax, (%ebx)add (%ebx), %eax or %dx, (%ebx)or (%ebx), %si add %cl, (%ebx)add (%ebx), %dl inc %edx incl 0x10000 incb 0x10000 dec %dx test $1, %al test $1, %cl testl $1, 0x1000 testb $1, 0x1000 testw $1, 0x1000 test %eax, %ebx test %eax, 0x1000 test 0x1000, %edx not %edx notw 0x10000 notl 0x10000 notb 0x10000 neg %edx negw 0x10000 negl 0x10000 negb 0x10000 imul %ecx mul %edx mulb %cl imul %eax, %ecx imul 0x1000, %cx imul $10, %eax, %ecx imul $10, %ax, %cx imul $10, %eax imul $0x1100000, %eax imul $1, %eax idivw 0x1000 div %ecx div %bl div %ecx, %eax and $15,%bxand $-20,%edx shl %edxshl $10, %edxshl %cl, %edx shld $1, %eax, %edxshld %cl, %eax, %edxshld %eax, %edx shrd $1, %eax, %edxshrd %cl, %eax, %edxshrd %eax, %edx L4:call 0x1000call L4#ifdef __i386__call *%eax#elsecall *%rax#endifcall *0x1000call func1 .global L5,L6 L5:L6: #ifdef __i386__lcall $0x100, $0x1000#elselcall *0x100lcall *(%rax)#endif jmp 0x1000jmp *(%edi)#ifdef __i386__jmp *%eax#elsejmp *%rax#endifjmp *0x1000 #ifdef __i386__ljmp $0x100, $0x1000#elseljmp *0x100ljmp *(%rdi)ljmpl *(%esi)ljmpw *(%esi)#endif retret $10#ifdef __i386__retlretl $10#elseretqretq $10#endif lret lret $10 enter $1234, $10 L3: jo 0x1000 jnp 0x1001 jne 0x1002 jg 0x1003 jo L3 jnp L3 jne L3 jg L3 loopne L3 loopnz L3 loope L3 loopz L3 loop L3 jecxz L3 seto %al setc %al setcb %al setnp 0x1000 setl 0xaaaa setg %dl fadd fadd %st(1), %st fadd %st(0), %st(1) fadd %st(3) fmul %st(0),%st(0) fmul %st(0),%st(1) faddp %st(5) faddp faddp %st(1), %st fadds 0x1000 fiadds 0x1002 faddl 0x1004 fiaddl 0x1006 fmul fmul %st(1), %st fmul %st(3) fmulp %st(5) fmulp fmulp %st(1), %st fmuls 0x1000 fimuls 0x1002 fmull 0x1004 fimull 0x1006 fsub fsub %st(1), %st fsub %st(3) fsubp %st(5) fsubp fsubp %st(1), %st fsubs 0x1000 fisubs 0x1002 fsubl 0x1004 fisubl 0x1006 fsubr fsubr %st(1), %st fsubr %st(3) fsubrp %st(5) fsubrp fsubrp %st(1), %st fsubrs 0x1000 fisubrs 0x1002 fsubrl 0x1004 fisubrl 0x1006 fdiv fdiv %st(1), %st fdiv %st(3) fdivp %st(5) fdivp fdivp %st(1), %st fdivs 0x1000 fidivs 0x1002 fdivl 0x1004 fidivl 0x1006 fcom %st(3) fcoms 0x1000 ficoms 0x1002 fcoml 0x1004 ficoml 0x1006 fcomp %st(5) fcomp fcompp fcomps 0x1000 ficomps 0x1002 fcompl 0x1004 ficompl 0x1006 fld %st(5) fldl 0x1000 flds 0x1002 fildl 0x1004 fst %st(4) fstp %st(6) fstpt 0x1006 fbstp 0x1008 fxch fxch %st(4) fucom %st(6) fucomp %st(3) fucompp finit fninit fldcw 0x1000 fnstcw 0x1002 fstcw 0x1002 fnstsw 0x1004 fnstsw (%eax) fstsw 0x1004Lines 1–500 of 978. Load more
# gas comment with ``gnu'' style quotes /* some directive tests */ .byte 0xff .byte 1, 2, 3 .short 1, 2, 3 .word 1, 2, 3 .long 1, 2, 3 .int 1, 2, 3 .align 8 .byte 1 /* .align 16, 0x90 gas is too clever for us with 0x90 fill */ .balign 4, 0x92 .align 16, 0x91 /* 0x91 tests the non-clever behaviour */ .skip 3 .skip 15, 0x90 .string "hello\0world" /* Macro expansion should work like with C, the #n shouldn't be parsed as asm line comment */ #define __stringify(n) #n #define stringify(n) __stringify(n) .skip 8,0x90 .asciz stringify(BLA) .skip 8,0x90 # 28 "asmtest.S" # a line directive (and a line comment) movl %eax, %ebx # some more asm comment /* some label tests */ L1: movl %eax, %ebx mov 0x10000, %eax L2: movl $L2 - L1, %ecx var1: nop ; nop ; nop ; nop mov var1, %eax /* instruction tests */ movl %eax, %ebx mov 0x10000, %eax mov 0x10000, %ax mov 0x10000, %al mov %al, 0x10000 mov $1, %edx mov $1, %dx mov $1, %cl movb $2, 0x100(%ebx,%edx,2) movw $2, 0x100(%ebx,%edx,2) movl $2, 0x100(%ebx,%edx,2) movl %eax, 0x100(%ebx,%edx,2) movl 0x100(%ebx,%edx,2), %edx movw %ax, 0x100(%ebx,%edx,2) movw $0x1122,%si movl $0x112233,%edx movl $0x80000000, %esi movl $-0x7fffffff, %edi #ifdef __x86_64__ mov $0x11223344,%rbx movq $0x11223344,%rbx mov $0x1122334455,%rbx movq $0x1122334455,%rbx movl $0x11334455,(%rbx) #endif mov %eax, 0x12(,%edx,2) #ifdef __i386__ mov %cr3, %edx mov %ecx, %cr3 movl %cr3, %eax movl %tr3, %eax movl %db3, %ebx movl %dr6, %eax #else mov %cr3, %rdx mov %rcx, %cr3 movq %cr3, %rax movq %db3, %rbx movq %dr6, %rax mov %cr8, %rsi mov %rdi, %cr8 #endif movl %fs, %ecx movl %ebx, %fs #ifdef __x86_64__ movq %r8, %r9 movq %r10, %r11 movq %r12, %r13 movq %r14, %r15 movq %rax, %r9 movq %r15, %rsi inc %r9b dec %r10w not %r11d negq %r12 decb %r13b incw %r14w notl %r15d #endif movsbl 0x1000, %eax movsbw 0x1000, %ax movswl 0x1000, %eax movzbl 0x1000, %eax movzbw 0x1000, %ax movzwl 0x1000, %eax movzb 0x1000, %eax movzb 0x1000, %ax mov $0x12345678,%eax #ifdef __x86_64__ movzb 0x1000, %rax movzbq 0x1000, %rbx movsbq 0x1000, %rdx movzwq 0x1000, %rdi movswq 0x1000, %rdx movslq %eax, %rcx mov $0x12345678,%rax mov $0x12345678,%rdx mov $0x12345678,%r10 mov $0x123456789abcdef0,%rax mov $0x123456789abcdef0,%rcx mov $0x123456789abcdef0,%r11 #endif #ifdef __i386__ pushl %eax push %eax push %cs #else pushq %rax push %rax #endif pushw %ax push %gs push $1 push $100 push 0x42(%eax) pop 0x43(%esi) #ifdef __i386__ popl %eax pop %eax pop %ds #else popq %rax pop %rax #endif popw %ax pop %fs xchg %eax, %ecx xchg %edx, %eax xchg %bx, 0x10000 xchg 0x10000, %ebx xchg 0x10000, %dl in $100, %al in $100, %ax in $100, %eax in %dx, %al in %dx, %ax in %dx, %eax inb %dx inw %dx inl %dx out %al, $100 out %ax, $100 out %eax, $100 /* NOTE: gas is bugged here, so size must be added */ outb %al, %dx outw %ax, %dx outl %eax, %dx leal 0x1000(%ebx), %ecx lea 0x1000(%ebx), %ecx #ifdef __i386__ les 0x2000, %eax lds 0x2000, %ebx lss 0x2000, %edx #endif lfs 0x2000, %ecx lgs 0x2000, %edx addl $0x123, %eax add $0x123, %ebx add $-16, %ecx add $-0x123, %esi add $1, %bx add $1, %ebx add $-1, %bx add $-1, %ebx add $127, %bx addl $127, %ebx addl $-128, %ebx addl $-128, %ebx addl $-129, %ebx addl $128, %ebx addl $255, %ebx addl $256, %ebx andb $0xf, %ah andb $-15, %cl xorb $127, %dh cmpb $42, (%eax) addl $0x123, 0x100 addl $0x123, 0x100(%ebx) addl $0x123, 0x100(%ebx,%edx,2) addl $0x123, 0x100(%esp) addl $0x123, (3*8)(%esp) addl $0x123, (%ebp) addl $0x123, (%esp) cmpl $0x123, (%esp) #ifdef __x86_64__ xor %bl,%ah xor %bl,%r8b xor %r9b,%bl xor %sil,%cl add %eax,(%r8d) add %ebx,(%r9) add %edx,(%r10d,%r11d) add %ecx,(%r12,%r13) add %esi,(%r14,%r15,4) add %edi,0x1000(%rbx,%r12,8) add %r11,0x1000(%ebp,%r9d,8) movb $12, %ah movb $13, %bpl movb $14, %dil movb $15, %r12b #endif add %eax, (%ebx) add (%ebx), %eax or %dx, (%ebx) or (%ebx), %si add %cl, (%ebx) add (%ebx), %dl inc %edx incl 0x10000 incb 0x10000 dec %dx test $1, %al test $1, %cl testl $1, 0x1000 testb $1, 0x1000 testw $1, 0x1000 test %eax, %ebx test %eax, 0x1000 test 0x1000, %edx not %edx notw 0x10000 notl 0x10000 notb 0x10000 neg %edx negw 0x10000 negl 0x10000 negb 0x10000 imul %ecx mul %edx mulb %cl imul %eax, %ecx imul 0x1000, %cx imul $10, %eax, %ecx imul $10, %ax, %cx imul $10, %eax imul $0x1100000, %eax imul $1, %eax idivw 0x1000 div %ecx div %bl div %ecx, %eax and $15,%bx and $-20,%edx shl %edx shl $10, %edx shl %cl, %edx shld $1, %eax, %edx shld %cl, %eax, %edx shld %eax, %edx shrd $1, %eax, %edx shrd %cl, %eax, %edx shrd %eax, %edx L4: call 0x1000 call L4 #ifdef __i386__ call *%eax #else call *%rax #endif call *0x1000 call func1 .global L5,L6 L5: L6: #ifdef __i386__ lcall $0x100, $0x1000 #else lcall *0x100 lcall *(%rax) #endif jmp 0x1000 jmp *(%edi) #ifdef __i386__ jmp *%eax #else jmp *%rax #endif jmp *0x1000 #ifdef __i386__ ljmp $0x100, $0x1000 #else ljmp *0x100 ljmp *(%rdi) ljmpl *(%esi) ljmpw *(%esi) #endif ret ret $10 #ifdef __i386__ retl retl $10 #else retq retq $10 #endif lret lret $10 enter $1234, $10 L3: jo 0x1000 jnp 0x1001 jne 0x1002 jg 0x1003 jo L3 jnp L3 jne L3 jg L3 loopne L3 loopnz L3 loope L3 loopz L3 loop L3 jecxz L3 seto %al setc %al setcb %al setnp 0x1000 setl 0xaaaa setg %dl fadd fadd %st(1), %st fadd %st(0), %st(1) fadd %st(3) fmul %st(0),%st(0) fmul %st(0),%st(1) faddp %st(5) faddp faddp %st(1), %st fadds 0x1000 fiadds 0x1002 faddl 0x1004 fiaddl 0x1006 fmul fmul %st(1), %st fmul %st(3) fmulp %st(5) fmulp fmulp %st(1), %st fmuls 0x1000 fimuls 0x1002 fmull 0x1004 fimull 0x1006 fsub fsub %st(1), %st fsub %st(3) fsubp %st(5) fsubp fsubp %st(1), %st fsubs 0x1000 fisubs 0x1002 fsubl 0x1004 fisubl 0x1006 fsubr fsubr %st(1), %st fsubr %st(3) fsubrp %st(5) fsubrp fsubrp %st(1), %st fsubrs 0x1000 fisubrs 0x1002 fsubrl 0x1004 fisubrl 0x1006 fdiv fdiv %st(1), %st fdiv %st(3) fdivp %st(5) fdivp fdivp %st(1), %st fdivs 0x1000 fidivs 0x1002 fdivl 0x1004 fidivl 0x1006 fcom %st(3) fcoms 0x1000 ficoms 0x1002 fcoml 0x1004 ficoml 0x1006 fcomp %st(5) fcomp fcompp fcomps 0x1000 ficomps 0x1002 fcompl 0x1004 ficompl 0x1006 fld %st(5) fldl 0x1000 flds 0x1002 fildl 0x1004 fst %st(4) fstp %st(6) fstpt 0x1006 fbstp 0x1008 fxch fxch %st(4) fucom %st(6) fucomp %st(3) fucompp finit fninit fldcw 0x1000 fnstcw 0x1002 fstcw 0x1002 fnstsw 0x1004 fnstsw (%eax) fstsw 0x1004