vex: r3299 - /trunk/priv/guest_x86_toIR.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vex: r3299 - /trunk/priv/guest_x86_toIR.c

svn-2
Author: sewardj
Date: Fri Jan 20 10:01:42 2017
New Revision: 3299

Log:
x86: Recognize the SS segment prefix on x86.  Bug 344139 comment 4.
Patch from Sebastian Lackner, [hidden email].

Modified:
    trunk/priv/guest_x86_toIR.c

Modified: trunk/priv/guest_x86_toIR.c
==============================================================================
--- trunk/priv/guest_x86_toIR.c (original)
+++ trunk/priv/guest_x86_toIR.c Fri Jan 20 10:01:42 2017
@@ -1409,6 +1409,7 @@
       case 0x26: return "%es:";
       case 0x64: return "%fs:";
       case 0x65: return "%gs:";
+      case 0x36: return "%ss:";
       default: vpanic("sorbTxt(x86,guest)");
    }
 }
@@ -1433,6 +1434,7 @@
       case 0x26: sreg = R_ES; break;
       case 0x64: sreg = R_FS; break;
       case 0x65: sreg = R_GS; break;
+      case 0x36: sreg = R_SS; break;
       default: vpanic("handleSegOverride(x86,guest)");
    }
 
@@ -8101,7 +8103,7 @@
    Int sz = 4;
 
    /* sorb holds the segment-override-prefix byte, if any.  Zero if no
-      prefix has been seen, else one of {0x26, 0x3E, 0x64, 0x65}
+      prefix has been seen, else one of {0x26, 0x36, 0x3E, 0x64, 0x65}
       indicating the prefix.  */
    UChar sorb = 0;
 
@@ -8255,6 +8257,7 @@
          case 0x26: /* %ES: */
          case 0x64: /* %FS: */
          case 0x65: /* %GS: */
+         case 0x36: /* %SS: */
             if (sorb != 0)
                goto decode_failure; /* only one seg override allowed */
             sorb = pre;
@@ -8274,9 +8277,6 @@
             }
             break;
          }
-         case 0x36: /* %SS: */
-            /* SS override cases are not handled */
-            goto decode_failure;
          default:
             goto not_a_prefix;
       }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...