bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \
bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \
bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \
+ bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \
cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
faultstatus.disabled faultstatus.stderr.exp \
bug125959-x86 \
bug126147-x86 \
bug132813-x86 \
+ bug135421-x86 \
cmpxchg8b cpuid \
faultstatus fcmovnu fpu_lazy_eflags fxtract \
getseg incdec_alt $(INSN_TESTS) \
--- /dev/null
+
+/* Test for long-form encodings of push %reg */
+
+#include <stdio.h>
+
+int foo ( int x )
+{
+ int block[2];
+ block[0] = x;
+ block[1] = 0;
+ __asm__ __volatile__(
+ "movl $0,%%edi\n\t"
+ "movl $0,%%esi\n\t"
+ "movl %0,%%edi\n\t"
+ ".byte 0xFF,0xF7\n\t" /*pushl %edi */
+ "popl %%esi\n\t"
+ "movl %%esi, %1"
+ : : /*in*/ "m"(block[0]), "m"(block[1]) : "esi","edi","memory"
+ );
+ return block[1];
+}
+
+int main ( void )
+{
+ int i;
+ for (i = 0; i < 100000000; i += 11111111)
+ printf("%d %d\n",i,foo(i));
+ return 0;
+}