diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-04 21:04:39 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-11-22 16:35:07 +0100 |
commit | f1738ed619ed01199535410887a81c6ac99e482c (patch) | |
tree | 2578ed634fd96ffc933ec3470e2d06ff82cd8e5a /cpukit/score/cpu/m68k/rtems/score/cpu.h | |
parent | score: Inline _API_extensions_Run_postswitch() (diff) | |
download | rtems-f1738ed619ed01199535410887a81c6ac99e482c.tar.bz2 |
score: PR1607: Add and use CPU_SIZEOF_POINTER
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/m68k/rtems/score/cpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index 013f1b51ce..89b0295f60 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -380,6 +380,8 @@ SCORE_EXTERN _CPU_ISR_handler_entry _CPU_ISR_jump_table[256]; */ #define CPU_PRIORITY_MAXIMUM M68K_CPU_PRIORITY_MAXIMUM +#define CPU_SIZEOF_POINTER 4 + /* * m68k is pretty tolerant of alignment. Just put things on 4 byte boundaries. */ |