From 5e3ab761da1f32e0b1ec303a431be7d1be8a0250 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Oct 2002 17:26:14 +0000 Subject: (profil_counter): Add hack to prevent the compiler from clobbering the signal context. --- sysdeps/unix/sysv/linux/sh/profil-counter.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/sh') diff --git a/sysdeps/unix/sysv/linux/sh/profil-counter.h b/sysdeps/unix/sysv/linux/sh/profil-counter.h index fe1df15add..ae1b97828c 100644 --- a/sysdeps/unix/sysv/linux/sh/profil-counter.h +++ b/sysdeps/unix/sysv/linux/sh/profil-counter.h @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Linux/SH version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,4 +25,9 @@ profil_counter (int signo, int _a2, int _a3, int _a4, struct sigcontext sc) void *pc; pc = (void *) sc.sc_pc; profil_count (pc); + + /* This is a hack to prevent the compiler from implementing the + above function call as a sibcall. The sibcall would overwrite + the signal context. */ + asm volatile (""); } -- cgit 1.4.1