Lines Matching full:ir
76 * @ir: Instruction
78 static inline int mipsr6_emul(struct pt_regs *regs, u32 ir) in mipsr6_emul() argument
80 switch (MIPSInst_OPCODE(ir)) { in mipsr6_emul()
82 if (MIPSInst_RT(ir)) in mipsr6_emul()
83 regs->regs[MIPSInst_RT(ir)] = in mipsr6_emul()
84 (s32)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul()
85 (s32)MIPSInst_SIMM(ir); in mipsr6_emul()
91 if (MIPSInst_RT(ir)) in mipsr6_emul()
92 regs->regs[MIPSInst_RT(ir)] = in mipsr6_emul()
93 (s64)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul()
94 (s64)MIPSInst_SIMM(ir); in mipsr6_emul()
103 switch (MIPSInst_FUNC(ir)) { in mipsr6_emul()
105 if (MIPSInst_RD(ir)) in mipsr6_emul()
106 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
107 regs->regs[MIPSInst_RS(ir)] | in mipsr6_emul()
108 regs->regs[MIPSInst_RT(ir)]; in mipsr6_emul()
111 if (MIPSInst_RS(ir)) in mipsr6_emul()
114 if (MIPSInst_RD(ir)) in mipsr6_emul()
115 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
116 (s32)(((u32)regs->regs[MIPSInst_RT(ir)]) << in mipsr6_emul()
117 MIPSInst_FD(ir)); in mipsr6_emul()
120 if (MIPSInst_RS(ir)) in mipsr6_emul()
123 if (MIPSInst_RD(ir)) in mipsr6_emul()
124 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
125 (s32)(((u32)regs->regs[MIPSInst_RT(ir)]) >> in mipsr6_emul()
126 MIPSInst_FD(ir)); in mipsr6_emul()
129 if (MIPSInst_FD(ir)) in mipsr6_emul()
132 if (MIPSInst_RD(ir)) in mipsr6_emul()
133 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
134 (s32)((u32)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul()
135 (u32)regs->regs[MIPSInst_RT(ir)]); in mipsr6_emul()
138 if (MIPSInst_FD(ir)) in mipsr6_emul()
141 if (MIPSInst_RD(ir)) in mipsr6_emul()
142 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
143 (s32)((u32)regs->regs[MIPSInst_RS(ir)] - in mipsr6_emul()
144 (u32)regs->regs[MIPSInst_RT(ir)]); in mipsr6_emul()
147 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir)) in mipsr6_emul()
150 if (MIPSInst_RD(ir)) in mipsr6_emul()
151 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
152 (s64)(((u64)regs->regs[MIPSInst_RT(ir)]) << in mipsr6_emul()
153 MIPSInst_FD(ir)); in mipsr6_emul()
156 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir)) in mipsr6_emul()
159 if (MIPSInst_RD(ir)) in mipsr6_emul()
160 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
161 (s64)(((u64)regs->regs[MIPSInst_RT(ir)]) >> in mipsr6_emul()
162 MIPSInst_FD(ir)); in mipsr6_emul()
165 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir)) in mipsr6_emul()
168 if (MIPSInst_RD(ir)) in mipsr6_emul()
169 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
170 (u64)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul()
171 (u64)regs->regs[MIPSInst_RT(ir)]; in mipsr6_emul()
174 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir)) in mipsr6_emul()
177 if (MIPSInst_RD(ir)) in mipsr6_emul()
178 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul()
179 (s64)((u64)regs->regs[MIPSInst_RS(ir)] - in mipsr6_emul()
180 (u64)regs->regs[MIPSInst_RT(ir)]); in mipsr6_emul()
186 ir, MIPSInst_OPCODE(ir)); in mipsr6_emul()
195 * @ir: Instruction
199 static int movf_func(struct pt_regs *regs, u32 ir) in movf_func() argument
205 cond = fpucondbit[MIPSInst_RT(ir) >> 2]; in movf_func()
207 if (((csr & cond) == 0) && MIPSInst_RD(ir)) in movf_func()
208 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; in movf_func()
218 * @ir: Instruction
222 static int movt_func(struct pt_regs *regs, u32 ir) in movt_func() argument
228 cond = fpucondbit[MIPSInst_RT(ir) >> 2]; in movt_func()
230 if (((csr & cond) != 0) && MIPSInst_RD(ir)) in movt_func()
231 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; in movt_func()
241 * @ir: Instruction
247 static int jr_func(struct pt_regs *regs, u32 ir) in jr_func() argument
300 * @ir: Instruction
304 static int movz_func(struct pt_regs *regs, u32 ir) in movz_func() argument
306 if (((regs->regs[MIPSInst_RT(ir)]) == 0) && MIPSInst_RD(ir)) in movz_func()
307 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; in movz_func()
316 * @ir: Instruction
320 static int movn_func(struct pt_regs *regs, u32 ir) in movn_func() argument
322 if (((regs->regs[MIPSInst_RT(ir)]) != 0) && MIPSInst_RD(ir)) in movn_func()
323 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; in movn_func()
332 * @ir: Instruction
336 static int mfhi_func(struct pt_regs *regs, u32 ir) in mfhi_func() argument
338 if (MIPSInst_RD(ir)) in mfhi_func()
339 regs->regs[MIPSInst_RD(ir)] = regs->hi; in mfhi_func()
349 * @ir: Instruction
353 static int mthi_func(struct pt_regs *regs, u32 ir) in mthi_func() argument
355 regs->hi = regs->regs[MIPSInst_RS(ir)]; in mthi_func()
365 * @ir: Instruction
369 static int mflo_func(struct pt_regs *regs, u32 ir) in mflo_func() argument
371 if (MIPSInst_RD(ir)) in mflo_func()
372 regs->regs[MIPSInst_RD(ir)] = regs->lo; in mflo_func()
382 * @ir: Instruction
386 static int mtlo_func(struct pt_regs *regs, u32 ir) in mtlo_func() argument
388 regs->lo = regs->regs[MIPSInst_RS(ir)]; in mtlo_func()
398 * @ir: Instruction
402 static int mult_func(struct pt_regs *regs, u32 ir) in mult_func() argument
407 rt = regs->regs[MIPSInst_RT(ir)]; in mult_func()
408 rs = regs->regs[MIPSInst_RS(ir)]; in mult_func()
425 * @ir: Instruction
429 static int multu_func(struct pt_regs *regs, u32 ir) in multu_func() argument
434 rt = regs->regs[MIPSInst_RT(ir)]; in multu_func()
435 rs = regs->regs[MIPSInst_RS(ir)]; in multu_func()
449 * @ir: Instruction
453 static int div_func(struct pt_regs *regs, u32 ir) in div_func() argument
457 rt = regs->regs[MIPSInst_RT(ir)]; in div_func()
458 rs = regs->regs[MIPSInst_RS(ir)]; in div_func()
471 * @ir: Instruction
475 static int divu_func(struct pt_regs *regs, u32 ir) in divu_func() argument
479 rt = regs->regs[MIPSInst_RT(ir)]; in divu_func()
480 rs = regs->regs[MIPSInst_RS(ir)]; in divu_func()
493 * @ir: Instruction
497 static int dmult_func(struct pt_regs *regs, u32 ir) in dmult_func() argument
505 rt = regs->regs[MIPSInst_RT(ir)]; in dmult_func()
506 rs = regs->regs[MIPSInst_RS(ir)]; in dmult_func()
525 * @ir: Instruction
529 static int dmultu_func(struct pt_regs *regs, u32 ir) in dmultu_func() argument
537 rt = regs->regs[MIPSInst_RT(ir)]; in dmultu_func()
538 rs = regs->regs[MIPSInst_RS(ir)]; in dmultu_func()
557 * @ir: Instruction
561 static int ddiv_func(struct pt_regs *regs, u32 ir) in ddiv_func() argument
568 rt = regs->regs[MIPSInst_RT(ir)]; in ddiv_func()
569 rs = regs->regs[MIPSInst_RS(ir)]; in ddiv_func()
582 * @ir: Instruction
586 static int ddivu_func(struct pt_regs *regs, u32 ir) in ddivu_func() argument
593 rt = regs->regs[MIPSInst_RT(ir)]; in ddivu_func()
594 rs = regs->regs[MIPSInst_RS(ir)]; in ddivu_func()
629 * @ir: Instruction
633 static int madd_func(struct pt_regs *regs, u32 ir) in madd_func() argument
638 rt = regs->regs[MIPSInst_RT(ir)]; in madd_func()
639 rs = regs->regs[MIPSInst_RS(ir)]; in madd_func()
658 * @ir: Instruction
662 static int maddu_func(struct pt_regs *regs, u32 ir) in maddu_func() argument
667 rt = regs->regs[MIPSInst_RT(ir)]; in maddu_func()
668 rs = regs->regs[MIPSInst_RS(ir)]; in maddu_func()
687 * @ir: Instruction
691 static int msub_func(struct pt_regs *regs, u32 ir) in msub_func() argument
696 rt = regs->regs[MIPSInst_RT(ir)]; in msub_func()
697 rs = regs->regs[MIPSInst_RS(ir)]; in msub_func()
716 * @ir: Instruction
720 static int msubu_func(struct pt_regs *regs, u32 ir) in msubu_func() argument
725 rt = regs->regs[MIPSInst_RT(ir)]; in msubu_func()
726 rs = regs->regs[MIPSInst_RS(ir)]; in msubu_func()
745 * @ir: Instruction
749 static int mul_func(struct pt_regs *regs, u32 ir) in mul_func() argument
754 if (!MIPSInst_RD(ir)) in mul_func()
756 rt = regs->regs[MIPSInst_RT(ir)]; in mul_func()
757 rs = regs->regs[MIPSInst_RS(ir)]; in mul_func()
761 regs->regs[MIPSInst_RD(ir)] = (s64)rs; in mul_func()
771 * @ir: Instruction
775 static int clz_func(struct pt_regs *regs, u32 ir) in clz_func() argument
780 if (!MIPSInst_RD(ir)) in clz_func()
783 rs = regs->regs[MIPSInst_RS(ir)]; in clz_func()
785 regs->regs[MIPSInst_RD(ir)] = res; in clz_func()
795 * @ir: Instruction
800 static int clo_func(struct pt_regs *regs, u32 ir) in clo_func() argument
805 if (!MIPSInst_RD(ir)) in clo_func()
808 rs = regs->regs[MIPSInst_RS(ir)]; in clo_func()
810 regs->regs[MIPSInst_RD(ir)] = res; in clo_func()
820 * @ir: Instruction
824 static int dclz_func(struct pt_regs *regs, u32 ir) in dclz_func() argument
832 if (!MIPSInst_RD(ir)) in dclz_func()
835 rs = regs->regs[MIPSInst_RS(ir)]; in dclz_func()
837 regs->regs[MIPSInst_RD(ir)] = res; in dclz_func()
847 * @ir: Instruction
851 static int dclo_func(struct pt_regs *regs, u32 ir) in dclo_func() argument
859 if (!MIPSInst_RD(ir)) in dclo_func()
862 rs = regs->regs[MIPSInst_RS(ir)]; in dclo_func()
864 regs->regs[MIPSInst_RD(ir)] = res; in dclo_func()