bsps/i386: use Pentimum instructions for pc586 and pc686 builds.

When GCC option -march is not specifies i386-rtems toolchain
defaults to i386 architecture instruction set. It does not
provide atomic instructions which results in really inefficient
atomic_fetch_or even on UP build.

SMP build is broken with i386 set because libatomic and GCC
generate infinite loop for __atomic_fetch_add_4 used
in rtems_interrupt_lock_acquire

__atomic_fetch_add_4:
    push   %ebp
    mov    %esp,%ebp
    movl   $0x5,0x10(%ebp)
    pop    %ebp
    jmp    __atomic_fetch_add_4
This commit is contained in:
Pavel Pisa
2016-10-12 09:47:00 +02:00
parent 6b54dcbbef
commit 20625a581d
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ RTEMS_CPU_MODEL=pentium
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
CPU_CFLAGS = -mtune=pentium
CPU_CFLAGS = -mtune=pentium -march=pentium
include $(RTEMS_ROOT)/make/custom/pc386.cfg

View File

@@ -6,7 +6,7 @@ RTEMS_CPU_MODEL=pentiumpro
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
CPU_CFLAGS = -mtune=pentiumpro
CPU_CFLAGS = -mtune=pentiumpro -march=pentium
include $(RTEMS_ROOT)/make/custom/pc386.cfg