[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 28/60] AArch64: Add movi instruction emulation
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 28/60] AArch64: Add movi instruction emulation |
Date: |
Fri, 27 Sep 2013 12:38:08 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/26/2013 05:48 PM, Alexander Graf wrote:
> + if (is_k) {
> + tcg_imm = tcg_const_i64(imm);
> + tcg_gen_deposit_i64(cpu_reg(reg), cpu_reg(reg), tcg_imm, pos, 16);
> + tcg_temp_free_i64(tcg_imm);
> + } else {
> + tcg_gen_movi_i64(cpu_reg(reg), imm << pos);
> + }
> +
> + if (is_n) {
> + tcg_gen_not_i64(cpu_reg(reg), cpu_reg(reg));
> + }
> +
> + if (is_32bit) {
> + tcg_gen_ext32u_i64(cpu_reg(reg), cpu_reg(reg));
> + }
You've a constant input. This should be done in one tcg op:
if (is_k) {
...
} else {
imm <<= pos;
if (is_n) {
imm = ~imm;
}
if (is_32bit) {
imm &= 0xffffffffu;
}
tcg_gen_movi_i64(cpu_reg(reg), imm);
}
r~
- [Qemu-devel] [PATCH 24/60] AArch64: Add SIMD ushll instruction emulation, (continued)
- [Qemu-devel] [PATCH 24/60] AArch64: Add SIMD ushll instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 20/60] AArch64: Add SIMD ORR family instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 18/60] AArch64: Add umov instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 03/60] arm: Split VFP cmp from FPSCR setting, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 28/60] AArch64: Add movi instruction emulation, Alexander Graf, 2013/09/26
- Re: [Qemu-devel] [PATCH 28/60] AArch64: Add movi instruction emulation,
Richard Henderson <=
- [Qemu-devel] [PATCH 16/60] AArch64: Add emulation for SIMD ld/st multiple, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 27/60] AArch64: Add addi instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 25/60] AArch64: Add SIMD shl instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 30/60] AArch64: Add extr instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 29/60] AArch64: Add orri instruction emulation, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 23/60] AArch64: Add AdvSIMD modified immediate group handling, Alexander Graf, 2013/09/26
- [Qemu-devel] [PATCH 31/60] AArch64: Add bfm family instruction emulation, Alexander Graf, 2013/09/26