From 2fe013a1452befd2b2f5e8da073346550ca686b0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 4 Apr 2011 16:45:01 +0000 Subject: 2011-04-04 Joel Sherrill PR 1768/bsps * shared/irq/irq_asm.S: The nbench benchmark highlighted the fact that we do not perform a cld before calling C code in the ISR. This was historically not a problem but gcc 4.3 changed the behavior. From http://gcc.gnu.org/gcc-4.3/changes.html --- c/src/lib/libbsp/i386/ChangeLog | 8 ++++++++ c/src/lib/libbsp/i386/shared/irq/irq_asm.S | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/c/src/lib/libbsp/i386/ChangeLog b/c/src/lib/libbsp/i386/ChangeLog index a0a02e8407..9848f8002b 100644 --- a/c/src/lib/libbsp/i386/ChangeLog +++ b/c/src/lib/libbsp/i386/ChangeLog @@ -1,3 +1,11 @@ +2011-04-04 Joel Sherrill + + PR 1768/bsps + * shared/irq/irq_asm.S: The nbench benchmark highlighted the fact that + we do not perform a cld before calling C code in the ISR. This was + historically not a problem but gcc 4.3 changed the behavior. From + http://gcc.gnu.org/gcc-4.3/changes.html + 2009-05-18 Joel Sherrill * shared/irq/irq.c, shared/irq/irq.h, shared/irq/irq_asm.S: Add shared diff --git a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S index c8f3df3b5e..fc53b54fdd 100644 --- a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S +++ b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S @@ -121,6 +121,13 @@ nested: movl ebp, esp popl ebp + /* + * GCC versions starting with 4.3 no longer place the cld + * instruction before string operations. We need to ensure + * it is set correctly for ISR handlers. + */ + cld + /* * restore the original i8259 masks */ -- cgit v1.2.3