Changeset ac47b7c2 in mainline
- Timestamp:
- 2009-06-18T08:30:50Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12956e57
- Parents:
- 553492be
- Files:
-
- 15 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r553492be rac47b7c2 45 45 # 46 46 47 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" 47 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__ 48 48 49 49 GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ 50 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32 -finput-charset=UTF-8\51 -f no-builtin -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Werror \52 - nostdlib -nostdinc -pipe50 -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ 51 -finput-charset=UTF-8 -fno-builtin -Wall -Wextra -Wno-unused-parameter \ 52 -Wmissing-prototypes -Werror -nostdlib -nostdinc -pipe 53 53 54 54 ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ -
kernel/arch/amd64/Makefile.inc
r553492be rac47b7c2 42 42 SUNCC_CFLAGS += -m64 -xmodel=kernel 43 43 44 DEFS += -D__64_BITS__ 44 BITS = 64 45 ENDIANESS = LE 45 46 46 47 ## Accepted CPUs -
kernel/arch/arm32/Makefile.inc
r553492be rac47b7c2 40 40 GCC_CFLAGS += -fno-zero-initialized-in-bss 41 41 42 DEFS += -D__32_BITS__ 42 BITS = 32 43 ENDIANESS = LE 43 44 44 45 ARCH_SOURCES = \ -
kernel/arch/ia32/Makefile.inc
r553492be rac47b7c2 36 36 TOOLCHAIN_DIR = $(CROSS_PREFIX)/i686 37 37 38 DEFS += -D__32_BITS__ 38 BITS = 32 39 ENDIANESS = LE 39 40 40 41 CMN1 = -m32 -
kernel/arch/ia64/Makefile.inc
r553492be rac47b7c2 42 42 AFLAGS += -mconstant-gp 43 43 44 DEFS += -D__64_BITS__ 44 BITS = 64 45 ENDIANESS = LE 45 46 46 47 ARCH_SOURCES = \ -
kernel/arch/mips32/Makefile.inc
r553492be rac47b7c2 37 37 GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 38 38 39 DEFS += -D__32_BITS__ 39 BITS = 32 40 40 41 41 ## Accepted MACHINEs … … 44 44 ifeq ($(MACHINE),lgxemul) 45 45 BFD_NAME = elf32-tradlittlemips 46 ENDIANESS = LE 46 47 endif 47 48 ifeq ($(MACHINE),bgxemul) … … 49 50 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips 50 51 TARGET = mips-linux-gnu 51 GCC_CFLAGS += -DBIG_ENDIAN 52 ENDIANESS = BE 53 GCC_CFLAGS += -D__BE__ 52 54 endif 53 55 ifeq ($(MACHINE),msim) 54 56 BFD_NAME = elf32-tradlittlemips 57 ENDIANESS = LE 55 58 GCC_CFLAGS += -mhard-float 56 59 endif -
kernel/arch/mips32/include/elf.h
r553492be rac47b7c2 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 36 36 #define KERN_mips32_ELF_H_ 37 37 38 # include <byteorder.h>38 #define ELF_MACHINE EM_MIPS 39 39 40 #define ELF_MACHINE EM_MIPS 41 42 #ifdef ARCH_IS_BIG_ENDIAN 43 # define ELF_DATA_ENCODING ELFDATA2MSB 40 #ifdef __BE__ 41 #define ELF_DATA_ENCODING ELFDATA2MSB 44 42 #else 45 # define ELF_DATA_ENCODINGELFDATA2LSB43 #define ELF_DATA_ENCODING ELFDATA2LSB 46 44 #endif 47 45 48 #define ELF_CLASS 46 #define ELF_CLASS ELFCLASS32 49 47 50 48 #endif -
kernel/arch/ppc32/Makefile.inc
r553492be rac47b7c2 40 40 LFLAGS += -no-check-sections -N 41 41 42 DEFS += -D__32_BITS__ 42 BITS = 32 43 ENDIANESS = BE 43 44 44 45 ARCH_SOURCES = \ -
kernel/arch/sparc64/Makefile.inc
r553492be rac47b7c2 41 41 LFLAGS += -no-check-sections -N 42 42 43 DEFS += -D__64_BITS__ 43 BITS = 64 44 ENDIANESS = BE 44 45 45 46 ifeq ($(PROCESSOR),us) -
kernel/generic/include/byteorder.h
r553492be rac47b7c2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_BYTEORDER_H_ 37 37 38 #include <arch/byteorder.h>39 38 #include <arch/types.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 -
kernel/generic/include/string.h
r553492be rac47b7c2 58 58 #define U_CURSOR 0x2588 59 59 60 #define U_BOM 0xfeff61 62 60 /**< No size limit constant */ 63 61 #define STR_NO_LIMIT ((size_t) -1) -
kernel/generic/src/printf/printf_core.c
r553492be rac47b7c2 302 302 if (str == NULL) 303 303 return printf_putstr(nullstr, ps); 304 305 if (*str == U_BOM)306 str++;307 304 308 305 /* Print leading spaces. */ -
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.