diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 636b0745d7c7..d0e77b2470cb 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -187,21 +187,21 @@ static inline int is_ra_save_ins(union mips_instruction *ip) | |||
187 | */ | 187 | */ |
188 | if (mm_insn_16bit(ip->halfword[0])) { | 188 | if (mm_insn_16bit(ip->halfword[0])) { |
189 | mmi.word = (ip->halfword[0] << 16); | 189 | mmi.word = (ip->halfword[0] << 16); |
190 | return ((mmi.mm16_r5_format.opcode == mm_swsp16_op && | 190 | return (mmi.mm16_r5_format.opcode == mm_swsp16_op && |
191 | mmi.mm16_r5_format.rt == 31) || | 191 | mmi.mm16_r5_format.rt == 31) || |
192 | (mmi.mm16_m_format.opcode == mm_pool16c_op && | 192 | (mmi.mm16_m_format.opcode == mm_pool16c_op && |
193 | mmi.mm16_m_format.func == mm_swm16_op)); | 193 | mmi.mm16_m_format.func == mm_swm16_op); |
194 | } | 194 | } |
195 | else { | 195 | else { |
196 | mmi.halfword[0] = ip->halfword[1]; | 196 | mmi.halfword[0] = ip->halfword[1]; |
197 | mmi.halfword[1] = ip->halfword[0]; | 197 | mmi.halfword[1] = ip->halfword[0]; |
198 | return ((mmi.mm_m_format.opcode == mm_pool32b_op && | 198 | return (mmi.mm_m_format.opcode == mm_pool32b_op && |
199 | mmi.mm_m_format.rd > 9 && | 199 | mmi.mm_m_format.rd > 9 && |
200 | mmi.mm_m_format.base == 29 && | 200 | mmi.mm_m_format.base == 29 && |
201 | mmi.mm_m_format.func == mm_swm32_func) || | 201 | mmi.mm_m_format.func == mm_swm32_func) || |
202 | (mmi.i_format.opcode == mm_sw32_op && | 202 | (mmi.i_format.opcode == mm_sw32_op && |
203 | mmi.i_format.rs == 29 && | 203 | mmi.i_format.rs == 29 && |
204 | mmi.i_format.rt == 31)); | 204 | mmi.i_format.rt == 31); |
205 | } | 205 | } |
206 | #else | 206 | #else |
207 | /* sw / sd $ra, offset($sp) */ | 207 | /* sw / sd $ra, offset($sp) */ |
@@ -233,7 +233,7 @@ static inline int is_jump_ins(union mips_instruction *ip) | |||
233 | if (ip->r_format.opcode != mm_pool32a_op || | 233 | if (ip->r_format.opcode != mm_pool32a_op || |
234 | ip->r_format.func != mm_pool32axf_op) | 234 | ip->r_format.func != mm_pool32axf_op) |
235 | return 0; | 235 | return 0; |
236 | return (((ip->u_format.uimmediate >> 6) & mm_jalr_op) == mm_jalr_op); | 236 | return ((ip->u_format.uimmediate >> 6) & mm_jalr_op) == mm_jalr_op; |
237 | #else | 237 | #else |
238 | if (ip->j_format.opcode == j_op) | 238 | if (ip->j_format.opcode == j_op) |
239 | return 1; | 239 | return 1; |
@@ -260,13 +260,13 @@ static inline int is_sp_move_ins(union mips_instruction *ip) | |||
260 | union mips_instruction mmi; | 260 | union mips_instruction mmi; |
261 | 261 | ||
262 | mmi.word = (ip->halfword[0] << 16); | 262 | mmi.word = (ip->halfword[0] << 16); |
263 | return ((mmi.mm16_r3_format.opcode == mm_pool16d_op && | 263 | return (mmi.mm16_r3_format.opcode == mm_pool16d_op && |
264 | mmi.mm16_r3_format.simmediate && mm_addiusp_func) || | 264 | mmi.mm16_r3_format.simmediate && mm_addiusp_func) || |
265 | (mmi.mm16_r5_format.opcode == mm_pool16d_op && | 265 | (mmi.mm16_r5_format.opcode == mm_pool16d_op && |
266 | mmi.mm16_r5_format.rt == 29)); | 266 | mmi.mm16_r5_format.rt == 29); |
267 | } | 267 | } |
268 | return (ip->mm_i_format.opcode == mm_addiu32_op && | 268 | return ip->mm_i_format.opcode == mm_addiu32_op && |
269 | ip->mm_i_format.rt == 29 && ip->mm_i_format.rs == 29); | 269 | ip->mm_i_format.rt == 29 && ip->mm_i_format.rs == 29; |
270 | #else | 270 | #else |
271 | /* addiu/daddiu sp,sp,-imm */ | 271 | /* addiu/daddiu sp,sp,-imm */ |
272 | if (ip->i_format.rs != 29 || ip->i_format.rt != 29) | 272 | if (ip->i_format.rs != 29 || ip->i_format.rt != 29) |