Changeset c621f4aa in mainline for uspace/lib/c/arch/mips32
- Timestamp:
- 2010-07-25T10:11:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, 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/mips32
- Files:
-
- 1 added
- 21 moved
-
Makefile.common (added)
-
Makefile.inc (moved) (moved from uspace/lib/libc/arch/ia32/Makefile.inc ) (1 diff)
-
_link.ld.in (moved) (moved from uspace/lib/libc/arch/mips32/_link.ld.in ) (1 diff)
-
include/atomic.h (moved) (moved from uspace/lib/libc/arch/mips32/include/atomic.h ) (3 diffs)
-
include/config.h (moved) (moved from uspace/lib/libc/arch/mips32/include/config.h )
-
include/ddi.h (moved) (moved from uspace/lib/libc/arch/mips32/include/ddi.h )
-
include/faddr.h (moved) (moved from uspace/lib/libc/arch/mips32/include/faddr.h )
-
include/fibril.h (moved) (moved from uspace/lib/libc/arch/mips32/include/fibril.h )
-
include/inttypes.h (moved) (moved from uspace/lib/libc/arch/mips32/include/inttypes.h )
-
include/istate.h (moved) (moved from uspace/lib/libc/arch/mips32/include/istate.h )
-
include/limits.h (moved) (moved from uspace/lib/libc/arch/mips32/include/limits.h )
-
include/syscall.h (moved) (moved from uspace/lib/libc/arch/mips32/include/syscall.h )
-
include/thread.h (moved) (moved from uspace/lib/libc/arch/mips32/include/thread.h )
-
include/tls.h (moved) (moved from uspace/lib/libc/arch/mips32/include/tls.h )
-
include/types.h (moved) (moved from uspace/lib/libc/arch/mips32/include/types.h ) (3 diffs)
-
src/entry.s (moved) (moved from uspace/lib/libc/arch/mips32/src/entry.s )
-
src/fibril.S (moved) (moved from uspace/lib/libc/arch/mips32/src/fibril.S )
-
src/stacktrace.c (moved) (moved from uspace/lib/libc/arch/mips32/src/stacktrace.c )
-
src/stacktrace_asm.S (moved) (moved from uspace/lib/libc/arch/mips32/src/stacktrace_asm.S )
-
src/syscall.c (moved) (moved from uspace/lib/libc/arch/mips32/src/syscall.c )
-
src/thread_entry.s (moved) (moved from uspace/lib/libc/arch/mips32/src/thread_entry.s )
-
src/tls.c (moved) (moved from uspace/lib/libc/arch/mips32/src/tls.c )
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips32/Makefile.inc
r24a2517 rc621f4aa 27 27 # 28 28 29 ## Toolchain configuration 30 # 31 32 TARGET = i686-pc-linux-gnu 33 CLANG_ARCH = i386 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia32/bin 35 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.s \ 31 arch/$(UARCH)/src/thread_entry.s \ 32 arch/$(UARCH)/src/syscall.c \ 37 33 arch/$(UARCH)/src/fibril.S \ 38 34 arch/$(UARCH)/src/tls.c \ 39 arch/$(UARCH)/src/setjmp.S \40 35 arch/$(UARCH)/src/stacktrace.c \ 41 36 arch/$(UARCH)/src/stacktrace_asm.S 42 37 43 GCC_CFLAGS += -march=pentium 44 LFLAGS += -N 45 46 ENDIANESS = LE 47 48 BFD_NAME = elf32-i386 49 BFD_ARCH = i386 38 .PRECIOUS: arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/mips32/_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/mips32/include/atomic.h
r24a2517 rc621f4aa 27 27 */ 28 28 29 /** @addtogroup libcmips32 29 /** @addtogroup libcmips32 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @ingroup libcmips32eb 33 * @ingroup libcmips32eb 34 34 */ 35 35 … … 41 41 #include <atomicdflt.h> 42 42 43 #define atomic_inc(x) ((void) atomic_add(x, 1))44 #define atomic_dec(x) ((void) atomic_add(x, -1))43 #define atomic_inc(x) ((void) atomic_add(x, 1)) 44 #define atomic_dec(x) ((void) atomic_add(x, -1)) 45 45 46 #define atomic_postinc(x) (atomic_add(x, 1) - 1)47 #define atomic_postdec(x) (atomic_add(x, -1) + 1)46 #define atomic_postinc(x) (atomic_add(x, 1) - 1) 47 #define atomic_postdec(x) (atomic_add(x, -1) + 1) 48 48 49 #define atomic_preinc(x) atomic_add(x, 1)50 #define atomic_predec(x) atomic_add(x, -1)49 #define atomic_preinc(x) atomic_add(x, 1) 50 #define atomic_predec(x) atomic_add(x, -1) 51 51 52 52 /* Atomic addition of immediate value. 53 53 * 54 54 * @param val Memory location to which will be the immediate value added. 55 * @param i Signed immediate that will be added to *val.55 * @param i Signed immediate that will be added to *val. 56 56 * 57 57 * @return Value after addition. 58 * 58 59 */ 59 static inline long atomic_add(atomic_t *val, int i)60 static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i) 60 61 { 61 long tmp, v; 62 62 atomic_count_t tmp; 63 atomic_count_t v; 64 63 65 asm volatile ( 64 66 "1:\n" … … 70 72 /* nop */ /* nop is inserted automatically by compiler */ 71 73 " nop\n" 72 : "=&r" (tmp), "+m" (val->count), "=&r" (v) 73 : "r" (i), "i" (0) 74 ); 75 74 : "=&r" (tmp), 75 "+m" (val->count), 76 "=&r" (v) 77 : "r" (i), 78 "i" (0) 79 ); 80 76 81 return v; 77 82 } -
uspace/lib/c/arch/mips32/include/types.h
r24a2517 rc621f4aa 27 27 */ 28 28 29 /** @addtogroup libcmips32 29 /** @addtogroup libcmips32 30 30 * @{ 31 31 */ … … 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.
