https://bugs.kde.org/show_bug.cgi?id=402123

            Bug ID: 402123
           Summary: invalid assembler opcodes for mips32r2
           Product: valgrind
           Version: 3.14.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: vex
          Assignee: jsew...@acm.org
          Reporter: cote2004-git...@yahoo.com
  Target Milestone: ---

Created attachment 116918
  --> https://bugs.kde.org/attachment.cgi?id=116918&action=edit
Proposed patch

SUMMARY
Cross-compilation for openwrt fails for mips targets, when -mips32r2 is used.

STEPS TO REPRODUCE
1. clone openwrt master from https://git.openwrt.org/openwrt/openwrt.git
2. run make menuconfig.  
3. You may use default target (Atheros AR7xxx/AR9xxx)
4. Select valgrind under development
5. Turn on build log: Select Advanced configuration options, Enable log files
during build process
6. Run make

OBSERVED RESULT
../coregrind/link_tool_exe_linux 0x58000000 mips-openwrt-linux-musl-gcc  -Os
-pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
-msoft-float
-iremap/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/build_dir/target-mips_24kc_musl/valgrind-3.14.0:valgrind-3.14.0
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  
-L/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/staging_dir/target-mips_24kc_musl/usr/lib
-L/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/staging_dir/target-mips_24kc_musl/lib
-L/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/usr/lib
-L/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/lib
-znow -zrelro  -o memcheck-mips32-linux -flto -flto-partition=one
-fuse-linker-plugin -mips32 -mabi=32 -O2 -finline-functions -g -Wall
-Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes
-Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body
-Wformat -Wformat-security -Wignored-qualifiers -Wmissing-parameter-type
-Wlogical-op -Wold-style-declaration -fno-stack-protector -fno-strict-aliasing
-fno-builtin  -O2 -static -nodefaultlibs -nostartfiles -u __start -mips32
-mabi=32 memcheck_mips32_linux-mc_leakcheck.o
memcheck_mips32_linux-mc_malloc_wrappers.o memcheck_mips32_linux-mc_main.o
memcheck_mips32_linux-mc_main_asm.o memcheck_mips32_linux-mc_translate.o
memcheck_mips32_linux-mc_machine.o memcheck_mips32_linux-mc_errors.o
../coregrind/libcoregrind-mips32-linux.a ../VEX/libvex-mips32-linux.a -lgcc 
{standard input}: Assembler messages:
{standard input}:91297: Error: `fp=64' used with a 32-bit fpu
{standard input}:91320: Error: `fp=64' used with a 32-bit fpu
{standard input}:91341: Error: `fp=64' used with a 32-bit fpu
{standard input}:91362: Error: `fp=64' used with a 32-bit fpu
{standard input}:91383: Error: `fp=64' used with a 32-bit fpu
{standard input}:91404: Error: `fp=64' used with a 32-bit fpu
{standard input}:91425: Error: `fp=64' used with a 32-bit fpu
{standard input}:91446: Error: `fp=64' used with a 32-bit fpu
{standard input}:91467: Error: `fp=64' used with a 32-bit fpu
{standard input}:91488: Error: `fp=64' used with a 32-bit fpu
{standard input}:91509: Error: `fp=64' used with a 32-bit fpu
{standard input}:91530: Error: `fp=64' used with a 32-bit fpu
{standard input}:91551: Error: `fp=64' used with a 32-bit fpu
{standard input}:91572: Error: `fp=64' used with a 32-bit fpu
{standard input}:91593: Error: `fp=64' used with a 32-bit fpu
{standard input}:91597: Error: opcode not supported on this processor: mips32
(mips32) `ceil.l.s $f24,$f24'
{standard input}:91614: Error: `fp=64' used with a 32-bit fpu
{standard input}:91618: Error: opcode not supported on this processor: mips32
(mips32) `ceil.l.d $f24,$f24'
{standard input}:91635: Error: `fp=64' used with a 32-bit fpu
{standard input}:91639: Error: opcode not supported on this processor: mips32
(mips32) `cvt.d.l $f24,$f24'
{standard input}:91656: Error: `fp=64' used with a 32-bit fpu
{standard input}:91660: Error: opcode not supported on this processor: mips32
(mips32) `cvt.l.s $f24,$f24'
{standard input}:91677: Error: `fp=64' used with a 32-bit fpu
{standard input}:91681: Error: opcode not supported on this processor: mips32
(mips32) `cvt.l.d $f24,$f24'
{standard input}:91698: Error: `fp=64' used with a 32-bit fpu
{standard input}:91702: Error: opcode not supported on this processor: mips32
(mips32) `cvt.s.l $f24,$f24'
{standard input}:91719: Error: `fp=64' used with a 32-bit fpu
{standard input}:91723: Error: opcode not supported on this processor: mips32
(mips32) `floor.l.s $f24,$f24'
{standard input}:91740: Error: `fp=64' used with a 32-bit fpu
{standard input}:91744: Error: opcode not supported on this processor: mips32
(mips32) `floor.l.d $f24,$f24'
{standard input}:91761: Error: `fp=64' used with a 32-bit fpu
{standard input}:91765: Error: opcode not supported on this processor: mips32
(mips32) `round.l.s $f24,$f24'
{standard input}:91782: Error: `fp=64' used with a 32-bit fpu
{standard input}:91786: Error: opcode not supported on this processor: mips32
(mips32) `round.l.d $f24,$f24'
{standard input}:91803: Error: `fp=64' used with a 32-bit fpu
{standard input}:91807: Error: opcode not supported on this processor: mips32
(mips32) `trunc.l.s $f24,$f24'
{standard input}:91824: Error: `fp=64' used with a 32-bit fpu
{standard input}:91828: Error: opcode not supported on this processor: mips32
(mips32) `trunc.l.d $f24,$f24'
lto-wrapper: fatal error:
/opt/buildbot/slaves/lede-slave-tah/mips_24kc/build/sdk/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/bin/mips-openwrt-linux-musl-gcc
returned 1 exit status
compilation terminated.

EXPECTED RESULT
no errors :)

SOFTWARE/OS VERSIONS
Target:
openwrt fdd11a6eaeaec27d3129282cce2fc4fd3b1c1b61
linux 4.14.87
libc: musl-1.1.20

Toolchain:
mipsel-openwrt-linux-gcc version 7.3.0
mipsel-openwrt-linux-as version 2.31.1

Host version:
Linux 4.14.65

ADDITIONAL INFORMATION
I'm attaching a patch that allows me to compile, but I don't know if the check
I've changed is indeed correct, or if some mips32r2 machines support those
instructions or not.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to