Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include ARM has deprecated using both PC and LR...



details:   https://anonhg.NetBSD.org/src/rev/0ab853fa5f3d
branches:  trunk
changeset: 335530:0ab853fa5f3d
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Jan 11 20:52:57 2015 +0000

description:
ARM has deprecated using both PC and LR in the register list of pop with
ARMv6T2, so split the instructions up.

diffstat:

 sys/arch/arm/include/profile.h |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 12a054e1997f -r 0ab853fa5f3d sys/arch/arm/include/profile.h
--- a/sys/arch/arm/include/profile.h    Sun Jan 11 19:54:23 2015 +0000
+++ b/sys/arch/arm/include/profile.h    Sun Jan 11 20:52:57 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: profile.h,v 1.16 2014/11/28 15:37:02 skrll Exp $       */
+/*     $NetBSD: profile.h,v 1.17 2015/01/11 20:52:57 joerg Exp $       */
 
 /*
  * Copyright (c) 2001 Ben Harris
@@ -76,7 +76,8 @@
        /*                                                              \
         * Restore registers that were trashed during mcount            \
         */                                                             \
-       __asm("pop      {r0-r3, lr, pc}");                              \
+       __asm("pop      {r0-r3, lr}");                                  \
+       __asm("pop      {pc}");                                         \
        __asm(".size    " MCOUNT_ASM_NAME ", .-" MCOUNT_ASM_NAME);
 #elif defined(__ARM_DWARF_EH__)
 #define        MCOUNT                                                          \
@@ -116,7 +117,8 @@
        /*                                                              \
         * Restore registers that were trashed during mcount            \
         */                                                             \
-       __asm("pop      {r0-r3, lr, pc}");                              \
+       __asm("pop      {r0-r3, lr}");                                  \
+       __asm("pop      {pc}");                                         \
        __asm(".cfi_endproc");                                          \
        __asm(".size    " MCOUNT_ASM_NAME ", .-" MCOUNT_ASM_NAME);
 #else
@@ -159,7 +161,8 @@
        /*                                                              \
         * Restore registers that were trashed during mcount            \
         */                                                             \
-       __asm("pop      {r0-r3, lr, pc}");                              \
+       __asm("pop      {r0-r3, lr}");                                  \
+       __asm("pop      {pc}");                                         \
        __asm(".cfi_endproc");                                          \
        __asm(".fnend");                                                \
        __asm(".size    " MCOUNT_ASM_NAME ", .-" MCOUNT_ASM_NAME);



Home | Main Index | Thread Index | Old Index