Summary: | Unknown instruction (bextr) in ld-2.15.so with --march=native on AMD FX-8350 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | SGT CAPSLOCK <sgtcapslock> |
Component: | vex | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED DUPLICATE | ||
Severity: | grave | CC: | 2BF406C3, b.buschinski, cpigat242, ivosh, olivier+kde, petr.pisar, sgtcapslock |
Priority: | NOR | ||
Version: | 3.8.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=381819 | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
support for TBM bextr
support for TBM bextr |
Description
SGT CAPSLOCK
2013-07-19 19:57:56 UTC
Created attachment 82347 [details]
support for TBM bextr
Thank you for the patch, however it does build with current (VEX r2772) code: make[3]: Entering directory `/home/petr/valgrind-devel/VEX' gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -Ipriv -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fomit-frame-pointer -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing -Wno-long-long -Wwrite-strings -fno-stack-protector -MT priv/libvex_amd64_linux_a-guest_amd64_toIR.o -MD -MP -MF priv/.deps/libvex_amd64_linux_a-guest_amd64_toIR.Tpo -c -o priv/libvex_amd64_linux_a-guest_amd64_toIR.o `test -f 'priv/guest_amd64_toIR.c' || echo './'`priv/guest_amd64_toIR.c priv/guest_amd64_toIR.c: In function ‘dis_ESC_0F3A__XOP’: priv/guest_amd64_toIR.c:30626:10: error: unknown type name ‘UCHAR’ priv/guest_amd64_toIR.c:30662:30: error: too many arguments to function ‘binop’ priv/guest_amd64_toIR.c:251:16: note: declared here priv/guest_amd64_toIR.c:30662:49: error: expected ‘)’ before ‘;’ token priv/guest_amd64_toIR.c:30663:13: error: too few arguments to function ‘binop’ priv/guest_amd64_toIR.c:251:16: note: declared here priv/guest_amd64_toIR.c:30663:13: error: expected ‘)’ before ‘}’ token priv/guest_amd64_toIR.c:30663:13: error: expected ‘;’ before ‘}’ token make[3]: *** [priv/libvex_amd64_linux_a-guest_amd64_toIR.o] Error 1 It actually does build even with r2763 which the patch has been diffed against. Created attachment 82427 [details]
support for TBM bextr
This is the original patch with three syntax errors fixed:
@@ -50,7 +50,7 @@
+ case 0x10:
+ if ((pfx & PFX_VEXnvvvv) == 0 && 0==getVexL(pfx)/*LZ*/) {
+ Int size = getRexW(pfx) ? 8 : 4, ctrl;
-+ UCHAR start, len, opsize;
++ UChar start, len, opsize;
+ IRType ty = szToITy(size);
+ IRTemp dst = newTemp(ty);
+ IRTemp src1 = newTemp(ty);
@@ -85,8 +85,8 @@
+ binop(
+ mkSizedOp(ty,Iop_Shl8),
+ mkexpr(src1),
-+ mkU8(opsize-start-len),
-+ mkU8(opsize - len));
++ mkU8(opsize-start-len)),
++ mkU8(opsize - len)));
+ }
+ } else {
+ if (start < opsize) {
I can confirm it fixes the reported problem for me.
The attached patch also fixed the problem for me. I can confirm the problem still exist. My ld’s version was 2.20. I forgot to add valgrind’s version was 3.10.1 and that I’m on AMD APU A10 5800K. Note, this is still an issue with 3.12.0, 3.13.0 and whichever version is the tip of the 3.14.0 version right now. The patch by "Petr Pisar" has been attached also to bug 381819. *** This bug has been marked as a duplicate of bug 381819 *** |