[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions |
Date: |
Fri, 4 Jul 2014 00:05:37 +0100 |
On 3 July 2014 23:47, Al Viro <address@hidden> wrote:
> How can that be correct? Suppose a = b = 0. We get
> tcg_gen_eqv_i64(tmp, va, vb); -> tmp = -1
> tcg_gen_mov_i64(tmp2, va); -> tmp2 = 0
> tcg_gen_add_i64(vc, va, vb); -> c = 0
> tcg_gen_xor_i64(tmp2, tmp2, vc);-> tmp2 = 0
> tcg_gen_and_i64(tmp, tmp, tmp2);-> tmp = -1
tmp2 here is 0, so the result of this AND is 0, not -1...
> tcg_gen_shri_i64(tmp, tmp, 63); -> tmp = 1
so tmp = 0
> tcg_gen_movi_i64(tmp2, 0); -> tmp2 = 0
> gen_helper_check_overflow(cpu_env, tmp, tmp2); -> not equal, overflow.
and tmp == tmp2, no overflow.
thanks
-- PMM
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, (continued)
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Richard Henderson, 2014/07/02
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/02
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Richard Henderson, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions,
Peter Maydell <=
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/03
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Richard Henderson, 2014/07/04
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/04
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/04
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/05
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/05
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/05
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Richard Henderson, 2014/07/07
- Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions, Al Viro, 2014/07/07