On Tue, Apr 30, 2013 at 6:36 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On 30 April 2013 10:36, Alexander Graf <ag...@suse.de> wrote: > > > > On 30.04.2013, at 08:36, John Rigby wrote: > >> - remove many uses of is_a64 as that is a indicator the target arch is > >> aarch64 not what mode it is running in. > > > > It indicates what mode the CPU is running on. The only reason it > > was defined statically so far, was that linux-user was the only > > target I implemented. And that one can't switch during runtime. > > Agreed. "target arch supports aarch64" is a compile time thing -- > compare use of TARGET_X86_64 vs CODE64() in target-i386. > > So there are actually three different kinds of check here: > * TARGET_AARCH64 (or whatever we're using as the #define) > -- indicates whether this CPU supports 64 bit mode Yes, TARGET_AARCH64 is the define so we have this. > * a function that tests env to see if we're currently > running in 64 bit mode Using thumb as an example I added aarch64_state to serve the same purpose for 32 vs 64. I propose renaming this to just aarch64 and then testing it in is_a64. > * testing the DisasContext to see whether we're currently > translating for 64 or 32 bit [which is something to > initialize from the tb* at the top of > gen_intermediate_code_internal] This is what the new ARM_TBFLAG_AARCH64_STATE* defines are for so with some cleanup we have all three?
> > -- PMM