diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-11-30 20:26:03 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-11-30 20:26:03 +0000 |
commit | 9053583f4f385c0429c7a0385e1b5867cc8387bd (patch) | |
tree | ca14817d468baf09c2ebfd7c502f813fb231b508 /sys | |
parent | 8f65edd884cc99eb80e78a5a636fa0be38384c6a (diff) |
prevent reorder of __asm w/ __volatile.
from netbsd:
Declare some asm statement with output as volatile. Without this,
gcc with -march=pentiumpro produce bad code.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/include/profile.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/i386/include/profile.h b/sys/arch/i386/include/profile.h index d572e473ec4..d3850e7748d 100644 --- a/sys/arch/i386/include/profile.h +++ b/sys/arch/i386/include/profile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: profile.h,v 1.5 2001/06/27 04:16:37 mickey Exp $ */ +/* $OpenBSD: profile.h,v 1.6 2001/11/30 20:26:02 mickey Exp $ */ /* $NetBSD: profile.h,v 1.6 1995/03/28 18:17:08 jtc Exp $ */ /* @@ -50,11 +50,12 @@ mcount() \ * \ * selfpc = pc pushed by mcount call \ */ \ - __asm("movl 4(%%ebp),%0" : "=r" (selfpc)); \ + __asm __volatile ("movl 4(%%ebp),%0" : "=r" (selfpc)); \ /* \ * frompcindex = pc pushed by call into self. \ */ \ - __asm("movl (%%ebp),%0;movl 4(%0),%0" : "+r" (frompcindex)); \ + __asm __volatile ("movl (%%ebp),%0;movl 4(%0),%0" : \ + "+r" (frompcindex)); \ _mcount(frompcindex, selfpc); \ } |