Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants).
This commit is contained in:
parent
1696756396
commit
212b37ff18
|
@ -23,7 +23,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: prof_machdep.c,v 1.8 1997/12/26 20:42:08 phk Exp $
|
||||
* $Id: prof_machdep.c,v 1.9 1998/04/15 17:45:43 bde Exp $
|
||||
*/
|
||||
|
||||
#ifdef GUPROF
|
||||
|
@ -66,53 +66,54 @@ static struct gmonparam saved_gmp;
|
|||
#endif /* GUPROF */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
GM_STATE = 0
|
||||
GMON_PROF_OFF = 3
|
||||
|
||||
.text
|
||||
.align 4,0x90
|
||||
.globl __mcount
|
||||
__mcount:
|
||||
#
|
||||
# Check that we are profiling. Do it early for speed.
|
||||
#
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE
|
||||
je Lmcount_exit
|
||||
#
|
||||
# __mcount is the same as mcount except the caller hasn't changed
|
||||
# the stack except to call here, so the caller's raddr is above
|
||||
# our raddr.
|
||||
#
|
||||
movl 4(%esp),%edx
|
||||
jmp Lgot_frompc
|
||||
|
||||
.align 4,0x90
|
||||
.globl mcount
|
||||
mcount:
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE
|
||||
je Lmcount_exit
|
||||
#
|
||||
# The caller's stack frame has already been built, so %ebp is
|
||||
# the caller's frame pointer. The caller's raddr is in the
|
||||
# caller's frame following the caller's caller's frame pointer.
|
||||
#
|
||||
movl 4(%ebp),%edx
|
||||
Lgot_frompc:
|
||||
#
|
||||
# Our raddr is the caller's pc.
|
||||
#
|
||||
movl (%esp),%eax
|
||||
|
||||
pushfl
|
||||
pushl %eax
|
||||
pushl %edx
|
||||
cli
|
||||
call _mcount
|
||||
addl $8,%esp
|
||||
popfl
|
||||
Lmcount_exit:
|
||||
ret
|
||||
__asm(" \n\
|
||||
GM_STATE = 0 \n\
|
||||
GMON_PROF_OFF = 3 \n\
|
||||
\n\
|
||||
.text \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl __mcount \n\
|
||||
__mcount: \n\
|
||||
# \n\
|
||||
# Check that we are profiling. Do it early for speed. \n\
|
||||
# \n\
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE \n\
|
||||
je Lmcount_exit \n\
|
||||
# \n\
|
||||
# __mcount is the same as mcount except the caller \n\
|
||||
# hasn't changed the stack except to call here, so the \n\
|
||||
# caller's raddr is above our raddr. \n\
|
||||
# \n\
|
||||
movl 4(%esp),%edx \n\
|
||||
jmp Lgot_frompc \n\
|
||||
\n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mcount \n\
|
||||
mcount: \n\
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE \n\
|
||||
je Lmcount_exit \n\
|
||||
# \n\
|
||||
# The caller's stack frame has already been built, so \n\
|
||||
# %ebp is the caller's frame pointer. The caller's \n\
|
||||
# raddr is in the caller's frame following the caller's \n\
|
||||
# caller's frame pointer. \n\
|
||||
# \n\
|
||||
movl 4(%ebp),%edx \n\
|
||||
Lgot_frompc: \n\
|
||||
# \n\
|
||||
# Our raddr is the caller's pc. \n\
|
||||
# \n\
|
||||
movl (%esp),%eax \n\
|
||||
\n\
|
||||
pushfl \n\
|
||||
pushl %eax \n\
|
||||
pushl %edx \n\
|
||||
cli \n\
|
||||
call _mcount \n\
|
||||
addl $8,%esp \n\
|
||||
popfl \n\
|
||||
Lmcount_exit: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
@ -126,36 +127,36 @@ Lmcount_exit:
|
|||
* can't just be put in machdep.c because it has to be compiled without -pg.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
.text
|
||||
#
|
||||
# Dummy label to be seen when gprof -u hides mexitcount.
|
||||
#
|
||||
.align 4,0x90
|
||||
.globl __mexitcount
|
||||
__mexitcount:
|
||||
nop
|
||||
|
||||
GMON_PROF_HIRES = 4
|
||||
|
||||
.align 4,0x90
|
||||
.globl mexitcount
|
||||
mexitcount:
|
||||
cmpl $GMON_PROF_HIRES,__gmonparam+GM_STATE
|
||||
jne Lmexitcount_exit
|
||||
pushl %edx
|
||||
pushl %eax
|
||||
movl 8(%esp),%eax
|
||||
pushfl
|
||||
pushl %eax
|
||||
cli
|
||||
call _mexitcount
|
||||
addl $4,%esp
|
||||
popfl
|
||||
popl %eax
|
||||
popl %edx
|
||||
Lmexitcount_exit:
|
||||
ret
|
||||
__asm(" \n\
|
||||
.text \n\
|
||||
# \n\
|
||||
# Dummy label to be seen when gprof -u hides mexitcount. \n\
|
||||
# \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl __mexitcount \n\
|
||||
__mexitcount: \n\
|
||||
nop \n\
|
||||
\n\
|
||||
GMON_PROF_HIRES = 4 \n\
|
||||
\n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mexitcount \n\
|
||||
mexitcount: \n\
|
||||
cmpl $GMON_PROF_HIRES,__gmonparam+GM_STATE \n\
|
||||
jne Lmexitcount_exit \n\
|
||||
pushl %edx \n\
|
||||
pushl %eax \n\
|
||||
movl 8(%esp),%eax \n\
|
||||
pushfl \n\
|
||||
pushl %eax \n\
|
||||
cli \n\
|
||||
call _mexitcount \n\
|
||||
addl $4,%esp \n\
|
||||
popfl \n\
|
||||
popl %eax \n\
|
||||
popl %edx \n\
|
||||
Lmexitcount_exit: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
@ -333,12 +334,12 @@ stopguprof(gp)
|
|||
|
||||
#else /* !GUPROF */
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
.text
|
||||
.align 4,0x90
|
||||
.globl mexitcount
|
||||
mexitcount:
|
||||
ret
|
||||
__asm(" \n\
|
||||
.text \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mexitcount \n\
|
||||
mexitcount: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: prof_machdep.c,v 1.8 1997/12/26 20:42:08 phk Exp $
|
||||
* $Id: prof_machdep.c,v 1.9 1998/04/15 17:45:43 bde Exp $
|
||||
*/
|
||||
|
||||
#ifdef GUPROF
|
||||
|
@ -66,53 +66,54 @@ static struct gmonparam saved_gmp;
|
|||
#endif /* GUPROF */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
GM_STATE = 0
|
||||
GMON_PROF_OFF = 3
|
||||
|
||||
.text
|
||||
.align 4,0x90
|
||||
.globl __mcount
|
||||
__mcount:
|
||||
#
|
||||
# Check that we are profiling. Do it early for speed.
|
||||
#
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE
|
||||
je Lmcount_exit
|
||||
#
|
||||
# __mcount is the same as mcount except the caller hasn't changed
|
||||
# the stack except to call here, so the caller's raddr is above
|
||||
# our raddr.
|
||||
#
|
||||
movl 4(%esp),%edx
|
||||
jmp Lgot_frompc
|
||||
|
||||
.align 4,0x90
|
||||
.globl mcount
|
||||
mcount:
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE
|
||||
je Lmcount_exit
|
||||
#
|
||||
# The caller's stack frame has already been built, so %ebp is
|
||||
# the caller's frame pointer. The caller's raddr is in the
|
||||
# caller's frame following the caller's caller's frame pointer.
|
||||
#
|
||||
movl 4(%ebp),%edx
|
||||
Lgot_frompc:
|
||||
#
|
||||
# Our raddr is the caller's pc.
|
||||
#
|
||||
movl (%esp),%eax
|
||||
|
||||
pushfl
|
||||
pushl %eax
|
||||
pushl %edx
|
||||
cli
|
||||
call _mcount
|
||||
addl $8,%esp
|
||||
popfl
|
||||
Lmcount_exit:
|
||||
ret
|
||||
__asm(" \n\
|
||||
GM_STATE = 0 \n\
|
||||
GMON_PROF_OFF = 3 \n\
|
||||
\n\
|
||||
.text \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl __mcount \n\
|
||||
__mcount: \n\
|
||||
# \n\
|
||||
# Check that we are profiling. Do it early for speed. \n\
|
||||
# \n\
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE \n\
|
||||
je Lmcount_exit \n\
|
||||
# \n\
|
||||
# __mcount is the same as mcount except the caller \n\
|
||||
# hasn't changed the stack except to call here, so the \n\
|
||||
# caller's raddr is above our raddr. \n\
|
||||
# \n\
|
||||
movl 4(%esp),%edx \n\
|
||||
jmp Lgot_frompc \n\
|
||||
\n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mcount \n\
|
||||
mcount: \n\
|
||||
cmpl $GMON_PROF_OFF,__gmonparam+GM_STATE \n\
|
||||
je Lmcount_exit \n\
|
||||
# \n\
|
||||
# The caller's stack frame has already been built, so \n\
|
||||
# %ebp is the caller's frame pointer. The caller's \n\
|
||||
# raddr is in the caller's frame following the caller's \n\
|
||||
# caller's frame pointer. \n\
|
||||
# \n\
|
||||
movl 4(%ebp),%edx \n\
|
||||
Lgot_frompc: \n\
|
||||
# \n\
|
||||
# Our raddr is the caller's pc. \n\
|
||||
# \n\
|
||||
movl (%esp),%eax \n\
|
||||
\n\
|
||||
pushfl \n\
|
||||
pushl %eax \n\
|
||||
pushl %edx \n\
|
||||
cli \n\
|
||||
call _mcount \n\
|
||||
addl $8,%esp \n\
|
||||
popfl \n\
|
||||
Lmcount_exit: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
@ -126,36 +127,36 @@ Lmcount_exit:
|
|||
* can't just be put in machdep.c because it has to be compiled without -pg.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
.text
|
||||
#
|
||||
# Dummy label to be seen when gprof -u hides mexitcount.
|
||||
#
|
||||
.align 4,0x90
|
||||
.globl __mexitcount
|
||||
__mexitcount:
|
||||
nop
|
||||
|
||||
GMON_PROF_HIRES = 4
|
||||
|
||||
.align 4,0x90
|
||||
.globl mexitcount
|
||||
mexitcount:
|
||||
cmpl $GMON_PROF_HIRES,__gmonparam+GM_STATE
|
||||
jne Lmexitcount_exit
|
||||
pushl %edx
|
||||
pushl %eax
|
||||
movl 8(%esp),%eax
|
||||
pushfl
|
||||
pushl %eax
|
||||
cli
|
||||
call _mexitcount
|
||||
addl $4,%esp
|
||||
popfl
|
||||
popl %eax
|
||||
popl %edx
|
||||
Lmexitcount_exit:
|
||||
ret
|
||||
__asm(" \n\
|
||||
.text \n\
|
||||
# \n\
|
||||
# Dummy label to be seen when gprof -u hides mexitcount. \n\
|
||||
# \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl __mexitcount \n\
|
||||
__mexitcount: \n\
|
||||
nop \n\
|
||||
\n\
|
||||
GMON_PROF_HIRES = 4 \n\
|
||||
\n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mexitcount \n\
|
||||
mexitcount: \n\
|
||||
cmpl $GMON_PROF_HIRES,__gmonparam+GM_STATE \n\
|
||||
jne Lmexitcount_exit \n\
|
||||
pushl %edx \n\
|
||||
pushl %eax \n\
|
||||
movl 8(%esp),%eax \n\
|
||||
pushfl \n\
|
||||
pushl %eax \n\
|
||||
cli \n\
|
||||
call _mexitcount \n\
|
||||
addl $4,%esp \n\
|
||||
popfl \n\
|
||||
popl %eax \n\
|
||||
popl %edx \n\
|
||||
Lmexitcount_exit: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
@ -333,12 +334,12 @@ stopguprof(gp)
|
|||
|
||||
#else /* !GUPROF */
|
||||
#ifdef __GNUC__
|
||||
__asm("
|
||||
.text
|
||||
.align 4,0x90
|
||||
.globl mexitcount
|
||||
mexitcount:
|
||||
ret
|
||||
__asm(" \n\
|
||||
.text \n\
|
||||
.align 4,0x90 \n\
|
||||
.globl mexitcount \n\
|
||||
mexitcount: \n\
|
||||
ret \n\
|
||||
");
|
||||
#else /* !__GNUC__ */
|
||||
#error
|
||||
|
|
Loading…
Reference in New Issue