Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/include Fix __PIC__ profiled binaries



details:   https://anonhg.NetBSD.org/src/rev/c8e537a2915c
branches:  trunk
changeset: 824303:c8e537a2915c
user:      martin <martin%NetBSD.org@localhost>
date:      Wed May 31 11:09:22 2017 +0000

description:
Fix __PIC__ profiled binaries

diffstat:

 sys/arch/sparc/include/profile.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 33aeff033ee3 -r c8e537a2915c sys/arch/sparc/include/profile.h
--- a/sys/arch/sparc/include/profile.h  Wed May 31 11:08:35 2017 +0000
+++ b/sys/arch/sparc/include/profile.h  Wed May 31 11:09:22 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: profile.h,v 1.16 2013/09/12 15:36:17 joerg Exp $ */
+/*     $NetBSD: profile.h,v 1.17 2017/05/31 11:09:22 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,7 +57,6 @@
        __asm("add %o7, 8, %o1");\
        __asm("1: rd %pc, %o2");\
        __asm("add %o2," _MCOUNT_SYM "-1b, %o2");\
-       __asm("ld [%o2], %o2");\
        __asm("jmpl %o2, %g0");\
        __asm("add %i7, 8, %o0");
 #else
@@ -65,9 +64,10 @@
        __asm(".global " _MCOUNT_ENTRY);\
        __asm(_MCOUNT_ENTRY ":");\
        __asm("add %o7, 8, %o1");\
+       __asm("mov %o7, %o3");\
        __asm("1: call 2f; nop; 2:");\
        __asm("add %o7," _MCOUNT_SYM "-1b, %o2");\
-       __asm("ld [%o2], %o2");\
+       __asm("mov %o3, %o7");\
        __asm("jmpl %o2, %g0");\
        __asm("add %i7, 8, %o0");
 #endif



Home | Main Index | Thread Index | Old Index