From f1738ed619ed01199535410887a81c6ac99e482c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sun, 4 Nov 2012 21:04:39 +0100 Subject: 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. --- cpukit/score/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'cpukit/score/Makefile.am') diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index 1b3d13bee9..cc252db0b9 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -158,6 +158,7 @@ libscore_a_SOURCES += src/coremutex.c src/coremutexflush.c \ ## CORE_PERCPU_C_FILES libscore_a_SOURCES += src/percpu.c +libscore_a_SOURCES += src/percpuasm.c ## CORE_RWLOCK_C_FILES if HAS_PTHREADS -- cgit v1.2.3