Skip to content

Commit

Permalink
[PARISC] Use MFIA in current_text_addr on pa2.0 processors
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
  • Loading branch information
Kyle McMartin authored and Kyle McMartin committed Jun 27, 2006
1 parent 7514b7a commit 1b6d1b5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions include/asm-parisc/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b6d1b5

Please sign in to comment.