From 9c24c7332c1ae6a24078449a401ae3b217a7b945 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 4 Apr 2011 16:44:46 +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/shared/irq/irq_asm.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'c/src/lib/libbsp/i386/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 d899f47448..f994073f54 100644 --- a/c/src/lib/libbsp/i386/shared/irq/irq_asm.S +++ b/c/src/lib/libbsp/i386/shared/irq/irq_asm.S @@ -167,6 +167,13 @@ nested: incl PER_CPU_ISR_NEST_LEVEL(ebx) /* one nest level deeper */ incl SYM (_Thread_Dispatch_disable_level) /* disable multitasking */ + /* + * 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 + /* * re-enable interrupts at processor level as the current * interrupt source is now masked via i8259 -- cgit v1.2.3