Rev 1861 | Rev 1865 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1861 | Rev 1864 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | * Macro used to lower TL when a MMU trap is caused by |
125 | * Macro used to lower TL when a MMU trap is caused by |
126 | * the userspace register window spill or fill handler. |
126 | * the userspace register window spill or fill handler. |
127 | */ |
127 | */ |
128 | .macro HANDLE_MMU_TRAPS_FROM_SPILL_OR_FILL |
128 | .macro HANDLE_MMU_TRAPS_FROM_SPILL_OR_FILL |
129 | rdpr %tl, %g1 |
129 | rdpr %tl, %g1 |
130 | dec %g1 |
130 | sub %g1, 1, %g2 |
131 | brz %g1, 0f ! if TL was 1, skip |
131 | brz %g2, 0f ! if TL was 1, skip |
132 | nop |
132 | nop |
133 | wrpr %g1, 0, %tl ! TL-- |
133 | wrpr %g2, 0, %tl ! TL-- |
134 | rdpr %tt, %g2 |
134 | rdpr %tt, %g3 |
135 | cmp %g2, TT_SPILL_1_NORMAL |
135 | cmp %g3, TT_SPILL_1_NORMAL |
136 | be 0f ! trap from spill_1_normal |
136 | be 0f ! trap from spill_1_normal? |
137 | cmp %g2, TT_FILL_1_NORMAL |
137 | cmp %g3, TT_FILL_1_NORMAL |
138 | be 0f ! trap from fill_1_normal |
138 | bne,a 0f ! trap from fill_1_normal? (negated condition) |
139 | inc %g1 |
- | |
140 | wrpr %g1, 0, %tl ! another trap, TL++ |
139 | wrpr %g1, 0, %tl ! TL++ |
141 | 0: |
140 | 0: |
142 | .endm |
141 | .endm |
143 | 142 | ||
144 | #endif /* __ASM__ */ |
143 | #endif /* __ASM__ */ |
145 | 144 |