pc386 BSP/master branch build failure with smp enabled.

Gedare Bloom gedare at rtems.org
Fri Sep 11 16:16:50 UTC 2020


Looks to be coming through

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?

On Fri, Sep 11, 2020 at 6:54 AM Karel Gardas <karel.gardas at centrum.cz> wrote:
>
>
> Hello,
>
> I've built 6/rtems-i386 tools using master branch of rtems-source-builder.
>
> $ i386-rtems6-gcc -v
> Using built-in specs.
> COLLECT_GCC=i386-rtems6-gcc
> COLLECT_LTO_WRAPPER=/export/home/karel/sfw/rtems/6-head-2020-09-11/libexec/gcc/i386-rtems6/10.2.1/lto-wrapper
> Target: i386-rtems6
> Configured with: ../gnu-mirror-gcc-75f5776/configure
> --prefix=/export/home/karel/sfw/rtems/6-head-2020-09-11
> --bindir=/export/home/karel/sfw/rtems/6-head-2020-09-11/bin
> --exec_prefix=/export/home/karel/sfw/rtems/6-head-2020-09-11
> --includedir=/export/home/karel/sfw/rtems/6-head-2020-09-11/include
> --libdir=/export/home/karel/sfw/rtems/6-head-2020-09-11/lib
> --libexecdir=/export/home/karel/sfw/rtems/6-head-2020-09-11/libexec
> --mandir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share/man
> --infodir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share/info
> --datadir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=i386-rtems6
> --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --verbose
> --with-newlib --disable-nls --without-included-gettext
> --disable-win32-registry --enable-version-specific-runtime-libs
> --disable-lto --enable-newlib-io-c99-formats --enable-newlib-iconv
> --enable-newlib-iconv-encodings=big5,cp775,cp850,cp852,cp855,cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,win_1253,win_1254,win_1255,win_1256,win_1257,win_1258
> --enable-threads --disable-plugin --enable-libgomp --enable-languages=c,c++
> Thread model: rtems
> Supported LTO compression algorithms: zlib
> gcc version 10.2.1 20200904 (RTEMS 6, RSB
> a81a237f3e2318d88a16b31aadb82333498e06fd, Newlib a0d7982) (GCC)
>
>
> I'm using those tools to build pc686 BSP with SMP enabled. The BSP is
> configured with:
>
> $ ../rtems-head/configure --prefix=$HOME/sfw/rtems/6-head-2020-09-11/
> --target=i386-rtems6 --enable-maintainer-mode --enable-rtemsbsp=pc686
> --enable-posix --enable-smp
>
> The build fails with:
>
> make[4]: Entering directory
> '/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/cpukit'
> depbase=`echo score/cpu/i386/cpu_asm.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> i386-rtems6-gcc --pipe -DHAVE_CONFIG_H   -I.
> -I/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/include
> -I/export/home/karel/git/rtems/rtems-head/cpukit/include
> -I/export/home/karel/git/rtems/rtems-head/cpukit/score/cpu/i386/include
> -I/export/home/karel/git/rtems/rtems-head/cpukit/libnetworking  -DASM
> -mtune=pentiumpro -march=pentium -O2 -g -ffunction-sections
> -fdata-sections -Wall -Wmissing-prototypes
> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs
> -mtune=pentiumpro -march=pentium -O2 -g -ffunction-sections
> -fdata-sections -Wall -Wmissing-prototypes
> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT
> score/cpu/i386/cpu_asm.o -MD -MP -MF $depbase.Tpo -c -o
> score/cpu/i386/cpu_asm.o
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S &&\
> mv -f $depbase.Tpo $depbase.Po
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:
> Assembler messages:
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:54: Error:
> `%edx' not allowed with `movb'
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:78: Warning:
> no instruction mnemonic suffix given and no register operands; using
> default for `bts'
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:93: Error:
> `%ecx' not allowed with `movb'
> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:118:
> Error: `%edx' not allowed with `movb'
> Makefile:11553: recipe for target 'score/cpu/i386/cpu_asm.o' failed
> make[4]: *** [score/cpu/i386/cpu_asm.o] Error 1
> make[4]: Leaving directory
> '/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/cpukit'
> Makefile:1272: recipe for target 'cpukit' failed
> make[3]: *** [cpukit] Error 2
>
> it seems the problematic code was added by the patch:
>
> commit 8937f12f1884f08c8a53fc339d60b1021846882a
> Author: Jan Sommer <jan.sommer at dlr.de>
> Date:   Sun May 31 16:22:54 2020 +0200
>
>     bsp/pc386: Update context switch and restore
>
>     Uses similar flow in cpu_asm.S for i386 as for arm.
>
>
> Shall I add a ticket for this or am I doing anything wrong/unexpected here?
>
> Thanks,
> Karel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list