61efb015710cb94422ddd9c9dbdfbab058cfd7d2
[pintos-anon] / src / tests / vm / pt-grow-pusha.c
1 #include <string.h>
2 #include "tests/arc4.h"
3 #include "tests/cksum.h"
4 #include "tests/lib.h"
5 #include "tests/main.h"
6
7 void
8 test_main (void)
9 {
10   asm volatile
11     ("mov %%eax, %%esp;"        /* Save a copy of the stack pointer. */
12      "and %%esp, 0xfffff000;"   /* Move stack pointer to bottom of page. */
13      "pusha;"                   /* Push 32 bytes on stack at once. */
14      "mov %%esp, %%eax"         /* Restore copied stack pointer. */
15      ::: "eax");                /* Tell GCC we modified eax. */
16 }