[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] target/ppc: Fix 64-bit decrementer
From: |
Luis Fernando Fujita Pires |
Subject: |
RE: [PATCH] target/ppc: Fix 64-bit decrementer |
Date: |
Mon, 13 Sep 2021 18:05:42 +0000 |
> > value = extract64(value, 0, nr_bits);
> > value = ((target_long)value << (64 - nr_bits)) >> (64 - nr_bits);
>
> Oops, sorry. 64 might not be correct here. It would depend on the target being
> either 32 or 64.
In fact, sextract already does the sign extension, so this should be all that's
needed, right?
value = sextract<32,64>(value, 0, nr_bits);
--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>