]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Change compiler options
authorGraeme Russ <graeme.russ@gmail.com>
Thu, 7 Oct 2010 09:03:23 +0000 (20:03 +1100)
committerGraeme Russ <graeme.russ@gmail.com>
Thu, 7 Oct 2010 09:03:23 +0000 (20:03 +1100)
Change to:
 - reparam=3
 - no-from-pointer
 - no-stack-protector
 - preferred-stack-boundary=2
 - no-top-level-reorder

These options make the code a little smaller and faster

arch/i386/config.mk
arch/i386/cpu/interrupts.c
arch/i386/cpu/start.S
arch/i386/include/asm/interrupt.h

index 0e80a1ae5847c9a11cf7021e294be6403297492f..8743f1a66320fcadef963da026d044dddf8f1fab 100644 (file)
@@ -25,6 +25,14 @@ CROSS_COMPILE ?= i386-linux-
 
 STANDALONE_LOAD_ADDR = 0x40000
 
+PLATFORM_CPPFLAGS += -fno-strict-aliasing
+PLATFORM_CPPFLAGS += -Wstrict-prototypes
+PLATFORM_CPPFLAGS += -mregparm=3
+PLATFORM_CPPFLAGS += -fomit-frame-pointer
+PLATFORM_CPPFLAGS += $(call cc-option, -ffreestanding)
+PLATFORM_CPPFLAGS += $(call cc-option, -fno-toplevel-reorder,  $(call cc-option, -fno-unit-at-a-time))
+PLATFORM_CPPFLAGS += $(call cc-option, -fno-stack-protector)
+PLATFORM_CPPFLAGS += $(call cc-option, -mpreferred-stack-boundary=2)
 PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
 
 LDFLAGS += --cref --gc-sections
index 51023f3a86f0285ea047823d3b69a8f10c065154..47a7a290130257a4838b28c8b10d3163a25b4490 100644 (file)
@@ -225,7 +225,7 @@ int disable_interrupts(void)
 }
 
 /* IRQ Low-Level Service Routine */
-__isr__ irq_llsr(struct pt_regs *regs)
+void irq_llsr(struct pt_regs *regs)
 {
        /*
         * For detailed description of each exception, refer to:
@@ -370,12 +370,7 @@ asm(".globl irq_common_entry\n" \
        "pushl %ecx\n" \
        "pushl %ebx\n" \
        "mov   %esp, %eax\n" \
-       "pushl %ebp\n" \
-       "movl %esp,%ebp\n" \
-       "pushl %eax\n" \
        "call irq_llsr\n" \
-       "popl %eax\n" \
-       "leave\n"\
        "popl %ebx\n" \
        "popl %ecx\n" \
        "popl %edx\n" \
index f67a1b7a6e99a47e8ca212dd043d1adc2c7449d4..90dfd5d210be2694726c9f914e287b21e7e67d58 100644 (file)
@@ -149,16 +149,10 @@ stack_ok:
 
        wbinvd
 
-       /* Get upper memory limit */
-       movl    %esp, %ecx
-       subl    $CONFIG_SYS_STACK_SIZE, %ecx
+       /* Set the upper memory limit parameter */
+       movl    %esp, %eax
+       subl    $CONFIG_SYS_STACK_SIZE, %eax
 
-       /* Create a Stack Frame */
-       pushl   %ebp
-       movl    %esp, %ebp
-
-       /* stack_limit parameter */
-       pushl   %ecx
        call    board_init_f    /* Enter, U-boot! */
 
        /* indicate (lack of) progress */
index 07426fe6a7a08685b443568f04a898e64769eeae..99ae8437b88750fde56544250b62dbb6b3c05ba2 100644 (file)
@@ -41,6 +41,4 @@ void specific_eoi(int irq);
 
 extern char exception_stack[];
 
-#define __isr__ void __attribute__ ((regparm(0)))
-
 #endif