[BACK]Return to profile.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / include

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/include/profile.h between version 1.36 and 1.37

version 1.36, 2017/06/04 16:35:59 version 1.37, 2017/06/08 18:25:14
Line 54 
Line 54 
 #define MCOUNT \  #define MCOUNT \
 MCOUNT_COMPAT                                                           \  MCOUNT_COMPAT                                                           \
 extern void mcount(void) __asm(MCOUNT_ENTRY)                            \  extern void mcount(void) __asm(MCOUNT_ENTRY)                            \
         __attribute__((__no_instrument_function__))                     \          __attribute__((__no_instrument_function__));                    \
         __attribute__((__optimize__("-fno-omit-frame-pointer")));       \  
 void                                                                    \  void                                                                    \
 mcount(void)                                                            \  mcount(void)                                                            \
 {                                                                       \  {                                                                       \
Line 72  mcount(void)        \
Line 71  mcount(void)        \
          *                                                              \           *                                                              \
          * selfpc = pc pushed by mcount call                            \           * selfpc = pc pushed by mcount call                            \
          */                                                             \           */                                                             \
         __asm volatile("movl 4(%%ebp),%0" : "=r" (selfpc));             \          selfpc = (int)__builtin_return_address(0);                      \
         /*                                                              \          /*                                                              \
          * frompcindex = pc pushed by call into self.                   \           * frompcindex = stack frame of caller, assuming frame pointer  \
          */                                                             \           */                                                             \
         __asm volatile("movl (%%ebp),%0" : "=r" (frompcindex));         \          frompcindex = ((int *)__builtin_frame_address(1))[1];           \
         frompcindex = ((int *)frompcindex)[1];                          \  
         _mcount((u_long)frompcindex, (u_long)selfpc);                   \          _mcount((u_long)frompcindex, (u_long)selfpc);                   \
                                                                         \                                                                          \
         __asm volatile("movl %0,%%edx" : : "g" (edx));                  \          __asm volatile("movl %0,%%edx" : : "g" (edx));                  \

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

CVSweb <webmaster@jp.NetBSD.org>