Revision 1884533c targetcris/translate.c
b/targetcris/translate.c  

227  227 
} 
228  228 
} 
229  229  
230 
/* Sign extend at translation time. */ 

231 
static int sign_extend(unsigned int val, unsigned int width) 

232 
{ 

233 
int sval; 

234  
235 
/* LSL. */ 

236 
val <<= 31  width; 

237 
sval = val; 

238 
/* ASR. */ 

239 
sval >>= 31  width; 

240 
return sval; 

241 
} 

242  
230  243 
static int cris_fetch(DisasContext *dc, uint32_t addr, 
231  244 
unsigned int size, unsigned int sign) 
232  245 
{ 
...  ...  
594  607 
} 
595  608 
} 
596  609  
597 
/* Sign extend at translation time. */ 

598 
static int sign_extend(unsigned int val, unsigned int width) 

599 
{ 

600 
int sval; 

601  
602 
/* LSL. */ 

603 
val <<= 31  width; 

604 
sval = val; 

605 
/* ASR. */ 

606 
sval >>= 31  width; 

607 
return sval; 

608 
} 

609  
610  610 
static inline void cris_clear_x_flag(DisasContext *dc) 
611  611 
{ 
612  612 
if (dc>flagx_known && dc>flags_x) 
Also available in: Unified diff