gas/
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / general.s
index c794157c89de9eb5bfce3263fdc68c6897504b7b..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
        inb     $255
        inw     $2
        inl     $4
-       outl    %eax,%dx
-       out     %al, $42
        in      $13, %ax
+       out     %al,%dx
+       out     %ax,%dx
+       out     %eax,%dx
+       out     %al,(%dx)
+       out     %ax,(%dx)
+       out     %eax,(%dx)
+       outb    %al,%dx
+       outw    %ax,%dx
+       outl    %eax,%dx
+       outb    %dx
+       outw    %dx
+       outl    %dx
+       outb    $255
+       outw    $2
+       outl    $4
+       out     %ax, $13
 # These are used in AIX.
        inw     (%dx)
        outw    (%dx)
        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.026135 seconds and 4 git commands to generate.