Adopt consistent style in asm statements.
[pintos-anon] / src / tests / vm / pt-grow-pusha.c
1 /* Expand the stack by 32 bytes all at once using the PUSHA
2    instruction.
3    This must succeed. */
4
5 #include <string.h>
6 #include "tests/arc4.h"
7 #include "tests/cksum.h"
8 #include "tests/lib.h"
9 #include "tests/main.h"
10
11 void
12 test_main (void)
13 {
14   asm volatile
15     ("movl %%esp, %%eax;"        /* Save a copy of the stack pointer. */
16      "andl $0xfffff000, %%esp;"  /* Move stack pointer to bottom of page. */
17      "pushal;"                   /* Push 32 bytes on stack at once. */
18      "movl %%eax, %%esp"         /* Restore copied stack pointer. */
19      : : : "eax");               /* Tell GCC we destroyed eax. */
20 }