Revision db166940 target-sparc/translate.c
b/target-sparc/translate.c | ||
---|---|---|
1722 | 1722 |
tcg_gen_trunc_i64_tl(dst, cpu_tmp64); |
1723 | 1723 |
} |
1724 | 1724 |
|
1725 |
static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn)
|
|
1725 |
static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
|
1726 | 1726 |
{ |
1727 |
TCGv r_asi, r_size, r_sign;
|
|
1727 |
TCGv r_asi, r_rd;
|
|
1728 | 1728 |
|
1729 | 1729 |
r_asi = gen_get_asi(insn, addr); |
1730 |
r_size = tcg_const_i32(8); |
|
1731 |
r_sign = tcg_const_i32(0); |
|
1732 |
tcg_gen_helper_1_4(helper_ld_asi, cpu_tmp64, addr, r_asi, r_size, r_sign); |
|
1733 |
tcg_temp_free(r_sign); |
|
1734 |
tcg_temp_free(r_size); |
|
1730 |
r_rd = tcg_const_i32(rd); |
|
1731 |
tcg_gen_helper_0_3(helper_ldda_asi, addr, r_asi, r_rd); |
|
1732 |
tcg_temp_free(r_rd); |
|
1735 | 1733 |
tcg_temp_free(r_asi); |
1736 |
tcg_gen_andi_i64(lo, cpu_tmp64, 0xffffffffULL); |
|
1737 |
tcg_gen_shri_i64(cpu_tmp64, cpu_tmp64, 32); |
|
1738 |
tcg_gen_andi_i64(hi, cpu_tmp64, 0xffffffffULL); |
|
1739 | 1734 |
} |
1740 | 1735 |
|
1741 | 1736 |
static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) |
... | ... | |
1822 | 1817 |
tcg_gen_trunc_i64_tl(dst, cpu_tmp64); |
1823 | 1818 |
} |
1824 | 1819 |
|
1825 |
static inline void gen_ldda_asi(TCGv lo, TCGv hi, TCGv addr, int insn)
|
|
1820 |
static inline void gen_ldda_asi(TCGv hi, TCGv addr, int insn, int rd)
|
|
1826 | 1821 |
{ |
1827 | 1822 |
TCGv r_asi, r_size, r_sign; |
1828 | 1823 |
|
... | ... | |
1833 | 1828 |
tcg_temp_free(r_sign); |
1834 | 1829 |
tcg_temp_free(r_size); |
1835 | 1830 |
tcg_temp_free(r_asi); |
1836 |
tcg_gen_trunc_i64_tl(lo, cpu_tmp64); |
|
1831 |
tcg_gen_trunc_i64_tl(cpu_tmp0, cpu_tmp64); |
|
1832 |
gen_movl_TN_reg(rd + 1, cpu_tmp0); |
|
1837 | 1833 |
tcg_gen_shri_i64(cpu_tmp64, cpu_tmp64, 32); |
1838 | 1834 |
tcg_gen_trunc_i64_tl(hi, cpu_tmp64); |
1835 |
gen_movl_TN_reg(rd, hi); |
|
1839 | 1836 |
} |
1840 | 1837 |
|
1841 | 1838 |
static inline void gen_stda_asi(TCGv hi, TCGv addr, int insn, int rd) |
... | ... | |
4310 | 4307 |
if (rd & 1) |
4311 | 4308 |
goto illegal_insn; |
4312 | 4309 |
save_state(dc, cpu_cond); |
4313 |
gen_ldda_asi(cpu_tmp0, cpu_val, cpu_addr, insn); |
|
4314 |
gen_movl_TN_reg(rd + 1, cpu_tmp0); |
|
4315 |
break; |
|
4310 |
gen_ldda_asi(cpu_val, cpu_addr, insn, rd); |
|
4311 |
goto skip_move; |
|
4316 | 4312 |
case 0x19: /* load signed byte alternate */ |
4317 | 4313 |
#ifndef TARGET_SPARC64 |
4318 | 4314 |
if (IS_IMM) |
... | ... | |
4403 | 4399 |
goto illegal_insn; |
4404 | 4400 |
} |
4405 | 4401 |
gen_movl_TN_reg(rd, cpu_val); |
4406 |
#ifdef TARGET_SPARC64
|
|
4402 |
#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
|
|
4407 | 4403 |
skip_move: ; |
4408 | 4404 |
#endif |
4409 | 4405 |
} else if (xop >= 0x20 && xop < 0x24) { |
Also available in: Unified diff