Revision 6f41b777 tcg/sparc/tcg-target.c
b/tcg/sparc/tcg-target.c | ||
---|---|---|
268 | 268 |
INSN_RS2(rs2)); |
269 | 269 |
} |
270 | 270 |
|
271 |
static inline void tcg_out_arithi(TCGContext *s, int rd, int rs1, int offset,
|
|
272 |
int op) |
|
271 |
static inline void tcg_out_arithi(TCGContext *s, int rd, int rs1, |
|
272 |
uint32_t offset, int op)
|
|
273 | 273 |
{ |
274 | 274 |
tcg_out32(s, op | INSN_RD(rd) | INSN_RS1(rs1) | |
275 | 275 |
INSN_IMM13(offset)); |
... | ... | |
292 | 292 |
|
293 | 293 |
static inline void tcg_out_movi_imm32(TCGContext *s, int ret, uint32_t arg) |
294 | 294 |
{ |
295 |
if (check_fit_i32(arg, 12))
|
|
295 |
if (check_fit_tl(arg, 12))
|
|
296 | 296 |
tcg_out_movi_imm13(s, ret, arg); |
297 | 297 |
else { |
298 | 298 |
tcg_out_sethi(s, ret, arg); |
... | ... | |
310 | 310 |
tcg_out_arithi(s, TCG_REG_I4, TCG_REG_I4, 32, SHIFT_SLLX); |
311 | 311 |
tcg_out_movi_imm32(s, ret, arg); |
312 | 312 |
tcg_out_arith(s, ret, ret, TCG_REG_I4, ARITH_OR); |
313 |
} else |
|
313 |
} else if (check_fit_tl(arg, 12)) |
|
314 |
tcg_out_movi_imm13(s, ret, arg); |
|
315 |
else { |
|
316 |
tcg_out_sethi(s, ret, arg); |
|
317 |
if (arg & 0x3ff) |
|
318 |
tcg_out_arithi(s, ret, ret, arg & 0x3ff, ARITH_OR); |
|
319 |
} |
|
320 |
#else |
|
321 |
tcg_out_movi_imm32(s, ret, arg); |
|
314 | 322 |
#endif |
315 |
tcg_out_movi_imm32(s, ret, arg); |
|
316 | 323 |
} |
317 | 324 |
|
318 | 325 |
static inline void tcg_out_ld_raw(TCGContext *s, int ret, |
Also available in: Unified diff