|
From: | Richard Henderson |
Subject: | Re: [PATCH 1/2] target/arm: Don't allow guest to use unimplemented granule sizes |
Date: | Mon, 3 Oct 2022 06:46:11 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 10/3/22 03:28, Peter Maydell wrote:
I'd assumed you had a reason for using two bools rather than an enum in ARMVAParameters, so I left that alone :-)
I think it was because the existing code had variables of those names, so the patch changed "foo" to "param.foo". :-)
Putting GranuleSize into ARMVAParameters brings us into the area of enums in bitfields, where I'm not sure exactly what the standard says or our supported compilers allow as an impdef extension. GranuleSize gsize : 2; seems to work, but is it portable?
I think so. Leastwise, we use those elsewhere. I would certainly expect a warning from any of our supported compilers if we were to use too few bits for the enum type.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |