Changeset c621f4aa in mainline for uspace/lib/c/arch/arm32
- Timestamp:
- 2010-07-25T10:11:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 377cce8
- Parents:
- 24a2517 (diff), a2da43c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch/arm32
- Files:
-
- 1 added
- 23 moved
-
Makefile.common (added)
-
Makefile.inc (moved) (moved from uspace/lib/libc/arch/arm32/Makefile.inc ) (2 diffs)
-
_link.ld.in (moved) (moved from uspace/lib/libc/arch/arm32/_link.ld.in ) (1 diff)
-
include/atomic.h (moved) (moved from uspace/lib/libc/arch/arm32/include/atomic.h ) (12 diffs)
-
include/config.h (moved) (moved from uspace/lib/libc/arch/arm32/include/config.h )
-
include/ddi.h (moved) (moved from uspace/lib/libc/arch/arm32/include/ddi.h )
-
include/faddr.h (moved) (moved from uspace/lib/libc/arch/arm32/include/faddr.h )
-
include/fibril.h (moved) (moved from uspace/lib/libc/arch/arm32/include/fibril.h )
-
include/inttypes.h (moved) (moved from uspace/lib/libc/arch/arm32/include/inttypes.h )
-
include/istate.h (moved) (moved from uspace/lib/libc/arch/arm32/include/istate.h )
-
include/limits.h (moved) (moved from uspace/lib/libc/arch/arm32/include/limits.h )
-
include/stackarg.h (moved) (moved from uspace/lib/libc/arch/arm32/include/stackarg.h )
-
include/syscall.h (moved) (moved from uspace/lib/libc/arch/arm32/include/syscall.h )
-
include/thread.h (moved) (moved from uspace/lib/libc/arch/arm32/include/thread.h )
-
include/tls.h (moved) (moved from uspace/lib/libc/arch/arm32/include/tls.h )
-
include/types.h (moved) (moved from uspace/lib/libc/arch/arm32/include/types.h ) (3 diffs)
-
src/eabi.S (moved) (moved from uspace/lib/libc/arch/arm32/src/eabi.S )
-
src/entry.s (moved) (moved from uspace/lib/libc/arch/arm32/src/entry.s )
-
src/fibril.S (moved) (moved from uspace/lib/libc/arch/arm32/src/fibril.S )
-
src/stacktrace.c (moved) (moved from uspace/lib/libc/arch/arm32/src/stacktrace.c )
-
src/stacktrace_asm.S (moved) (moved from uspace/lib/libc/arch/arm32/src/stacktrace_asm.S )
-
src/syscall.c (moved) (moved from uspace/lib/libc/arch/arm32/src/syscall.c )
-
src/thread_entry.s (moved) (moved from uspace/lib/libc/arch/arm32/src/thread_entry.s )
-
src/tls.c (moved) (moved from uspace/lib/libc/arch/arm32/src/tls.c )
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/arm32/Makefile.inc
r24a2517 rc621f4aa 28 28 # 29 29 30 ## Toolchain configuration 31 # 32 33 TARGET = arm-linux-gnu 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin 35 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ 30 ARCH_SOURCES = \ 31 arch/$(UARCH)/src/entry.s \ 32 arch/$(UARCH)/src/thread_entry.s \ 33 arch/$(UARCH)/src/syscall.c \ 37 34 arch/$(UARCH)/src/fibril.S \ 38 35 arch/$(UARCH)/src/tls.c \ … … 41 38 arch/$(UARCH)/src/stacktrace_asm.S 42 39 43 GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer 44 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a 45 46 ENDIANESS = LE 47 48 BFD_NAME = elf32-littlearm 49 BFD_ARCH = arm 40 .PRECIOUS: arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/arm32/_link.ld.in
r24a2517 rc621f4aa 1 STARTUP(LIBC_P REFIX/arch/UARCH/src/entry.o)1 STARTUP(LIBC_PATH/arch/UARCH/src/entry.o) 2 2 ENTRY(__entry) 3 3 -
uspace/lib/c/arch/arm32/include/atomic.h
r24a2517 rc621f4aa 27 27 */ 28 28 29 /** @addtogroup libcarm32 29 /** @addtogroup libcarm32 30 30 * @{ 31 31 */ … … 38 38 39 39 #define LIBC_ARCH_ATOMIC_H_ 40 #define CAS 40 #define CAS 41 41 42 42 #include <atomicdflt.h> … … 46 46 extern uintptr_t *ras_page; 47 47 48 static inline bool cas(atomic_t *val, long ov, longnv)49 { 50 longret = 0;51 48 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv) 49 { 50 atomic_count_t ret = 0; 51 52 52 /* 53 53 * The following instructions between labels 1 and 2 constitute a … … 75 75 : "memory" 76 76 ); 77 77 78 78 ras_page[0] = 0; 79 asm volatile ("" ::: "memory"); 79 asm volatile ( 80 "" ::: "memory" 81 ); 80 82 ras_page[1] = 0xffffffff; 81 83 82 84 return (bool) ret; 83 85 } … … 89 91 * 90 92 * @return Value after addition. 91 */ 92 static inline long atomic_add(atomic_t *val, int i) 93 { 94 long ret = 0; 95 93 * 94 */ 95 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i) 96 { 97 atomic_count_t ret = 0; 98 96 99 /* 97 100 * The following instructions between labels 1 and 2 constitute a … … 115 118 : [imm] "r" (i) 116 119 ); 117 120 118 121 ras_page[0] = 0; 119 asm volatile ("" ::: "memory"); 122 asm volatile ( 123 "" ::: "memory" 124 ); 120 125 ras_page[1] = 0xffffffff; 121 126 122 127 return ret; 123 128 } … … 127 132 * 128 133 * @param val Variable to be incremented. 134 * 129 135 */ 130 136 static inline void atomic_inc(atomic_t *val) … … 137 143 * 138 144 * @param val Variable to be decremented. 145 * 139 146 */ 140 147 static inline void atomic_dec(atomic_t *val) … … 148 155 * @param val Variable to be incremented. 149 156 * @return Value after incrementation. 150 */ 151 static inline long atomic_preinc(atomic_t *val) 157 * 158 */ 159 static inline atomic_count_t atomic_preinc(atomic_t *val) 152 160 { 153 161 return atomic_add(val, 1); … … 159 167 * @param val Variable to be decremented. 160 168 * @return Value after decrementation. 161 */ 162 static inline long atomic_predec(atomic_t *val) 169 * 170 */ 171 static inline atomic_count_t atomic_predec(atomic_t *val) 163 172 { 164 173 return atomic_add(val, -1); … … 170 179 * @param val Variable to be incremented. 171 180 * @return Value before incrementation. 172 */ 173 static inline long atomic_postinc(atomic_t *val) 181 * 182 */ 183 static inline atomic_count_t atomic_postinc(atomic_t *val) 174 184 { 175 185 return atomic_add(val, 1) - 1; … … 181 191 * @param val Variable to be decremented. 182 192 * @return Value before decrementation. 183 */ 184 static inline long atomic_postdec(atomic_t *val) 193 * 194 */ 195 static inline atomic_count_t atomic_postdec(atomic_t *val) 185 196 { 186 197 return atomic_add(val, -1) + 1; -
uspace/lib/c/arch/arm32/include/types.h
r24a2517 rc621f4aa 27 27 */ 28 28 29 /** @addtogroup libcarm32 29 /** @addtogroup libcarm32 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file 33 33 * @brief Definitions of basic types like #uintptr_t. 34 34 */ … … 39 39 #define __32_BITS__ 40 40 41 typedef unsigned int sysarg_t; 41 #include <libarch/common.h> 42 42 43 typedef char int8_t; 44 typedef short int int16_t; 45 typedef long int int32_t; 46 typedef long long int int64_t; 43 #define SIZE_MIN UINT32_MIN 44 #define SIZE_MAX UINT32_MAX 47 45 48 typedef unsigned char uint8_t; 49 typedef unsigned short int uint16_t; 50 typedef unsigned long int uint32_t; 51 typedef u nsigned long long int uint64_t;46 #define SSIZE_MIN INT32_MIN 47 #define SSIZE_MAX INT32_MAX 48 49 typedef uint32_t sysarg_t; 52 50 53 51 typedef int32_t ssize_t; … … 55 53 56 54 typedef uint32_t uintptr_t; 55 typedef uint32_t atomic_count_t; 56 typedef int32_t atomic_signed_t; 57 57 58 58 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
