diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2016-10-12 09:47:00 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2016-10-17 09:41:58 +0200 |
commit | 20625a581de4faaf002a4cc3fa3ea29a9c7a04f7 (patch) | |
tree | cfa10114539fa2a917809e5075d7cbf9ca2525bc | |
parent | bsps/i386: replace global interrupt disable by SMP build supporting locking. (diff) | |
download | rtems-20625a581de4faaf002a4cc3fa3ea29a9c7a04f7.tar.bz2 |
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
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/make/custom/pc586.cfg | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/make/custom/pc686.cfg | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/make/custom/pc586.cfg b/c/src/lib/libbsp/i386/pc386/make/custom/pc586.cfg index 73e42cd4b9..6f9cfcbf5b 100644 --- a/c/src/lib/libbsp/i386/pc386/make/custom/pc586.cfg +++ b/c/src/lib/libbsp/i386/pc386/make/custom/pc586.cfg @@ -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 diff --git a/c/src/lib/libbsp/i386/pc386/make/custom/pc686.cfg b/c/src/lib/libbsp/i386/pc386/make/custom/pc686.cfg index 04f001f64a..b27e8ae1cb 100644 --- a/c/src/lib/libbsp/i386/pc386/make/custom/pc686.cfg +++ b/c/src/lib/libbsp/i386/pc386/make/custom/pc686.cfg @@ -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 |