Jakub Jelinek 0332e1
--- valgrind/VEX/priv/guest_amd64_toIR.c.jj	2009-10-21 22:46:40.000000000 +0200
Jakub Jelinek 0332e1
+++ valgrind/VEX/priv/guest_amd64_toIR.c	2009-10-27 20:33:43.000000000 +0100
Jakub Jelinek 0332e1
@@ -14278,18 +14278,20 @@ DisResult disInstr_AMD64_WRK ( 
Jakub Jelinek 0332e1
       if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
       delta = dis_op_imm_A( 1, True, Iop_Add8, True, delta, "adc" );
Jakub Jelinek 0332e1
       break;
Jakub Jelinek 0332e1
-//.. //--    case 0x15: /* ADC Iv, eAX */
Jakub Jelinek 0332e1
-//.. //--       delta = dis_op_imm_A( sz, ADC, True, delta, "adc" );
Jakub Jelinek 0332e1
-//.. //--       break;
Jakub Jelinek 0332e1
+   case 0x15: /* ADC Iv, eAX */
Jakub Jelinek 0332e1
+      if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
+      delta = dis_op_imm_A( sz, True, Iop_Add8, True, delta, "adc" );
Jakub Jelinek 0332e1
+      break;
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
    case 0x1C: /* SBB Ib, AL */
Jakub Jelinek 0332e1
       if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
       delta = dis_op_imm_A( 1, True, Iop_Sub8, True, delta, "sbb" );
Jakub Jelinek 0332e1
       break;
Jakub Jelinek 0332e1
-//.. //--    case 0x1D: /* SBB Iv, eAX */
Jakub Jelinek 0332e1
-//.. //--       delta = dis_op_imm_A( sz, SBB, True, delta, "sbb" );
Jakub Jelinek 0332e1
-//.. //--       break;
Jakub Jelinek 0332e1
-//.. //-- 
Jakub Jelinek 0332e1
+   case 0x1D: /* SBB Iv, eAX */
Jakub Jelinek 0332e1
+      if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
+      delta = dis_op_imm_A( sz, True, Iop_Sub8, True, delta, "sbb" );
Jakub Jelinek 0332e1
+      break;
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
    case 0x24: /* AND Ib, AL */
Jakub Jelinek 0332e1
       if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
       delta = dis_op_imm_A( 1, False, Iop_And8, True, delta, "and" );
Jakub Jelinek 0332e1
@@ -14364,9 +14366,10 @@ DisResult disInstr_AMD64_WRK ( 
Jakub Jelinek 0332e1
       delta = dis_op2_E_G ( vbi, pfx, True, Iop_Add8, True, sz, delta, "adc" );
Jakub Jelinek 0332e1
       break;
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
-//.. //--    case 0x1A: /* SBB Eb,Gb */
Jakub Jelinek 0332e1
-//.. //--       delta = dis_op2_E_G ( sorb, True, SBB, True, 1, delta, "sbb" );
Jakub Jelinek 0332e1
-//.. //--       break;
Jakub Jelinek 0332e1
+   case 0x1A: /* SBB Eb,Gb */
Jakub Jelinek 0332e1
+      if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
+      delta = dis_op2_E_G ( vbi, pfx, True, Iop_Sub8, True, 1, delta, "sbb" );
Jakub Jelinek 0332e1
+      break;
Jakub Jelinek 0332e1
    case 0x1B: /* SBB Ev,Gv */
Jakub Jelinek 0332e1
       if (haveF2orF3(pfx)) goto decode_failure;
Jakub Jelinek 0332e1
       delta = dis_op2_E_G ( vbi, pfx, True, Iop_Sub8, True, sz, delta, "sbb" );
Jakub Jelinek 0332e1
--- valgrind/none/tests/x86/sbbmisc.stdout.exp.jj	2009-10-09 12:52:02.000000000 +0200
Jakub Jelinek 0332e1
+++ valgrind/none/tests/x86/sbbmisc.stdout.exp	2009-10-27 20:50:15.000000000 +0100
Jakub Jelinek 0332e1
@@ -5,3 +5,6 @@ r4 = 11 10
Jakub Jelinek 0332e1
 r5 = -11 -12
Jakub Jelinek 0332e1
 r6 = -69 -68
Jakub Jelinek 0332e1
 r7 = -113 -112
Jakub Jelinek 0332e1
+r8 = 104 105
Jakub Jelinek 0332e1
+r9 = -14982 -14981
Jakub Jelinek 0332e1
+r10 = -267879790 -267879789
Jakub Jelinek 0332e1
--- valgrind/none/tests/x86/sbbmisc.c.jj	2009-10-09 12:52:02.000000000 +0200
Jakub Jelinek 0332e1
+++ valgrind/none/tests/x86/sbbmisc.c	2009-10-27 20:48:00.000000000 +0100
Jakub Jelinek 0332e1
@@ -140,7 +140,58 @@ VG_SYM(adc_eb_gb_2) ":\n"
Jakub Jelinek 0332e1
 "\tret\n"
Jakub Jelinek 0332e1
 );
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
+extern void adc_ib_al ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_ib_al) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
+"\tret\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_iw_ax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_iw_ax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tret\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_il_eax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_il_eax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tret\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
 int main ( void )
Jakub Jelinek 0332e1
@@ -177,5 +228,17 @@ int main ( void )
Jakub Jelinek 0332e1
    adc_eb_gb_2();
Jakub Jelinek 0332e1
    printf("r7 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
+   in_b = 99;
Jakub Jelinek 0332e1
+   adc_ib_al();
Jakub Jelinek 0332e1
+   printf("r8 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_w = 49999;
Jakub Jelinek 0332e1
+   adc_iw_ax();
Jakub Jelinek 0332e1
+   printf("r9 = %d %d\n", (int)out_w1, (int)out_w2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_l = 0xF0000000;
Jakub Jelinek 0332e1
+   adc_il_eax();
Jakub Jelinek 0332e1
+   printf("r10 = %d %d\n", (int)out_l1, (int)out_l2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
    return 0;
Jakub Jelinek 0332e1
 }
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/sbbmisc.vgtest.jj	2009-10-27 20:50:44.000000000 +0100
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/sbbmisc.vgtest	2009-10-09 12:52:02.000000000 +0200
Jakub Jelinek 0332e1
@@ -0,0 +1 @@
Jakub Jelinek 0332e1
+prog: sbbmisc
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/sbbmisc.stdout.exp.jj	2009-10-27 20:50:41.000000000 +0100
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/sbbmisc.stdout.exp	2009-10-27 20:50:15.000000000 +0100
Jakub Jelinek 0332e1
@@ -0,0 +1,10 @@
Jakub Jelinek 0332e1
+r1 = 94 93
Jakub Jelinek 0332e1
+r2 = -16092 -16093
Jakub Jelinek 0332e1
+r3 = -268991122 -268991123
Jakub Jelinek 0332e1
+r4 = 11 10
Jakub Jelinek 0332e1
+r5 = -11 -12
Jakub Jelinek 0332e1
+r6 = -69 -68
Jakub Jelinek 0332e1
+r7 = -113 -112
Jakub Jelinek 0332e1
+r8 = 104 105
Jakub Jelinek 0332e1
+r9 = -14982 -14981
Jakub Jelinek 0332e1
+r10 = -267879790 -267879789
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/Makefile.am.jj	2009-10-09 12:52:01.000000000 +0200
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/Makefile.am	2009-10-27 20:55:27.000000000 +0100
Jakub Jelinek 0332e1
@@ -43,6 +43,7 @@ EXTRA_DIST = \
Jakub Jelinek 0332e1
 	redundantRexW.vgtest redundantRexW.stdout.exp \
Jakub Jelinek 0332e1
 	redundantRexW.stderr.exp \
Jakub Jelinek 0332e1
 	smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
Jakub Jelinek 0332e1
+	sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \
Jakub Jelinek 0332e1
 	shrld.stderr.exp shrld.stdout.exp shrld.vgtest \
Jakub Jelinek 0332e1
 	ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \
Jakub Jelinek 0332e1
 	ssse3_misaligned.vgtest \
Jakub Jelinek 0332e1
@@ -58,6 +59,7 @@ check_PROGRAMS = \
Jakub Jelinek 0332e1
 	rcl-amd64 \
Jakub Jelinek 0332e1
 	redundantRexW \
Jakub Jelinek 0332e1
 	smc1 \
Jakub Jelinek 0332e1
+	sbbmisc \
Jakub Jelinek 0332e1
 	nibz_bennee_mmap
Jakub Jelinek 0332e1
 if BUILD_SSSE3_TESTS
Jakub Jelinek 0332e1
  check_PROGRAMS += ssse3_misaligned
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/Makefile.in.jj	2009-10-09 12:52:33.000000000 +0200
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/Makefile.in	2009-10-27 20:56:47.000000000 +0100
Jakub Jelinek 0332e1
@@ -53,8 +53,8 @@ DIST_COMMON = $(dist_noinst_SCRIPTS) $(s
Jakub Jelinek 0332e1
 check_PROGRAMS = amd64locked$(EXEEXT) bug127521-64$(EXEEXT) \
Jakub Jelinek 0332e1
 	bug132813-amd64$(EXEEXT) bug132918$(EXEEXT) clc$(EXEEXT) \
Jakub Jelinek 0332e1
 	$(am__EXEEXT_3) rcl-amd64$(EXEEXT) redundantRexW$(EXEEXT) \
Jakub Jelinek 0332e1
-	smc1$(EXEEXT) nibz_bennee_mmap$(EXEEXT) $(am__EXEEXT_4) \
Jakub Jelinek 0332e1
-	$(am__EXEEXT_5)
Jakub Jelinek 0332e1
+	smc1$(EXEEXT) sbbmisc$(EXEEXT) nibz_bennee_mmap$(EXEEXT) \
Jakub Jelinek 0332e1
+	$(am__EXEEXT_4) $(am__EXEEXT_5)
Jakub Jelinek 0332e1
 @BUILD_SSSE3_TESTS_TRUE@am__append_3 = ssse3_misaligned
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
 # DDD: these need to be made to work on Darwin like the x86/ ones were.
Jakub Jelinek 0332e1
@@ -169,6 +169,9 @@ slahf_amd64_LDADD = $(LDADD)
Jakub Jelinek 0332e1
 smc1_SOURCES = smc1.c
Jakub Jelinek 0332e1
 smc1_OBJECTS = smc1.$(OBJEXT)
Jakub Jelinek 0332e1
 smc1_LDADD = $(LDADD)
Jakub Jelinek 0332e1
+sbbmisc_SOURCES = sbbmisc.c
Jakub Jelinek 0332e1
+sbbmisc_OBJECTS = sbbmisc.$(OBJEXT)
Jakub Jelinek 0332e1
+sbbmisc_LDADD = $(LDADD)
Jakub Jelinek 0332e1
 ssse3_misaligned_SOURCES = ssse3_misaligned.c
Jakub Jelinek 0332e1
 ssse3_misaligned_OBJECTS = ssse3_misaligned.$(OBJEXT)
Jakub Jelinek 0332e1
 ssse3_misaligned_LDADD = $(LDADD)
Jakub Jelinek 0332e1
@@ -186,7 +189,7 @@ SOURCES = amd64locked.c bug127521-64.c b
Jakub Jelinek 0332e1
 	$(insn_mmx_SOURCES) $(insn_sse_SOURCES) $(insn_sse2_SOURCES) \
Jakub Jelinek 0332e1
 	$(insn_sse3_SOURCES) $(insn_ssse3_SOURCES) jrcxz.c looper.c \
Jakub Jelinek 0332e1
 	loopnel.c nibz_bennee_mmap.c rcl-amd64.c redundantRexW.c \
Jakub Jelinek 0332e1
-	shrld.c slahf-amd64.c smc1.c ssse3_misaligned.c
Jakub Jelinek 0332e1
+	shrld.c slahf-amd64.c smc1.c sbbmisc.c ssse3_misaligned.c
Jakub Jelinek 0332e1
 DIST_SOURCES = amd64locked.c bug127521-64.c bug132813-amd64.c \
Jakub Jelinek 0332e1
 	bug132918.c bug137714-amd64.c bug156404-amd64.c clc.c \
Jakub Jelinek 0332e1
 	faultstatus.c fcmovnu.c fxtract.c $(insn_basic_SOURCES) \
Jakub Jelinek 0332e1
@@ -194,7 +197,7 @@ DIST_SOURCES = amd64locked.c bug127521-6
Jakub Jelinek 0332e1
 	$(insn_sse2_SOURCES) $(insn_sse3_SOURCES) \
Jakub Jelinek 0332e1
 	$(insn_ssse3_SOURCES) jrcxz.c looper.c loopnel.c \
Jakub Jelinek 0332e1
 	nibz_bennee_mmap.c rcl-amd64.c redundantRexW.c shrld.c \
Jakub Jelinek 0332e1
-	slahf-amd64.c smc1.c ssse3_misaligned.c
Jakub Jelinek 0332e1
+	slahf-amd64.c smc1.c sbbmisc.c ssse3_misaligned.c
Jakub Jelinek 0332e1
 ETAGS = etags
Jakub Jelinek 0332e1
 CTAGS = ctags
Jakub Jelinek 0332e1
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Jakub Jelinek 0332e1
@@ -548,6 +551,7 @@ EXTRA_DIST = \
Jakub Jelinek 0332e1
 	redundantRexW.vgtest redundantRexW.stdout.exp \
Jakub Jelinek 0332e1
 	redundantRexW.stderr.exp \
Jakub Jelinek 0332e1
 	smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
Jakub Jelinek 0332e1
+	sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \
Jakub Jelinek 0332e1
 	shrld.stderr.exp shrld.stdout.exp shrld.vgtest \
Jakub Jelinek 0332e1
 	ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \
Jakub Jelinek 0332e1
 	ssse3_misaligned.vgtest \
Jakub Jelinek 0332e1
@@ -688,6 +692,9 @@ slahf-amd64$(EXEEXT): $(slahf_amd64_OBJE
Jakub Jelinek 0332e1
 smc1$(EXEEXT): $(smc1_OBJECTS) $(smc1_DEPENDENCIES) 
Jakub Jelinek 0332e1
 	@rm -f smc1$(EXEEXT)
Jakub Jelinek 0332e1
 	$(LINK) $(smc1_LDFLAGS) $(smc1_OBJECTS) $(smc1_LDADD) $(LIBS)
Jakub Jelinek 0332e1
+sbbmisc$(EXEEXT): $(sbbmisc_OBJECTS) $(sbbmisc_DEPENDENCIES) 
Jakub Jelinek 0332e1
+	@rm -f sbbmisc$(EXEEXT)
Jakub Jelinek 0332e1
+	$(LINK) $(sbbmisc_LDFLAGS) $(sbbmisc_OBJECTS) $(sbbmisc_LDADD) $(LIBS)
Jakub Jelinek 0332e1
 ssse3_misaligned$(EXEEXT): $(ssse3_misaligned_OBJECTS) $(ssse3_misaligned_DEPENDENCIES) 
Jakub Jelinek 0332e1
 	@rm -f ssse3_misaligned$(EXEEXT)
Jakub Jelinek 0332e1
 	$(LINK) $(ssse3_misaligned_LDFLAGS) $(ssse3_misaligned_OBJECTS) $(ssse3_misaligned_LDADD) $(LIBS)
Jakub Jelinek 0332e1
@@ -724,6 +731,7 @@ distclean-compile:
Jakub Jelinek 0332e1
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrld.Po@am__quote@
Jakub Jelinek 0332e1
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slahf-amd64.Po@am__quote@
Jakub Jelinek 0332e1
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smc1.Po@am__quote@
Jakub Jelinek 0332e1
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sbbmisc.Po@am__quote@
Jakub Jelinek 0332e1
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssse3_misaligned.Po@am__quote@
Jakub Jelinek 0332e1
 
Jakub Jelinek 0332e1
 .c.o:
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/sbbmisc.c.jj	2009-10-27 20:50:36.000000000 +0100
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/sbbmisc.c	2009-10-27 20:51:57.000000000 +0100
Jakub Jelinek 0332e1
@@ -0,0 +1,244 @@
Jakub Jelinek 0332e1
+#include "tests/asm.h"
Jakub Jelinek 0332e1
+#include <stdio.h>
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+char in_b, out_b1, out_b2, in_b2;
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+short in_w, out_w1, out_w2;
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+int in_l, out_l1, out_l2;
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void sbb_ib_al ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(sbb_ib_al) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tsbbb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tsbbb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void sbb_iw_ax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(sbb_iw_ax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tsbbw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tsbbw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void sbb_il_eax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(sbb_il_eax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tsbbl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tsbbl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void sbb_eb_gb ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(sbb_eb_gb) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tsbbb " VG_SYM(in_b2) ", %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tsbbb " VG_SYM(in_b2) ", %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void sbb_eb_gb_2 ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(sbb_eb_gb_2) ":\n"
Jakub Jelinek 0332e1
+"\tpushq %rcx\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %cl\n"
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b2) ", %dh\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tsbbb %dh,%cl\n"
Jakub Jelinek 0332e1
+"\tmovb %cl, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %cl\n"
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b2) ", %dh\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tsbbb %dh,%cl\n"
Jakub Jelinek 0332e1
+"\tmovb %cl, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tpopq %rcx\n"
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_eb_gb ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_eb_gb) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcb " VG_SYM(in_b2) ", %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcb " VG_SYM(in_b2) ", %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_eb_gb_2 ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_eb_gb_2) ":\n"
Jakub Jelinek 0332e1
+"\tpushq %rcx\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %cl\n"
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b2) ", %dh\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcb %dh,%cl\n"
Jakub Jelinek 0332e1
+"\tmovb %cl, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %cl\n"
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b2) ", %dh\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcb %dh,%cl\n"
Jakub Jelinek 0332e1
+"\tmovb %cl, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tpopq %rcx\n"
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_ib_al ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_ib_al) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovb " VG_SYM(in_b) ", %al\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcb $5, %al\n"
Jakub Jelinek 0332e1
+"\tmovb %al, " VG_SYM(out_b2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_iw_ax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_iw_ax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovw " VG_SYM(in_w) ", %ax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcw $555, %ax\n"
Jakub Jelinek 0332e1
+"\tmovw %ax, " VG_SYM(out_w2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+extern void adc_il_eax ( void );
Jakub Jelinek 0332e1
+asm("\n"
Jakub Jelinek 0332e1
+VG_SYM(adc_il_eax) ":\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tclc\n"
Jakub Jelinek 0332e1
+"\tadcl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l1) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tmovl " VG_SYM(in_l) ", %eax\n"
Jakub Jelinek 0332e1
+"\tstc\n"
Jakub Jelinek 0332e1
+"\tadcl $555666, %eax\n"
Jakub Jelinek 0332e1
+"\tmovl %eax, " VG_SYM(out_l2) "\n"
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+"\tretq\n"
Jakub Jelinek 0332e1
+);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+int main ( void )
Jakub Jelinek 0332e1
+{
Jakub Jelinek 0332e1
+   in_b = 99;
Jakub Jelinek 0332e1
+   sbb_ib_al();
Jakub Jelinek 0332e1
+   printf("r1 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_w = 49999;
Jakub Jelinek 0332e1
+   sbb_iw_ax();
Jakub Jelinek 0332e1
+   printf("r2 = %d %d\n", (int)out_w1, (int)out_w2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_l = 0xF0000000;
Jakub Jelinek 0332e1
+   sbb_il_eax();
Jakub Jelinek 0332e1
+   printf("r3 = %d %d\n", (int)out_l1, (int)out_l2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_b = 99;
Jakub Jelinek 0332e1
+   in_b2 = 88;
Jakub Jelinek 0332e1
+   sbb_eb_gb();
Jakub Jelinek 0332e1
+   printf("r4 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_b = 66;
Jakub Jelinek 0332e1
+   in_b2 = 77;
Jakub Jelinek 0332e1
+   sbb_eb_gb_2();
Jakub Jelinek 0332e1
+   printf("r5 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_b = 99;
Jakub Jelinek 0332e1
+   in_b2 = 88;
Jakub Jelinek 0332e1
+   adc_eb_gb();
Jakub Jelinek 0332e1
+   printf("r6 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_b = 66;
Jakub Jelinek 0332e1
+   in_b2 = 77;
Jakub Jelinek 0332e1
+   adc_eb_gb_2();
Jakub Jelinek 0332e1
+   printf("r7 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_b = 99;
Jakub Jelinek 0332e1
+   adc_ib_al();
Jakub Jelinek 0332e1
+   printf("r8 = %d %d\n", (int)out_b1, (int)out_b2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_w = 49999;
Jakub Jelinek 0332e1
+   adc_iw_ax();
Jakub Jelinek 0332e1
+   printf("r9 = %d %d\n", (int)out_w1, (int)out_w2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   in_l = 0xF0000000;
Jakub Jelinek 0332e1
+   adc_il_eax();
Jakub Jelinek 0332e1
+   printf("r10 = %d %d\n", (int)out_l1, (int)out_l2);
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+   return 0;
Jakub Jelinek 0332e1
+}
Jakub Jelinek 0332e1
--- valgrind/none/tests/amd64/sbbmisc.stderr.exp.jj	2009-10-27 20:50:39.000000000 +0100
Jakub Jelinek 0332e1
+++ valgrind/none/tests/amd64/sbbmisc.stderr.exp	2009-10-09 12:52:02.000000000 +0200
Jakub Jelinek 0332e1
@@ -0,0 +1,2 @@
Jakub Jelinek 0332e1
+
Jakub Jelinek 0332e1
+