From c5dd32921b3f1772307fad85b9846715c3b3fe61 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Fri, 19 May 2006 20:18:17 +0000 Subject: [PATCH] --- yaml --- r: 31139 b: refs/heads/master c: 1b6d1b5e073ad9313ad64da49dff649f5c06e546 h: refs/heads/master i: 31137: 7c6e4644d72ba688cadf361411a2ca5bc8be3026 31135: 26d7fb04cb632a8e66f29c0fd4350e4994c4c696 v: v3 --- [refs] | 2 +- trunk/include/asm-parisc/processor.h | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index d244058530ac..5b9ddd9a3ab1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7514b7a500411faa1c2ff1d5dc3198b855f5cdcc +refs/heads/master: 1b6d1b5e073ad9313ad64da49dff649f5c06e546 diff --git a/trunk/include/asm-parisc/processor.h b/trunk/include/asm-parisc/processor.h index ca49dc91f4fc..b73626f040da 100644 --- a/trunk/include/asm-parisc/processor.h +++ b/trunk/include/asm-parisc/processor.h @@ -26,14 +26,12 @@ * Default implementation of macro that returns current * instruction pointer ("program counter"). */ - -/* We cannot use MFIA as it was added for PA2.0 - prumpf - - At one point there were no "0f/0b" type local symbols in gas for - PA-RISC. This is no longer true, but this still seems like the - nicest way to implement this. */ - -#define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; }) +#ifdef CONFIG_PA20 +#define current_ia(x) __asm__("mfia %0" : "=r"(x)) +#else /* mfia added in pa2.0 */ +#define current_ia(x) __asm__("blr 0,%0\n\tnop" : "=r"(x)) +#endif +#define current_text_addr() ({ void *pc; current_ia(pc); pc; }) #define TASK_SIZE (current->thread.task_size) #define TASK_UNMAPPED_BASE (current->thread.map_base)