diff options
author | Ctibor <ctibor@brancik.cz> | 2017-05-05 14:41:56 +0200 |
---|---|---|
committer | Ctibor <ctibor@brancik.cz> | 2017-05-05 14:41:56 +0200 |
commit | 9bab6b447bf583a3e59829fee736e4ee3375b9f6 (patch) | |
tree | 6da6ecbe65489260da15e5dad4ef8f8c1528ba55 /app-emulation/wine-starcraft/files/pr66838.c | |
parent | 4daa5e2ef492b6fce9dfa55b56ef7b84d634bf3c (diff) | |
download | brancik-overlay-9bab6b447bf583a3e59829fee736e4ee3375b9f6.tar.gz brancik-overlay-9bab6b447bf583a3e59829fee736e4ee3375b9f6.tar.bz2 |
Add app-emulation/wine-starcraft
Diffstat (limited to 'app-emulation/wine-starcraft/files/pr66838.c')
-rw-r--r-- | app-emulation/wine-starcraft/files/pr66838.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app-emulation/wine-starcraft/files/pr66838.c b/app-emulation/wine-starcraft/files/pr66838.c new file mode 100644 index 0000000..cd61685 --- /dev/null +++ b/app-emulation/wine-starcraft/files/pr66838.c @@ -0,0 +1,36 @@ +/* From gcc svn, /branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c */ +/* Copyrighted and distributed under the same terms as gcc */ + +void abort (void); + +char global; + +__attribute__((sysv_abi, noinline, noclone)) +void sysv_abi_func(char const *desc, void *local) +{ + register int esi asm ("esi"); + register int edi asm ("edi"); + + if (local != &global) + abort (); + + /* Clobber some of the extra SYSV ABI registers. */ + asm volatile ("movl\t%2, %0\n\tmovl\t%2, %1" + : "=r" (esi), "=r" (edi) + : "i" (0xdeadbeef)); +} + +__attribute__((ms_abi, noinline, noclone)) +void ms_abi_func () +{ + sysv_abi_func ("1st call", &global); + sysv_abi_func ("2nd call", &global); + sysv_abi_func ("3rd call", &global); +} + +int +main(void) +{ + ms_abi_func(); + return 0; +} |