src/cpu/x86/vm/nativeInst_x86.cpp

changeset 3388
127b3692c168
parent 2314
f95d63e2154a
child 4318
cd3d6a6b95d9
     1.1 --- a/src/cpu/x86/vm/nativeInst_x86.cpp	Tue Dec 13 17:10:52 2011 -0800
     1.2 +++ b/src/cpu/x86/vm/nativeInst_x86.cpp	Wed Dec 14 14:54:38 2011 -0800
     1.3 @@ -237,9 +237,21 @@
     1.4    int off = 0;
     1.5    u_char instr_0 = ubyte_at(off);
     1.6  
     1.7 +  // See comment in Assembler::locate_operand() about VEX prefixes.
     1.8 +  if (instr_0 == instruction_VEX_prefix_2bytes) {
     1.9 +    assert((UseAVX > 0), "shouldn't have VEX prefix");
    1.10 +    NOT_LP64(assert((0xC0 & ubyte_at(1)) == 0xC0, "shouldn't have LDS and LES instructions"));
    1.11 +    return 2;
    1.12 +  }
    1.13 +  if (instr_0 == instruction_VEX_prefix_3bytes) {
    1.14 +    assert((UseAVX > 0), "shouldn't have VEX prefix");
    1.15 +    NOT_LP64(assert((0xC0 & ubyte_at(1)) == 0xC0, "shouldn't have LDS and LES instructions"));
    1.16 +    return 3;
    1.17 +  }
    1.18 +
    1.19    // First check to see if we have a (prefixed or not) xor
    1.20 -  if ( instr_0 >= instruction_prefix_wide_lo &&      // 0x40
    1.21 -       instr_0 <= instruction_prefix_wide_hi) { // 0x4f
    1.22 +  if (instr_0 >= instruction_prefix_wide_lo && // 0x40
    1.23 +      instr_0 <= instruction_prefix_wide_hi) { // 0x4f
    1.24      off++;
    1.25      instr_0 = ubyte_at(off);
    1.26    }
    1.27 @@ -256,13 +268,13 @@
    1.28      instr_0 = ubyte_at(off);
    1.29    }
    1.30  
    1.31 -  if ( instr_0 == instruction_code_xmm_ss_prefix ||      // 0xf3
    1.32 +  if ( instr_0 == instruction_code_xmm_ss_prefix || // 0xf3
    1.33         instr_0 == instruction_code_xmm_sd_prefix) { // 0xf2
    1.34      off++;
    1.35      instr_0 = ubyte_at(off);
    1.36    }
    1.37  
    1.38 -  if ( instr_0 >= instruction_prefix_wide_lo &&      // 0x40
    1.39 +  if ( instr_0 >= instruction_prefix_wide_lo && // 0x40
    1.40         instr_0 <= instruction_prefix_wide_hi) { // 0x4f
    1.41      off++;
    1.42      instr_0 = ubyte_at(off);

mercurial