x86: Add tests for -n option of x86 assembler
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / general.s
index 8d08dbf1571c0175cea73fbe3d66408b1f573c3d..385b478990847c2398c0c234925aadb3dc57b358 100644 (file)
@@ -1,5 +1,34 @@
 .psize 0
 .text
+#test jumps and calls
+1:     jmp     1b
+       jmp     xxx
+       jmp     *xxx
+       jmp     xxx(,1)
+       jmp     *%edi
+       jmp     %edi
+       jmp     *(%edi)
+       jmp     (%edi)
+       ljmp    *xxx(,%edi,4)
+       ljmp    xxx(,%edi,4)
+       ljmp    *xxx
+       ljmp    xxx(,1)
+       ljmp    $0x1234,$xxx
+
+       call    1b
+       call    xxx
+       call    *xxx
+       call    xxx(,1)
+       call    *%edi
+       call    %edi
+       call    *(%edi)
+       call    (%edi)
+       lcall   *xxx(,%edi,4)
+       lcall   xxx(,%edi,4)
+       lcall   *xxx
+       lcall   xxx(,1)
+       lcall   $0x1234,$xxx
+
 # test various segment reg insns
        push    %ds
        pushl   %ds
        mov     %esi,(,%ebx,1)
        andb    $~0x80,foo
 
+       and     $0xfffe,%ax
+       and     $0xff00,%ax
+       and     $0xfffe,%eax
+       and     $0xff00,%eax
+       and     $0xfffffffe,%eax
+
+.code16
+       and     $0xfffe,%ax
+       and     $0xff00,%ax
+       and     $0xfffe,%eax
+       and     $0xff00,%eax
+       and     $0xfffffffe,%eax
+
 #check 16-bit code auto address prefix
 .code16gcc
        leal    -256(%ebp),%edx
        movl    %eax,140(%esp)
 
 .code32
-       jmp     1b
-       jmp     xxx
-       jmp     *xxx
-       jmp     xxx(,1)
-       jmp     *%edi
-       jmp     %edi
-       jmp     *(%edi)
-       jmp     (%edi)
-       ljmp    *xxx(,%edi,4)
-       ljmp    xxx(,%edi,4)
-       ljmp    *xxx
-       ljmp    xxx(,1)
-       ljmp    $0x1234,$xxx
-
-       call    1b
-       call    xxx
-       call    *xxx
-       call    xxx(,1)
-       call    *%edi
-       call    %edi
-       call    *(%edi)
-       call    (%edi)
-       lcall   *xxx(,%edi,4)
-       lcall   xxx(,%edi,4)
-       lcall   *xxx
-       lcall   xxx(,1)
-       lcall   $0x1234,$xxx
+# Make sure that we won't remove movzb by accident.
+       movzb   %al,%di
+       movzb   %al,%ecx
 
        # Force a good alignment.
        .p2align        4,0
This page took 0.025356 seconds and 4 git commands to generate.