Bug 249924

Summary: thumb decoder doesn't handle RBIT: disInstr(thumb): unhandled instruction: 0xFA90 0xF7A0
Product: [Developer tools] valgrind Reporter: Peter Maydell <peter.maydell>
Component: vexAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 3.6 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: valgrind -v output

Description Peter Maydell 2010-09-02 18:34:35 UTC
Created attachment 51245 [details]
valgrind -v output

I had a go at valgrinding gcc on this Pegatron ARM A8 board...

$ cat /tmp/hello.c
#include <stdio.h>
int main(void) {
   printf("hello world\n");
   return 0;
}
./vg-in-place -v --trace-children=yes gcc -g -Wall -O2 -o /tmp/hello /tmp/hello.c
[...]
==10711== Memcheck, a memory error detector
==10711== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==10711== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
==10711== Command: /usr/lib/gcc/arm-linux-gnueabi/4.4.4/cc1 -quiet /tmp/hello.c -D_FORTIFY_SOURCE=2 -quiet -dumpbase hello.c -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -auxbase hello -g -O2 -Wall -fstack-protector -o /tmp/ccjSiDVb.s
[...]
disInstr(thumb): unhandled instruction: 0xFA90 0xF7A0
==10711== valgrind: Unrecognised instruction at address 0x2d7dc3.

(Full valgrind -v log attached).

0xFA90 0xF7A0 is "RBIT r7, r0" in encoding T1. (I think we're missing the ARM encoding as well.)
Comment 1 Julian Seward 2010-09-02 23:04:37 UTC
Thumb fix committed as r2026.
Comment 2 Peter Maydell 2010-09-02 23:35:36 UTC
Thanks. With that fix valgrind successfully runs gcc.
Comment 3 Peter Maydell 2010-10-12 18:06:45 UTC
The ARM A1 encoding for RBIT was implemented in VEX r2042, so this bug could be closed now, right?