Il 02/04/2013 18:43, Peter Maydell ha scritto:
> On 2 April 2013 15:44, Paolo Bonzini <pbonz...@redhat.com> wrote:
>> This is no different from, for example, TARGET_LONG_BITS.  It does
>> not belong in configure.
> 
>> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
>> index 42c36e2..19d4e4c 100644
>> --- a/target-ppc/cpu.h
>> +++ b/target-ppc/cpu.h
>> @@ -27,6 +27,7 @@
>>  #if defined (TARGET_PPC64)
>>  /* PowerPC 64 definitions */
>>  #define TARGET_LONG_BITS 64
>> +#define TARGET_LONG_ALIGNMENT 8
>>  #define TARGET_PAGE_BITS 12
> 
> Doesn't this incorrectly set the long alignment to 8
> for ppc64abi32? (Probably similar problem for
> sparc32plus and mipsn32. The underlying point here is that
> alignment is an ABI decision and you can have more than one
> ABI for a particular TARGET_FOO.)

Hmm, seems like you're right _but_ I am not sure if the *current* code
is correct.  On real hardware, the CPUs are certainly not able to do
unaligned 32-bit accesses, and target_long/target_ulong pointers look
like they're never used for data that comes from target memory.  Rather,
they're used for by-reference passing into functions, and stuff like that.

What these targets want to have 32-bit alignment is really
abi_long/abi_ulong, and that's already okay.  Alex, Blue, Aurelien, can
you test the above three targets?

Paolo

Reply via email to