Re: [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-11-20 Thread Michael Matz
Hi, On Tue, 19 Nov 2013, Claudio Fontana wrote: > > +uint64_t imm; > > +uint64_t base; > > + > > +imm = get_sbits(insn, 5, 19) << 2; > > +imm |= get_bits(insn, 29, 2); > > does this work with negative values? Yes. get_sbits returns a sign extended (32bit) int, the shift doesn't

Re: [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-11-19 Thread Peter Maydell
On 19 November 2013 18:03, Peter Maydell wrote: > On 19 November 2013 17:52, Claudio Fontana wrote: >> static void disas_pc_rel_adr(DisasContext *s, uint32_t insn) >> { >> /* >> * 31 30 29 28 27 26 25 24 23 5 4 0 >> * op immlo 1 0 0 0 0 immhi Rd >> */ >> unsig

Re: [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-11-19 Thread Peter Maydell
On 19 November 2013 17:52, Claudio Fontana wrote: > static void disas_pc_rel_adr(DisasContext *s, uint32_t insn) > { > /* > * 31 30 29 28 27 26 25 24 23 5 4 0 > * op immlo 1 0 0 0 0 immhi Rd > */ > unsigned int page, imm, rd, len; /* op -> page, immhi:immlo ->

Re: [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-11-19 Thread Claudio Fontana
On 11/19/2013 06:17 PM, Claudio Fontana wrote: > Hello all, > > On 09/27/2013 02:48 AM, Alexander Graf wrote: >> This patch adds emulation support for the adr instruction. >> >> Signed-off-by: Alexander Graf >> --- >> target-arm/translate-a64.c | 24 >> 1 file changed, 2

Re: [Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-11-19 Thread Claudio Fontana
Hello all, On 09/27/2013 02:48 AM, Alexander Graf wrote: > This patch adds emulation support for the adr instruction. > > Signed-off-by: Alexander Graf > --- > target-arm/translate-a64.c | 24 > 1 file changed, 24 insertions(+) > > diff --git a/target-arm/translate-a64

[Qemu-devel] [PATCH 26/60] AArch64: Add ADR instruction emulation

2013-09-26 Thread Alexander Graf
This patch adds emulation support for the adr instruction. Signed-off-by: Alexander Graf --- target-arm/translate-a64.c | 24 1 file changed, 24 insertions(+) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index bc91324..00eda0f 100644 --- a/target