Lines Matching refs:inst

69     unsigned inst;  in xthal_set_soft_break()  local
74 inst = ((((char *)addr)[0])<<24) + in xthal_set_soft_break()
78 inst = ((((char *)addr)[0])) + in xthal_set_soft_break()
84 ret_val = XTHAL_24_BIT_BREAK & ((inst>>8)&0xffffff); in xthal_set_soft_break()
89 ret_val = XTHAL_16_BIT_BREAK & ((inst>>16)&0xffff); in xthal_set_soft_break()
95 ret_val = XTHAL_24_BIT_BREAK & (inst&0xffffff); in xthal_set_soft_break()
100 ret_val = XTHAL_16_BIT_BREAK & (inst&0xffff); in xthal_set_soft_break()
105 *((unsigned int *)addr) = inst; in xthal_set_soft_break()
118 xthal_remove_soft_break(void *addr, unsigned int inst) in xthal_remove_soft_break() argument
121 if (inst&XTHAL_24_BIT_BREAK) { in xthal_remove_soft_break()
122 ((unsigned char *)addr)[0] = (inst>>16)&0xff; in xthal_remove_soft_break()
123 ((unsigned char *)addr)[1] = (inst>>8)&0xff; in xthal_remove_soft_break()
124 ((unsigned char *)addr)[2] = inst&0xff; in xthal_remove_soft_break()
126 ((unsigned char *)addr)[0] = (inst>>8)&0xff; in xthal_remove_soft_break()
127 ((unsigned char *)addr)[1] = inst&0xff; in xthal_remove_soft_break()
130 ((unsigned char *)addr)[0] = inst&0xff; in xthal_remove_soft_break()
131 ((unsigned char *)addr)[1] = (inst>>8)&0xff; in xthal_remove_soft_break()
132 if (inst&XTHAL_24_BIT_BREAK) in xthal_remove_soft_break()
133 ((unsigned char *)addr)[2] = (inst>>16)&0xff; in xthal_remove_soft_break()
153 unsigned inst; in xthal_inst_type() local
159 inst = ((((char *)addr)[0])<<24) + in xthal_inst_type()
162 op0 = inst>>28; in xthal_inst_type()
163 op1 = (inst>>12)&0xf; in xthal_inst_type()
164 op2 = (inst>>16)&0xf; in xthal_inst_type()
165 i = (inst>>27)&0x1; in xthal_inst_type()
166 z = (inst>>26)&0x1; in xthal_inst_type()
167 m = (inst>>24)&0x3; in xthal_inst_type()
168 n = (inst>>26)&0x3; in xthal_inst_type()
169 r = (inst>>16)&0xf; in xthal_inst_type()
170 s = (inst>>20)&0xf; in xthal_inst_type()
171 t = (inst>>24)&0xf; in xthal_inst_type()
173 inst = ((((char *)addr)[0])) + in xthal_inst_type()
176 op0 = inst&0xf; in xthal_inst_type()
177 op1 = (inst&0xf0000)>>16; in xthal_inst_type()
178 op2 = (inst&0xf00000)>>20; in xthal_inst_type()
179 i = (inst&0x80)>>7; in xthal_inst_type()
180 z = (inst&0x40)>>6; in xthal_inst_type()
181 m = (inst&0xc0)>>6; in xthal_inst_type()
182 n = (inst&0x30)>>4; in xthal_inst_type()
183 r = (inst&0xf000)>>12; in xthal_inst_type()
184 s = (inst&0xf00)>>8; in xthal_inst_type()
185 t = (inst&0xf0)>4; in xthal_inst_type()
286 unsigned inst; in xthal_branch_addr() local
292 inst = ((((char *)addr)[0])<<24) + in xthal_branch_addr()
296 inst = ((((char *)addr)[0])) + in xthal_branch_addr()
304 b_addr += (4+((inst&0x3000000)>>20)+((inst&0xf0000)>>16)); in xthal_branch_addr()
306 b_addr += (4+(inst&0x30)+((inst&0xf000)>>12)); in xthal_branch_addr()
313 if ((inst&0xf0000000)==0x70000000) in xthal_branch_addr()
314 offset = ((int)(inst<<16))>>24; in xthal_branch_addr()
315 else if ((inst&0xf2000000)==0x62000000) in xthal_branch_addr()
316 offset = ((int)(inst<<16))>>24; in xthal_branch_addr()
318 offset = ((int)(inst<<12))>>20; in xthal_branch_addr()
320 if ((inst&0xf)==0x7) in xthal_branch_addr()
321 offset = ((int)(inst<<8))>>24; in xthal_branch_addr()
322 else if ((inst&0x2f)==0x26) in xthal_branch_addr()
323 offset = ((int)(inst<<8))>>24; in xthal_branch_addr()
325 offset = ((int)(inst<<8))>>20; in xthal_branch_addr()
332 if ((inst&0xfc000000)==0x60000000) in xthal_branch_addr()
333 offset = ((int)(inst<<6))>>14; in xthal_branch_addr()
337 offset = ((int)(inst<<6))>>12; in xthal_branch_addr()
340 if ((inst&0x3f)==0x6) in xthal_branch_addr()
341 offset = ((int)(inst<<8))>>14; in xthal_branch_addr()
345 offset = ((int)(inst<<8))>>12; in xthal_branch_addr()
393 unsigned short inst; in xthal_get_npc() local
395 memcpy(&inst, (void *)user_state->pc, 2); in xthal_get_npc()
397 op0 = (inst&0xf000)>>12; in xthal_get_npc()
398 t = (inst&0x0f00)>>8; in xthal_get_npc()
399 s = (inst&0x00f0)>>4; in xthal_get_npc()
400 r = (inst&0x000f); in xthal_get_npc()
404 op0 = (inst&0x000f); in xthal_get_npc()
405 t = (inst&0x00f0)>>4; in xthal_get_npc()
406 s = (inst&0x0f00)>>8; in xthal_get_npc()
407 r = (inst&0xf000)>>12; in xthal_get_npc()
413 if (inst&0x400) /* BNEZ.N */ in xthal_get_npc()
414 branch_taken = (user_state->ar[(inst>>4)&0xf]!=0); in xthal_get_npc()
416 branch_taken = (user_state->ar[(inst>>4)&0xf]==0); in xthal_get_npc()
418 if (inst&0x40) /* BNEZ.N */ in xthal_get_npc()
419 branch_taken = (user_state->ar[(inst>>8)&0xf]!=0); in xthal_get_npc()
421 branch_taken = (user_state->ar[(inst>>8)&0xf]==0); in xthal_get_npc()