badseg.stderr.exp badseg.stdout.exp badseg.vgtest \
bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \
bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
+ bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \
bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \
cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
check_PROGRAMS = \
badseg bt_everything bt_literal \
+ bug125959-x86 \
bug132813-x86 \
cmpxchg8b cpuid \
faultstatus fcmovnu fpu_lazy_eflags fxtract \
--- /dev/null
+
+#include <stdio.h>
+
+unsigned char buf[256];
+
+static int lookup ( int i )
+{
+ int block[3];
+ block[0] = (int)&buf[0];
+ block[1] = i;
+ block[2] = 0;
+ __asm__ __volatile__(
+ "movl %0,%%esi\n\t"
+ "movl 0(%%esi),%%ebx\n\t"
+ "movl 4(%%esi),%%eax\n\t"
+ "xlat\n\t"
+ "movl %%eax,8(%%esi)\n\t"
+ : : /*in*/"r"(block) : "esi", "ebx", "eax", "memory", "cc"
+ );
+ return block[2];
+}
+
+int main(void)
+{
+ int i, j;
+ for (i = 0; i < 256; i++)
+ buf[i] = (unsigned char) i;
+
+ j = 0;
+ for (i = 0; i < 130; i++) {
+ printf("%08x\n", lookup(j));
+ j += 0x01000001;
+ }
+
+ return 0;
+}