[PATCH v3] score: PR1607: Add and use CPU_SIZEOF_POINTER
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Nov 8 09:52:21 UTC 2012
On 11/08/2012 10:33 AM, Ralf Corsepius wrote:
> On 11/08/2012 09:27 AM, Sebastian Huber wrote:
>> Add and use new CPU port define CPU_SIZEOF_POINTER. It must be an
>> integer literal that can be used by the assembler. This value will be
>> used to calculate offsets of structure members. These offsets will be
>> used in assembler code.
>>
>> The size of a pointer is part of the application binary interface (ABI)
>> and thus independent of the actual programming language. The compiler
>> will provide defines to determine the current ABI. We use these defines
>> to select the appropriate CPU_SIZEOF_POINTER value.
>>
>> Static assertions in the new file "cpukit/score/src/percpuasm.c" will
>> ensure that the value of CPU_SIZEOF_POINTER is consistent with the
>> current compiler settings. Also the offset values used by assembler
>> code are verfied.
>
> Again, this approach lacks generality and is fundametally flawed.
Please be more specific. I don't understand what you mean.
>
> It's just a random accident it appears to work for some targets.
Please provide a counter example.
Independent of potential problems with this patch, I think it is better than
the current state.
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list