Rev 634 | Rev 667 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 634 | Rev 666 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | 31 | ||
32 | #ifndef __ASM__ |
32 | #ifndef __ASM__ |
33 | #include <arch/types.h> |
33 | #include <arch/types.h> |
34 | #endif /* __ASM__ */ |
34 | #endif /* __ASM__ */ |
35 | 35 | ||
- | 36 | #include <arch/stack.h> |
|
- | 37 | ||
36 | #define TRAP_TABLE_ENTRY_COUNT 1024 |
38 | #define TRAP_TABLE_ENTRY_COUNT 1024 |
37 | #define TRAP_TABLE_ENTRY_SIZE 32 |
39 | #define TRAP_TABLE_ENTRY_SIZE 32 |
38 | #define TRAP_TABLE_SIZE (TRAP_TABLE_ENTRY_COUNT*TRAP_TABLE_ENTRY_SIZE) |
40 | #define TRAP_TABLE_SIZE (TRAP_TABLE_ENTRY_COUNT*TRAP_TABLE_ENTRY_SIZE) |
39 | 41 | ||
40 | #ifndef __ASM__ |
42 | #ifndef __ASM__ |
Line 46... | Line 48... | ||
46 | 48 | ||
47 | extern trap_table_entry_t trap_table[TRAP_TABLE_ENTRY_COUNT]; |
49 | extern trap_table_entry_t trap_table[TRAP_TABLE_ENTRY_COUNT]; |
48 | extern trap_table_entry_t trap_table_save[TRAP_TABLE_ENTRY_COUNT]; |
50 | extern trap_table_entry_t trap_table_save[TRAP_TABLE_ENTRY_COUNT]; |
49 | #endif /* !__ASM__ */ |
51 | #endif /* !__ASM__ */ |
50 | 52 | ||
- | 53 | #ifdef __ASM__ |
|
- | 54 | .macro SAVE_GLOBALS |
|
- | 55 | mov %g1, %l1 |
|
- | 56 | mov %g2, %l2 |
|
- | 57 | mov %g3, %l3 |
|
- | 58 | mov %g4, %l4 |
|
- | 59 | mov %g5, %l5 |
|
- | 60 | mov %g6, %l6 |
|
- | 61 | mov %g7, %l7 |
|
- | 62 | .endm |
|
- | 63 | ||
- | 64 | .macro RESTORE_GLOBALS |
|
- | 65 | mov %l1, %g1 |
|
- | 66 | mov %l2, %g2 |
|
- | 67 | mov %l3, %g3 |
|
- | 68 | mov %l4, %g4 |
|
- | 69 | mov %l5, %g5 |
|
- | 70 | mov %l6, %g6 |
|
- | 71 | mov %l7, %g7 |
|
- | 72 | .endm |
|
- | 73 | ||
- | 74 | .macro SAVING_HANDLER f |
|
- | 75 | set \f, %l0 |
|
- | 76 | b saving_handler |
|
- | 77 | nop |
|
- | 78 | .endm |
|
- | 79 | #endif /* __ASM__ */ |
|
- | 80 | ||
51 | #endif |
81 | #endif |