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 * a function that tests env to see if we're currently running in 64 bit mode * 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] -- PMM