summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/entry.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-09-28 22:25:29 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-09-28 22:25:29 +0000
commit0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch)
tree5085c389f09da78182b899d19fe1068b619a69dd /arch/mips64/kernel/entry.S
parent273767781288c35c9d679e908672b9996cda4c34 (diff)
Merge with 2.3.10.
Diffstat (limited to 'arch/mips64/kernel/entry.S')
-rw-r--r--arch/mips64/kernel/entry.S97
1 files changed, 50 insertions, 47 deletions
diff --git a/arch/mips64/kernel/entry.S b/arch/mips64/kernel/entry.S
index dc8a6d4bc..297c41840 100644
--- a/arch/mips64/kernel/entry.S
+++ b/arch/mips64/kernel/entry.S
@@ -18,9 +18,9 @@
#include <asm/mipsregs.h>
#include <asm/page.h>
#include <asm/pgtable.h>
+#include <asm/regdef.h>
#include <asm/stackframe.h>
#include <asm/processor.h>
-#include <asm/regdef.h>
#include <asm/fpregdef.h>
#include <asm/unistd.h>
@@ -102,7 +102,7 @@ LEAF(spurious_interrupt)
cfc1 a1, fcr31
li a2, ~(0x3f << 13)
and a2, a1
- ctc a2, fcr31
+ ctc1 a2, fcr31
STI
.endm
@@ -112,48 +112,51 @@ LEAF(spurious_interrupt)
KMODE
.endm
-#define __BUILD_silent(exception)
-
-#define fmt "Got %s at %08lx.\n"
-
-#define __BUILD_verbose(exception) \
- la a1,8f; \
- TEXT (#exception); \
- ld a2, PT_EPC(sp); \
- PRINT(fmt)
-#define __BUILD_count(exception) \
- .set reorder; \
- lw t0,exception_count_##exception; \
- addiu t0, 1; \
- sw t0,exception_count_##exception; \
- .set noreorder; \
- .data; \
-EXPORT(exception_count_##exception); \
- .word 0; \
- .previous;
-#define BUILD_HANDLER(exception,handler,clear,verbose) \
- .align 5; \
- NESTED(handle_##exception, PT_SIZE, sp); \
- .set noat; \
- SAVE_ALL; \
- __BUILD_clear_##clear exception; \
- .set at; \
- __BUILD_##verbose(exception); \
- jal do_##handler; \
- move a0,sp; \
- j ret_from_sys_call; \
- nop; \
- END(handle_##exception)
-
- BUILD_HANDLER(adel,ade,ade,silent) /* #4 */
- BUILD_HANDLER(ades,ade,ade,silent) /* #5 */
- BUILD_HANDLER(ibe,ibe,cli,verbose) /* #6 */
- BUILD_HANDLER(dbe,dbe,cli,silent) /* #7 */
- BUILD_HANDLER(bp,bp,sti,silent) /* #9 */
- BUILD_HANDLER(ri,ri,sti,silent) /* #10 */
- BUILD_HANDLER(cpu,cpu,sti,silent) /* #11 */
- BUILD_HANDLER(ov,ov,sti,silent) /* #12 */
- BUILD_HANDLER(tr,tr,sti,silent) /* #13 */
- BUILD_HANDLER(fpe,fpe,fpe,silent) /* #15 */
- BUILD_HANDLER(watch,watch,sti,verbose) /* #23 */
- BUILD_HANDLER(reserved,reserved,sti,verbose) /* others */
+ .macro __BUILD_silent exception
+ .endm
+
+ /* Gas tries to parse the PRINT argument as a string containing
+ string escapes and emits bogus warnings if it believes to
+ recognize an unknown escape code. So make the arguments
+ start with an n and gas will believe \n is ok ... */
+ .macro __BUILD_verbose nexception
+ ld a1, PT_EPC(sp)
+ PRINT("Got \nexception at %016lx")
+ .endm
+
+ .macro __BUILD_count exception
+ .set reorder
+ ld t0,exception_count_\exception
+ daddiu t0, 1
+ sd t0,exception_count_\exception
+ .set noreorder
+ .comm exception_count\exception, 8, 8
+ .endm
+
+ .macro BUILD_HANDLER exception handler clear verbose
+ .align 5
+ NESTED(handle_\exception, PT_SIZE, sp)
+ .set noat
+ SAVE_ALL
+ __BUILD_clear_\clear
+ .set at
+ __BUILD_\verbose \exception
+ jal do_\handler
+ move a0,sp
+ j ret_from_sys_call
+ nop
+ END(handle_\exception)
+ .endm
+
+ BUILD_HANDLER adel ade ade silent /* #4 */
+ BUILD_HANDLER ades ade ade silent /* #5 */
+ BUILD_HANDLER ibe ibe cli verbose /* #6 */
+ BUILD_HANDLER dbe dbe cli silent /* #7 */
+ BUILD_HANDLER bp bp sti silent /* #9 */
+ BUILD_HANDLER ri ri sti silent /* #10 */
+ BUILD_HANDLER cpu cpu sti silent /* #11 */
+ BUILD_HANDLER ov ov sti silent /* #12 */
+ BUILD_HANDLER tr tr sti silent /* #13 */
+ BUILD_HANDLER fpe fpe fpe silent /* #15 */
+ BUILD_HANDLER watch watch sti verbose /* #23 */
+ BUILD_HANDLER reserved reserved sti verbose /* others */