qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 09/14] softfloat: Replace int8 type with int_fas


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 09/14] softfloat: Replace int8 type with int_fast8_t
Date: Mon, 16 Jan 2012 18:48:15 +0000

On 16 January 2012 00:46, Andreas Färber <address@hidden> wrote:
> -static int8 countLeadingZeros32( uint32_t a )
> +static int_fast8_t countLeadingZeros32(uint32_t a)
>  {
>  #if SOFTFLOAT_GNUC_PREREQ(3, 4)
>     if (a) {
> @@ -634,7 +634,7 @@ static int8 countLeadingZeros32( uint32_t a )
>         return 32;
>     }
>  #else
> -    static const int8 countLeadingZerosHigh[] = {
> +    static const int_fast8_t countLeadingZerosHigh[] = {
>         8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
>         3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
>         2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
> @@ -652,7 +652,7 @@ static int8 countLeadingZeros32( uint32_t a )
>         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
>         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
>     };

It seems unlikely that anybody will actually try to compile
qemu with gcc 3 any more, but this table should probably be
an int8_t[], not int_fast8_t[]. (Both will work, but the fast
types make sense for register values rather than in-memory
lookup tables IMHO.)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]