diff options
Diffstat (limited to 'winsup/mingw/profile/profile.h')
-rw-r--r-- | winsup/mingw/profile/profile.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/mingw/profile/profile.h b/winsup/mingw/profile/profile.h index d578657f8..6c198d742 100644 --- a/winsup/mingw/profile/profile.h +++ b/winsup/mingw/profile/profile.h @@ -46,18 +46,20 @@ void \ mcount() \ { \ - int selfpc, frompcindex; \ + u_long selfpc, frompcindex; \ /* \ * find the return address for mcount, \ * and the return address for mcount's caller. \ * \ * selfpc = pc pushed by mcount call \ */ \ - __asm("movl 4(%%ebp),%0" : "=r" (selfpc)); \ + /* __asm volatile ("movl 4(%%ebp),%0" : "=r" (selfpc)); */ \ + selfpc = (u_long) __builtin_return_address (0); \ /* \ * frompcindex = pc pushed by call into self. \ */ \ - __asm("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex)); \ + /* __asm ("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex)); */ \ + frompcindex = (u_long) __builtin_return_address (1); \ _mcount(frompcindex, selfpc); \ } |