| Index: apps/iloader/Makefile | 
| — | — | @@ -9,7 +9,7 @@ | 
| 10 | 10 | OBJCOPY := $(CROSS)objcopy | 
| 11 | 11 | UCLPACK := ucl2e10singleblk | 
| 12 | 12 |  | 
| 13 |  | -CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections
 | 
|  | 13 | +CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t | 
| 14 | 14 | LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections | 
| 15 | 15 |  | 
| 16 | 16 | preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#") | 
| — | — | @@ -18,9 +18,11 @@ | 
| 19 | 19 | REVISION := $(shell svnversion .) | 
| 20 | 20 | REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//") | 
| 21 | 21 |  | 
|  | 22 | +HELPERS := build/__embios_armhelpers.o | 
|  | 23 | + | 
| 22 | 24 | SRC := $(call preprocesspaths,SOURCES,-I. -I..) | 
| 23 | 25 | OBJ := $(SRC:%.c=build/%.o) | 
| 24 |  | -OBJ := $(OBJ:%.S=build/%.o)
 | 
|  | 26 | +OBJ := $(OBJ:%.S=build/%.o) $(HELPERS) | 
| 25 | 27 |  | 
| 26 | 28 | all: $(NAME) themes | 
| 27 | 29 |  | 
| — | — | @@ -74,6 +76,15 @@ | 
| 75 | 77 | endif | 
| 76 | 78 | @rm -f $@.dep.tmp | 
| 77 | 79 |  | 
|  | 80 | +build/__embios_%.o: $(EMBIOSDIR)/export/%.S | 
|  | 81 | +	@echo [CC]     $< | 
|  | 82 | +ifeq ($(shell uname),WindowsNT) | 
|  | 83 | +	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@)) | 
|  | 84 | +else | 
|  | 85 | +	@-mkdir -p $(dir $@) | 
|  | 86 | +endif | 
|  | 87 | +	@$(CC) -c $(CFLAGS) -o $@ $< | 
|  | 88 | + | 
| 78 | 89 | build/version.h: version.h .svn/entries | 
| 79 | 90 | @echo [PP]     $< | 
| 80 | 91 | ifeq ($(shell uname),WindowsNT) | 
| Index: apps/uninstaller-nano2g/Makefile | 
| — | — | @@ -9,7 +9,7 @@ | 
| 10 | 10 | OBJCOPY := $(CROSS)objcopy | 
| 11 | 11 | UCLPACK := ucl2e10singleblk | 
| 12 | 12 |  | 
| 13 |  | -CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections
 | 
|  | 13 | +CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t | 
| 14 | 14 | LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections | 
| 15 | 15 |  | 
| 16 | 16 | preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#") | 
| — | — | @@ -18,9 +18,11 @@ | 
| 19 | 19 | REVISION := $(shell svnversion .) | 
| 20 | 20 | REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//") | 
| 21 | 21 |  | 
|  | 22 | +HELPERS := build/__embios_armhelpers.o | 
|  | 23 | + | 
| 22 | 24 | SRC := $(call preprocesspaths,SOURCES,-I. -I..) | 
| 23 | 25 | OBJ := $(SRC:%.c=build/%.o) | 
| 24 |  | -OBJ := $(OBJ:%.S=build/%.o)
 | 
|  | 26 | +OBJ := $(OBJ:%.S=build/%.o) $(HELPERS) | 
| 25 | 27 |  | 
| 26 | 28 | all: $(NAME) | 
| 27 | 29 |  | 
| — | — | @@ -74,6 +76,15 @@ | 
| 75 | 77 | endif | 
| 76 | 78 | @rm -f $@.dep.tmp | 
| 77 | 79 |  | 
|  | 80 | +build/__embios_%.o: $(EMBIOSDIR)/export/%.S | 
|  | 81 | +	@echo [CC]     $< | 
|  | 82 | +ifeq ($(shell uname),WindowsNT) | 
|  | 83 | +	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@)) | 
|  | 84 | +else | 
|  | 85 | +	@-mkdir -p $(dir $@) | 
|  | 86 | +endif | 
|  | 87 | +	@$(CC) -c $(CFLAGS) -o $@ $< | 
|  | 88 | + | 
| 78 | 89 | build/version.h: version.h .svn/entries | 
| 79 | 90 | @echo [PP]     $< | 
| 80 | 91 | ifeq ($(shell uname),WindowsNT) | 
| Index: apps/helloworld/Makefile | 
| — | — | @@ -9,7 +9,7 @@ | 
| 10 | 10 | OBJCOPY := $(CROSS)objcopy | 
| 11 | 11 | UCLPACK := ucl2e10singleblk | 
| 12 | 12 |  | 
| 13 |  | -CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections
 | 
|  | 13 | +CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t | 
| 14 | 14 | LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sections | 
| 15 | 15 |  | 
| 16 | 16 | preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#") | 
| — | — | @@ -18,9 +18,11 @@ | 
| 19 | 19 | REVISION := $(shell svnversion .) | 
| 20 | 20 | REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//") | 
| 21 | 21 |  | 
|  | 22 | +HELPERS := build/__embios_armhelpers.o | 
|  | 23 | + | 
| 22 | 24 | SRC := $(call preprocesspaths,SOURCES,-I. -I..) | 
| 23 | 25 | OBJ := $(SRC:%.c=build/%.o) | 
| 24 |  | -OBJ := $(OBJ:%.S=build/%.o)
 | 
|  | 26 | +OBJ := $(OBJ:%.S=build/%.o) $(HELPERS) | 
| 25 | 27 |  | 
| 26 | 28 | all: $(NAME) | 
| 27 | 29 |  | 
| — | — | @@ -74,6 +76,15 @@ | 
| 75 | 77 | endif | 
| 76 | 78 | @rm -f $@.dep.tmp | 
| 77 | 79 |  | 
|  | 80 | +build/__embios_%.o: $(EMBIOSDIR)/export/%.S | 
|  | 81 | +	@echo [CC]     $< | 
|  | 82 | +ifeq ($(shell uname),WindowsNT) | 
|  | 83 | +	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@)) | 
|  | 84 | +else | 
|  | 85 | +	@-mkdir -p $(dir $@) | 
|  | 86 | +endif | 
|  | 87 | +	@$(CC) -c $(CFLAGS) -o $@ $< | 
|  | 88 | + | 
| 78 | 89 | build/version.h: version.h .svn/entries build | 
| 79 | 90 | @echo [PP]     $< | 
| 80 | 91 | ifeq ($(shell uname),WindowsNT) | 
| Index: embios/trunk/arm/contextswitch.S | 
| — | — | @@ -59,6 +59,9 @@ | 
| 60 | 60 | swilist_start: | 
| 61 | 61 | b	panicf | 
| 62 | 62 | b	get_syscall_table | 
|  | 63 | +	b	__clzsi2 | 
|  | 64 | +	b	__aeabi_uidivmod | 
|  | 65 | +	b	__aeabi_idivmod | 
| 63 | 66 | swilist_end: | 
| 64 | 67 |  | 
| 65 | 68 | syscall_breakpoint: | 
| Index: embios/trunk/arm/arm-support.S | 
| — | — | @@ -673,6 +673,13 @@ | 
| 674 | 674 | #endif | 
| 675 | 675 |  | 
| 676 | 676 | #else | 
|  | 677 | +    .global __clzsi2 | 
|  | 678 | +    .type   __clzsi2, %function | 
|  | 679 | + | 
|  | 680 | +__clzsi2: | 
|  | 681 | +    clz	r0, r0 | 
|  | 682 | +    bx lr | 
|  | 683 | + | 
| 677 | 684 | #ifndef __ARM_EABI__ | 
| 678 | 685 | __udivsi3: | 
| 679 | 686 | ARMV5_UDIV32_BODY r0, r1, r0, "", r2, r3, ip, __div0_wrap, 1 | 
| Index: embios/trunk/export/armhelpers.S | 
| — | — | @@ -0,0 +1,57 @@ | 
|  | 2 | +@ | 
|  | 3 | +@ | 
|  | 4 | +@    Copyright 2010 TheSeven | 
|  | 5 | +@ | 
|  | 6 | +@ | 
|  | 7 | +@    This file is part of emBIOS. | 
|  | 8 | +@ | 
|  | 9 | +@    emBIOS is free software: you can redistribute it and/or | 
|  | 10 | +@    modify it under the terms of the GNU General Public License as | 
|  | 11 | +@    published by the Free Software Foundation, either version 2 of the | 
|  | 12 | +@    License, or (at your option) any later version. | 
|  | 13 | +@ | 
|  | 14 | +@    emBIOS is distributed in the hope that it will be useful, | 
|  | 15 | +@    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 16 | +@    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 
|  | 17 | +@    See the GNU General Public License for more details. | 
|  | 18 | +@ | 
|  | 19 | +@    You should have received a copy of the GNU General Public License | 
|  | 20 | +@    along with emBIOS.  If not, see <http://www.gnu.org/licenses/>. | 
|  | 21 | +@ | 
|  | 22 | +@ | 
|  | 23 | + | 
|  | 24 | + | 
|  | 25 | +    .section .text.__embios_armhelpers | 
|  | 26 | +    .global __clzsi2 | 
|  | 27 | +    .type   __clzsi2, %function | 
|  | 28 | +    .global __aeabi_uidivmod | 
|  | 29 | +    .type   __aeabi_uidivmod,%function | 
|  | 30 | +    .global __aeabi_uidiv | 
|  | 31 | +    .type   __aeabi_uidiv,%function | 
|  | 32 | +    .set    __aeabi_uidiv,__aeabi_uidivmod | 
|  | 33 | +    .global __aeabi_idivmod | 
|  | 34 | +    .type   __aeabi_idivmod,%function | 
|  | 35 | +    .global __aeabi_idiv | 
|  | 36 | +    .type   __aeabi_idiv,%function | 
|  | 37 | +    .set    __aeabi_idiv,__aeabi_idivmod | 
|  | 38 | + | 
|  | 39 | +__clzsi2: | 
|  | 40 | +    str lr, [sp,#-4]! | 
|  | 41 | +    swi 3 | 
|  | 42 | +    ldr	lr, [sp], #4 | 
|  | 43 | +    bx	lr | 
|  | 44 | +    .size __clzsi2, .-__clzsi2 | 
|  | 45 | + | 
|  | 46 | +__aeabi_uidivmod: | 
|  | 47 | +    str lr, [sp,#-4]! | 
|  | 48 | +    swi 4 | 
|  | 49 | +    ldr	lr, [sp], #4 | 
|  | 50 | +    bx	lr | 
|  | 51 | +    .size __aeabi_uidivmod, . - __aeabi_uidivmo | 
|  | 52 | + | 
|  | 53 | +__aeabi_idivmod: | 
|  | 54 | +    str lr, [sp,#-4]! | 
|  | 55 | +    swi 5 | 
|  | 56 | +    ldr	lr, [sp], #4 | 
|  | 57 | +    bx	lr | 
|  | 58 | +    .size __aeabi_idivmod, . - __aeabi_idivmod |