- Timestamp:
- 2009-06-18T08:30:50Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12956e57
- Parents:
- 553492be
- Location:
- uspace/lib
- Files:
-
- 8 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/Makefile
r553492be rac47b7c2 32 32 LIBC_PREFIX = $(shell pwd) 33 33 SOFTINT_PREFIX = ../softint 34 34 35 35 36 ## Setup toolchain -
uspace/lib/libc/Makefile.toolchain
r553492be rac47b7c2 28 28 29 29 CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \ 30 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32 -finput-charset=UTF-8 \ 31 -fno-builtin -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \ 32 -Werror-implicit-function-declaration -nostdlib -nostdinc -pipe -g 30 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 31 -finput-charset=UTF-8 -fno-builtin -Wall -Wextra -Wno-unused-parameter \ 32 -Wmissing-prototypes -Werror-implicit-function-declaration -nostdlib \ 33 -nostdinc -pipe -g -D__$(ENDIANESS)__ 33 34 LFLAGS = -M -N $(SOFTINT_PREFIX)/libsoftint.a 34 35 AFLAGS = -
uspace/lib/libc/arch/amd64/Makefile.inc
r553492be rac47b7c2 39 39 LFLAGS += -N 40 40 41 ENDIANESS = LE 42 41 43 BFD_NAME = elf64-x86-64 42 44 BFD_ARCH = i386:x86-64 -
uspace/lib/libc/arch/arm32/Makefile.inc
r553492be rac47b7c2 33 33 TARGET = arm-linux-gnu 34 34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin 35 CFLAGS += -ffixed-r9 -mtp=soft36 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a37 AFLAGS +=38 35 39 36 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ … … 42 39 arch/$(UARCH)/src/eabi.S 43 40 41 CFLAGS += -ffixed-r9 -mtp=soft 42 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a 43 44 ENDIANESS = LE 45 44 46 BFD_NAME = elf32-littlearm 45 47 BFD_ARCH = arm -
uspace/lib/libc/arch/ia32/Makefile.inc
r553492be rac47b7c2 40 40 LFLAGS += -N 41 41 42 ENDIANESS = LE 43 42 44 BFD_NAME = elf32-i386 43 45 BFD_ARCH = i386 -
uspace/lib/libc/arch/ia64/Makefile.inc
r553492be rac47b7c2 32 32 TARGET = ia64-pc-linux-gnu 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin 34 CFLAGS += -fno-unwind-tables -DMALLOC_ALIGNMENT_1635 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a36 AFLAGS +=37 34 38 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ … … 41 38 arch/$(UARCH)/src/ddi.c 42 39 40 CFLAGS += -fno-unwind-tables -DMALLOC_ALIGNMENT_16 41 LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a 42 43 ENDIANESS = LE 44 43 45 BFD_NAME = elf64-ia64-little 44 46 BFD_ARCH = ia64-elf64 -
uspace/lib/libc/arch/mips32/Makefile.inc
r553492be rac47b7c2 32 32 TARGET = mipsel-linux-gnu 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mipsel/bin 34 CFLAGS += -mips335 34 36 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ … … 38 37 arch/$(UARCH)/src/tls.c 39 38 39 CFLAGS += -mips3 40 41 ENDIANESS = LE 42 40 43 BFD_ARCH = mips 41 44 BFD_NAME = elf32-tradlittlemips -
uspace/lib/libc/arch/mips32eb/Makefile.inc
r553492be rac47b7c2 32 32 TARGET = mips-linux-gnu 33 33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips/bin 34 CFLAGS += -mips335 34 36 35 ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ … … 38 37 arch/$(UARCH)/src/tls.c 39 38 39 CFLAGS += -mips3 40 40 LFLAGS += -N 41 42 ENDIANESS = BE 41 43 42 44 BFD_ARCH = mips -
uspace/lib/libc/arch/ppc32/Makefile.inc
r553492be rac47b7c2 41 41 LFLAGS += -N 42 42 43 ENDIANESS = BE 44 43 45 BFD_NAME = elf32-powerpc 44 46 BFD_ARCH = powerpc:common -
uspace/lib/libc/arch/sparc64/Makefile.inc
r553492be rac47b7c2 39 39 LFLAGS += -no-check-sections -N 40 40 41 ENDIANESS = BE 42 41 43 BFD_NAME = elf64-sparc 42 44 BFD_ARCH = sparc -
uspace/lib/libc/generic/io/printf_core.c
r553492be rac47b7c2 301 301 if (str == NULL) 302 302 return printf_putstr(nullstr, ps); 303 304 if (*str == U_BOM)305 str++;306 303 307 304 /* Print leading spaces. */ -
uspace/lib/libc/include/byteorder.h
r553492be rac47b7c2 36 36 #define LIBC_BYTEORDER_H_ 37 37 38 #include <libarch/byteorder.h>39 38 #include <stdint.h> 40 39 41 #if !(defined( ARCH_IS_BIG_ENDIAN) ^ defined(ARCH_IS_LITTLE_ENDIAN))42 #error The architecture must be either big-endian or little-endian.40 #if !(defined(__BE__) ^ defined(__LE__)) 41 #error The architecture must be either big-endian or little-endian. 43 42 #endif 44 43 45 #ifdef ARCH_IS_BIG_ENDIAN44 #ifdef __BE__ 46 45 47 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n)48 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n)49 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n)46 #define uint16_t_le2host(n) (uint16_t_byteorder_swap(n)) 47 #define uint32_t_le2host(n) (uint32_t_byteorder_swap(n)) 48 #define uint64_t_le2host(n) (uint64_t_byteorder_swap(n)) 50 49 51 #define uint16_t_be2host(n) 52 #define uint32_t_be2host(n) 53 #define uint64_t_be2host(n) 50 #define uint16_t_be2host(n) (n) 51 #define uint32_t_be2host(n) (n) 52 #define uint64_t_be2host(n) (n) 54 53 55 #define host2uint16_t_le(n) uint16_t_byteorder_swap(n)56 #define host2uint32_t_le(n) uint32_t_byteorder_swap(n)57 #define host2uint64_t_le(n) uint64_t_byteorder_swap(n)54 #define host2uint16_t_le(n) (uint16_t_byteorder_swap(n)) 55 #define host2uint32_t_le(n) (uint32_t_byteorder_swap(n)) 56 #define host2uint64_t_le(n) (uint64_t_byteorder_swap(n)) 58 57 59 #define host2uint16_t_be(n) 60 #define host2uint32_t_be(n) 61 #define host2uint64_t_be(n) 58 #define host2uint16_t_be(n) (n) 59 #define host2uint32_t_be(n) (n) 60 #define host2uint64_t_be(n) (n) 62 61 63 62 #else 64 63 65 #define uint16_t_le2host(n) 66 #define uint32_t_le2host(n) 67 #define uint64_t_le2host(n) 64 #define uint16_t_le2host(n) (n) 65 #define uint32_t_le2host(n) (n) 66 #define uint64_t_le2host(n) (n) 68 67 69 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n)70 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n)71 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n)68 #define uint16_t_be2host(n) (uint16_t_byteorder_swap(n)) 69 #define uint32_t_be2host(n) (uint32_t_byteorder_swap(n)) 70 #define uint64_t_be2host(n) (uint64_t_byteorder_swap(n)) 72 71 73 #define host2uint16_t_le(n) 74 #define host2uint32_t_le(n) 75 #define host2uint64_t_le(n) 72 #define host2uint16_t_le(n) (n) 73 #define host2uint32_t_le(n) (n) 74 #define host2uint64_t_le(n) (n) 76 75 77 #define host2uint16_t_be(n) uint16_t_byteorder_swap(n)78 #define host2uint32_t_be(n) uint32_t_byteorder_swap(n)79 #define host2uint64_t_be(n) uint64_t_byteorder_swap(n)76 #define host2uint16_t_be(n) (uint16_t_byteorder_swap(n)) 77 #define host2uint32_t_be(n) (uint32_t_byteorder_swap(n)) 78 #define host2uint64_t_be(n) (uint64_t_byteorder_swap(n)) 80 79 81 80 #endif -
uspace/lib/libc/include/string.h
r553492be rac47b7c2 41 41 42 42 #define U_SPECIAL '?' 43 #define U_BOM 0xfeff44 43 45 44 /** No size limit constant */ -
uspace/lib/softfloat/Makefile
r553492be rac47b7c2 37 37 include $(LIBC_PREFIX)/Makefile.toolchain 38 38 39 CFLAGS += -Iinclude -Iarch/$(UARCH)/include/39 CFLAGS += -Iinclude -Iarch/$(UARCH)/include/ 40 40 41 41 ## Sources -
uspace/lib/softfloat/include/sftypes.h
r553492be rac47b7c2 27 27 */ 28 28 29 /** @addtogroup softfloat 29 /** @addtogroup softfloat 30 30 * @{ 31 31 */ … … 42 42 float f; 43 43 uint32_t binary; 44 45 struct 46 #if defined( ARCH_IS_BIG_ENDIAN)47 uint32_t sign :1;48 uint32_t exp :8;49 uint32_t fraction :23;50 #elif defined( ARCH_IS_LITTLE_ENDIAN)51 uint32_t fraction :23;52 uint32_t exp :8;53 uint32_t sign :1;54 #else 55 #error "Unknown endians." 44 45 struct { 46 #if defined(__BE__) 47 uint32_t sign : 1; 48 uint32_t exp : 8; 49 uint32_t fraction : 23; 50 #elif defined(__LE__) 51 uint32_t fraction : 23; 52 uint32_t exp : 8; 53 uint32_t sign : 1; 54 #else 55 #error Unknown endianess 56 56 #endif 57 57 } parts __attribute__ ((packed)); 58 59 58 } float32; 59 60 60 typedef union { 61 61 double d; 62 62 uint64_t binary; 63 63 64 struct 65 #if defined( ARCH_IS_BIG_ENDIAN)66 uint64_t sign :1;67 uint64_t exp :11;68 uint64_t fraction :52;69 #elif defined( ARCH_IS_LITTLE_ENDIAN)70 uint64_t fraction :52;71 uint64_t exp :11;72 uint64_t sign :1;73 #else 74 #error "Unknown endians." 64 struct { 65 #if defined(__BE__) 66 uint64_t sign : 1; 67 uint64_t exp : 11; 68 uint64_t fraction : 52; 69 #elif defined(__LE__) 70 uint64_t fraction : 52; 71 uint64_t exp : 11; 72 uint64_t sign : 1; 73 #else 74 #error Unknown endianess 75 75 #endif 76 77 76 } parts __attribute__ ((packed)); 77 } float64; 78 78 79 79 #define FLOAT32_MAX 0x7f800000 … … 110 110 #endif 111 111 112 113 /** @} 112 /** @} 114 113 */ 115
Note:
See TracChangeset
for help on using the changeset viewer.