summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc/processor.h')
-rw-r--r--include/asm-sparc/processor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-sparc/processor.h b/include/asm-sparc/processor.h
index f2ab4d947..2cec2f103 100644
--- a/include/asm-sparc/processor.h
+++ b/include/asm-sparc/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.70 1999/03/24 11:42:44 davem Exp $
+/* $Id: processor.h,v 1.71 1999/05/27 04:52:43 davem Exp $
* include/asm-sparc/processor.h
*
* Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
@@ -7,6 +7,12 @@
#ifndef __ASM_SPARC_PROCESSOR_H
#define __ASM_SPARC_PROCESSOR_H
+/*
+ * Sparc32 implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr() ({ void *pc; __asm__("sethi %%hi(1f), %0; or %0, %%lo(1f), %0;\n1:" : "=r" (pc)); pc; })
+
#include <linux/a.out.h>
#include <asm/psr.h>