Lines Matching refs:a2
136 s32i a1, a2, PT_AREG1
137 s32i a0, a2, PT_AREG2
138 s32i a3, a2, PT_AREG3
139 mov a1, a2
146 movi a2, 0
147 wsr a2, depc # terminate user stack trace with 0
149 xsr a2, icountlevel
151 s32i a2, a1, PT_ICOUNTLEVEL
154 rur a2, threadptr
155 s32i a2, a1, PT_THREADPTR
162 rsr a2, windowbase
164 ssr a2
165 s32i a2, a1, PT_WINDOWBASE
167 slli a2, a3, 32-WSBITS
168 src a2, a3, a2
169 srli a2, a2, 32-WSBITS
170 s32i a2, a1, PT_WMASK # needed for restoring registers
172 movi a2, 0
174 s32i a2, a1, PT_WINDOWBASE
181 UABI_W _bbsi.l a2, 1, 1f
186 UABI_W _bbsi.l a2, 2, 1f
191 UABI_W _bbsi.l a2, 3, 1f
198 _bnei a2, 1, 1f # only one valid frame?
212 1: addi a3, a2, -1 # eliminate '1' in bit 0: yyyyxxww0
214 and a3, a3, a2 # max. only one bit is set
226 extui a2, a2, 0, 4 # mask for the first 16 registers
227 or a2, a3, a2
228 s32i a2, a1, PT_WMASK # needed when we restore the reg-file
235 s32i a2, a5, PT_AREG_END - 8
243 rsr a2, sar # original WINDOWBASE
245 ssl a2
248 wsr a2, windowbase # and WINDOWSTART
291 rsr a0, depc # get a2
292 s32i a1, a2, PT_AREG1
293 s32i a0, a2, PT_AREG2
294 s32i a3, a2, PT_AREG3
295 mov a1, a2
302 movi a2, 0
304 xsr a2, icountlevel
306 s32i a2, a1, PT_ICOUNTLEVEL
312 rsr a2, windowbase # don't need to save these, we only
516 movi a2, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL
517 bnone a4, a2, 5f
527 rsil a2, 0
537 rsil a2, 0
547 l32i a4, a2, TI_PRE_COUNT
580 load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT
585 l32i a2, a1, PT_SCOMPARE1
586 wsr a2, scompare1
599 l32i a2, a1, PT_WINDOWBASE
603 ssr a2 # preserve user's WB in the SAR
607 l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9)
618 mov a2, a6
623 addi a2, a6, -16 # decrementing Y in WMASK
628 _bgeui a2, 16, 2b
653 movi a2, 1
694 l32i a2, a1, PT_WMASK
695 _beqi a2, 1, common_exception_exit # Spilled before exception,jump
723 movi a2, 1
730 _bbsi.l a2, 1, 1f
735 _bbsi.l a2, 2, 1f
740 _bbsi.l a2, 3, 1f
748 1: l32i a2, a1, PT_PC
750 wsr a2, epc1
755 l32i a2, a1, PT_LBEG
757 wsr a2, lbeg
758 l32i a2, a1, PT_LCOUNT
760 wsr a2, lcount
765 l32i a2, a1, PT_ICOUNTLEVEL
767 wsr a2, icountlevel
774 l32i a2, a1, PT_AREG2
807 wsr a2, depc # save a2 temporarily
808 rsr a2, SREG_EPC + XCHAL_DEBUGLEVEL
809 wsr a2, epc1
811 movi a2, EXCCAUSE_MAPPED_DEBUG
812 wsr a2, exccause
816 movi a2, 1 << PS_EXCM_BIT
817 or a2, a0, a2
818 wsr a2, ps
822 bbsi.l a2, PS_UM_BIT, 2f # jump if user mode
824 addi a2, a1, -16-PT_SIZE # assume kernel stack
827 s32i a1, a2, PT_AREG1
828 s32i a0, a2, PT_AREG0
830 s32i a0, a2, PT_DEPC # mark it as a regular exception
833 s32i a3, a2, PT_AREG3
834 s32i a0, a2, PT_AREG2
835 mov a1, a2
843 GET_THREAD_INFO(a2, a1)
844 l32i a3, a2, TI_PRE_COUNT
846 s32i a3, a2, TI_PRE_COUNT
849 rsr a2, ps
850 bbsi.l a2, PS_UM_BIT, _user_exception
853 2: rsr a2, excsave1
854 l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer
1016 rsr a2, ps
1017 extui a3, a2, PS_OWB_SHIFT, PS_OWB_WIDTH
1024 xor a2, a2, a3
1025 wsr a2, ps
1060 s32i a3, a2, PT_AREG3
1064 l32i a3, a2, PT_AREG3
1065 l32i a0, a2, PT_AREG0
1066 rsr a2, depc
1101 l32i a0, a2, PT_DEPC
1116 l32i a0, a2, PT_AREG0 # restore a0
1117 xsr a2, depc # restore a2, depc
1155 s32i a7, a2, PT_AREG7 # we need an additional register
1157 access_ok a3, a7, a0, a2, .Leac # a0: scratch reg, a2: sp
1169 l32i a7, a2, PT_AREG7 # restore a7
1170 l32i a0, a2, PT_AREG0 # restore a0
1171 movi a2, 1 # and return 1
1174 1: l32i a7, a2, PT_AREG7 # restore a7
1175 l32i a0, a2, PT_AREG0 # restore a0
1176 movi a2, 0 # return 0 (note that we cannot set
1188 mov a0, a2
1189 mov a2, a7
1194 .Leac: l32i a7, a2, PT_AREG7 # restore a7
1195 l32i a0, a2, PT_AREG0 # restore a0
1196 movi a2, -EFAULT
1199 .Lill: l32i a7, a2, PT_AREG7 # restore a7
1200 l32i a0, a2, PT_AREG0 # restore a0
1201 movi a2, -EINVAL
1210 l32i a0, a2, PT_AREG0 # restore a0
1211 movi a2, -ENOSYS
1250 s32i a3, a2, PT_AREG3
1251 s32i a0, a2, PT_SAR
1255 s32i a4, a2, PT_AREG4
1256 s32i a7, a2, PT_AREG7
1257 s32i a8, a2, PT_AREG8
1258 s32i a11, a2, PT_AREG11
1259 s32i a12, a2, PT_AREG12
1260 s32i a15, a2, PT_AREG15
1467 rsr a2, windowbase # get current windowbase (a2 is saved)
1469 ssl a2 # set shift (32 - WB)
1484 slli a2, a3, 32-WSBITS
1485 src a2, a3, a2 # a2 = xxwww1yyxxxwww1yy......
1486 wsr a2, windowstart # set corrected windowstart
1489 rsr a2, excsave1
1490 l32i a2, a2, EXC_TABLE_DOUBLE_SAVE # restore a2
1491 xsr a2, excsave1
1492 s32i a3, a2, EXC_TABLE_DOUBLE_SAVE # save a3
1493 l32i a3, a2, EXC_TABLE_PARAM # original WB (in user task)
1494 xsr a2, excsave1
1519 addi a2, a2, -PT_USER_SIZE
1520 s32i a0, a2, PT_AREG0
1525 s32i a3, a2, PT_DEPC # setup depc
1542 wsr a2, depc # exception address
1546 rsr a2, excsave1
1547 s32i a3, a2, EXC_TABLE_DOUBLE_SAVE
1549 s32i a3, a2, EXC_TABLE_FIXUP
1551 s32i a3, a2, EXC_TABLE_PARAM
1552 l32i a2, a2, EXC_TABLE_KSTK
1572 l32i a0, a2, PT_AREG0 # restore a0
1573 movi a2, -ENOSYS
1617 s32i a1, a2, PT_AREG1
1618 s32i a3, a2, PT_AREG3
1636 GET_CURRENT(a1,a2)
1697 l32i a0, a2, PT_AREG0
1698 l32i a1, a2, PT_AREG1
1699 l32i a3, a2, PT_AREG3
1700 l32i a2, a2, PT_DEPC
1702 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
1706 rsr a2, depc
1711 1: xsr a2, depc
1736 l32i a0, a2, PT_DEPC
1795 s32i a1, a2, PT_AREG2
1796 mov a1, a2
1798 rsr a2, ps
1799 bbsi.l a2, PS_UM_BIT, 1f
1827 s32i a1, a2, PT_AREG1
1828 s32i a3, a2, PT_AREG3
1830 GET_CURRENT(a1,a2)
1870 l32i a3, a2, PT_AREG3
1871 l32i a1, a2, PT_AREG1
1872 l32i a0, a2, PT_AREG0
1873 l32i a2, a2, PT_DEPC
1875 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
1877 rsr a2, depc
1882 1: xsr a2, depc
1891 rsr a3, depc # still holds a2
1892 s32i a3, a2, PT_AREG2
1893 mov a1, a2
1895 rsr a2, ps
1896 bbsi.l a2, PS_UM_BIT, 1f
1923 mov abi_saved0, a2
2050 l32i a4, a2, TASK_THREAD_INFO
2056 addi a10, a2, TASK_THREAD
2060 s32i a0, a2, THREAD_RA # save return address
2061 s32i a1, a2, THREAD_SP # save stack pointer