Update copyright year range in all GDB files
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-prologue.c
index 1ce8b68fd7cce4a18b2047228543e59aeb40df86..06e1ed805454dc9014bc27fdc728584ef4287243 100644 (file)
@@ -1,23 +1,21 @@
 /* Unwinder test program.
 
-   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef SYMBOL_PREFIX
 #define SYMBOL(str)    SYMBOL_PREFIX #str
@@ -29,12 +27,18 @@ void gdb1253 (void);
 void gdb1718 (void);
 void gdb1338 (void);
 void jump_at_beginning (void);
+void standard (void);
+void stack_align_ecx (void);
+void stack_align_edx (void);
+void stack_align_eax (void);
 
 int
 main (void)
 {
   standard ();
-  stack_align ();
+  stack_align_ecx ();
+  stack_align_edx ();
+  stack_align_eax ();
   gdb1253 ();
   gdb1718 ();
   gdb1338 ();
@@ -114,7 +118,7 @@ asm(".text\n"
 
 asm(".text\n"
     "    .align 8\n"
-    SYMBOL (stack_align) ":\n"
+    SYMBOL (stack_align_ecx) ":\n"
     "    leal  4(%esp), %ecx\n"
     "    andl  $-16, %esp\n"
     "    pushl -4(%ecx)\n"
@@ -128,3 +132,38 @@ asm(".text\n"
     "    popl  %ebp\n"
     "    leal  -4(%ecx), %esp\n"
     "    ret\n");
+
+asm(".text\n"
+    "    .align 8\n"
+    SYMBOL (stack_align_edx) ":\n"
+    "    leal  4(%esp), %edx\n"
+    "    andl  $-16, %esp\n"
+    "    pushl -4(%edx)\n"
+    "    pushl %ebp\n"
+    "    movl  %esp, %ebp\n"
+    "    pushl %edi\n"
+    "    pushl %ecx\n"
+    "    int   $0x03\n"
+    "    popl  %ecx\n"
+    "    popl  %edi\n"
+    "    popl  %ebp\n"
+    "    leal  -4(%edx), %esp\n"
+    "    ret\n");
+
+asm(".text\n"
+    "    .align 8\n"
+    SYMBOL (stack_align_eax) ":\n"
+    "    leal  4(%esp), %eax\n"
+    "    andl  $-16, %esp\n"
+    "    pushl -4(%eax)\n"
+    "    pushl %ebp\n"
+    "    movl  %esp, %ebp\n"
+    "    pushl %edi\n"
+    "    pushl %ecx\n"
+    "    int   $0x03\n"
+    "    popl  %ecx\n"
+    "    popl  %edi\n"
+    "    popl  %ebp\n"
+    "    leal  -4(%eax), %esp\n"
+    "    ret\n");
+
This page took 0.029029 seconds and 4 git commands to generate.