From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqO0C-0001BI-32 for qemu-devel@nongnu.org; Tue, 10 Dec 2013 09:09:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqO07-0006bP-Dt for qemu-devel@nongnu.org; Tue, 10 Dec 2013 09:09:32 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:35782 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqO07-0006bJ-7T for qemu-devel@nongnu.org; Tue, 10 Dec 2013 09:09:27 -0500 References: <1386612744-1013-1-git-send-email-peter.maydell@linaro.org> <1386612744-1013-4-git-send-email-peter.maydell@linaro.org> <52A62FF0.1020303@twiddle.net> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <52A62FF0.1020303@twiddle.net> Date: Tue, 10 Dec 2013 14:09:25 +0000 Message-ID: <87txeg6bmy.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 3/9] target-arm: A64: add support for ld/st unsigned imm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , patches@linaro.org, Michael Matz , qemu-devel@nongnu.org, Claudio Fontana , Dirk Mueller , Will Newton , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Christoffer Dall rth@twiddle.net writes: > On 12/09/2013 10:12 AM, Peter Maydell wrote: >> From: Alex Bennée >> >> +static TCGv_i64 read_cpu_reg_sp(DisasContext *s, int reg, int sf) >> +{ >> + TCGv_i64 v = new_tmp_a64(s); >> + if (sf) { >> + tcg_gen_mov_i64(v, cpu_X[reg]); >> + } else { >> + tcg_gen_ext32u_i64(v, cpu_X[reg]); >> + } >> + return v; >> +} > > Did you want to use this in for the load/store pair insns too? Yes. Originally I was doing a load of: tcg_rn = cpu_reg_sp(...) tcg_addr = tcg_temp_new_i64(); tcg_gen_mov_i64(tcg_addr, tcg_rn... Before we had a clear API for the CPU reg stuff. Now I tend to just do: tcg_addr = read_cpu_reg_sp(...) I'll hoist that into the first patch now I've re-done it. -- Alex Bennée QEMU/KVM Hacker for Linaro