Date: Wed, 9 Apr 2003 12:51:02 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 28665 for review Message-ID: <200304091951.h39Jp20S043469@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28665 Change 28665 by peter@peter_daintree on 2003/04/09 12:50:05 Update. this might be sufficient for now. Affected files ... .. //depot/projects/hammer/sys/x86_64/include/profile.h#2 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/include/profile.h#2 (text+ko) ==== @@ -65,14 +65,14 @@ #define MCOUNT_DECL(s) u_long s; #ifdef SMP extern int mcount_lock; -#define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); \ +#define MCOUNT_ENTER(s) { s = read_rflags(); disable_intr(); \ while (!atomic_cmpset_acq_int(&mcount_lock, 0, 1)) \ /* nothing */ ; } #define MCOUNT_EXIT(s) { atomic_store_rel_int(&mcount_lock, 0); \ - write_eflags(s); } + write_rflags(s); } #else -#define MCOUNT_ENTER(s) { s = read_eflags(); disable_intr(); } -#define MCOUNT_EXIT(s) (write_eflags(s)) +#define MCOUNT_ENTER(s) { s = read_rflags(); disable_intr(); } +#define MCOUNT_EXIT(s) (write_rflags(s)) #endif #endif /* GUPROF */ @@ -94,14 +94,14 @@ * \ * selfpc = pc pushed by call to mcount \ */ \ - asm("movl 4(%%ebp),%0" : "=r" (selfpc)); \ + asm("movq 8(%%rbp),%0" : "=r" (selfpc)); \ /* \ * frompc = pc pushed by call to mcount's caller. \ * 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.\ */ \ - asm("movl (%%ebp),%0" : "=r" (frompc)); \ + asm("movq (%%rbp),%0" : "=r" (frompc)); \ frompc = ((uintfptr_t *)frompc)[1]; \ _mcount(frompc, selfpc); \ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304091951.h39Jp20S043469>