#4076 closed defect (fixed)

i386: bad asm in smp mode

Reported by: Gedare Bloom Owned by: Gedare Bloom
Priority: normal Milestone: 6.1
Component: arch/i386 Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Gedare Bloom)

A note for me (or someone) to make the fix outlined on the mailing list.

cpukit/score/cpu/i386/include/rtems/asm.h:157   movb
imps_apic_cpu_map(\REG),\REG        /* CPU ID in REG */

The assembler is right to complain. movb has to target one of the
1-byte mnemonics, so this should be %al for the LSB of %eax. One needs
to check through this logic carefully, but I think the right thing to
do here is:
movzbl     imps_apic_cpu_map(\REG),\REG

That should do the trick. Can you test it locally?

Sure! Builds fine and testsuite testing reveals:

Change History (3)

comment:1 Changed on Sep 12, 2020 at 2:26:07 PM by Gedare Bloom

Description: modified (diff)
Milestone: 5.16.1
Version: 56

comment:2 Changed on Sep 12, 2020 at 2:55:37 PM by Joel Sherrill

This should be fixed on the 5 branch as well for safety.

comment:3 Changed on Sep 12, 2020 at 3:13:14 PM by Gedare Bloom <gedare@…>

Resolution: fixed
Status: assignedclosed

In 9f096f4/rtems:

i386/score: fix assembly mnemonic

Closes #4076.

Note: See TracTickets for help on using tickets.