mirror of https://github.com/x64dbg/zydis
				
				
				
			Fixed segment-register priority in 64-bit mode
This commit is contained in:
		
							parent
							
								
									3a346b5e9d
								
							
						
					
					
						commit
						96a7197647
					
				| 
						 | 
					@ -754,19 +754,35 @@ static ZydisStatus ZydisCollectOptionalPrefixes(ZydisDecoderContext* context,
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 0x2E: 
 | 
					        case 0x2E: 
 | 
				
			||||||
            ++info->details.prefixes.has2E;
 | 
					            ++info->details.prefixes.has2E;
 | 
				
			||||||
 | 
					            if ((context->decoder->machineMode != ZYDIS_MACHINE_MODE_LONG_64) ||
 | 
				
			||||||
 | 
					               ((context->lastSegmentPrefix != 0x64) && (context->lastSegmentPrefix != 0x65)))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                context->lastSegmentPrefix = 0x2E;
 | 
					                context->lastSegmentPrefix = 0x2E;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 0x36:
 | 
					        case 0x36:
 | 
				
			||||||
            ++info->details.prefixes.has36;
 | 
					            ++info->details.prefixes.has36;
 | 
				
			||||||
 | 
					            if ((context->decoder->machineMode != ZYDIS_MACHINE_MODE_LONG_64) ||
 | 
				
			||||||
 | 
					               ((context->lastSegmentPrefix != 0x64) && (context->lastSegmentPrefix != 0x65)))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                context->lastSegmentPrefix = 0x36;
 | 
					                context->lastSegmentPrefix = 0x36;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 0x3E: 
 | 
					        case 0x3E: 
 | 
				
			||||||
            ++info->details.prefixes.has3E;
 | 
					            ++info->details.prefixes.has3E;
 | 
				
			||||||
 | 
					            if ((context->decoder->machineMode != ZYDIS_MACHINE_MODE_LONG_64) ||
 | 
				
			||||||
 | 
					               ((context->lastSegmentPrefix != 0x64) && (context->lastSegmentPrefix != 0x65)))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                context->lastSegmentPrefix = 0x3E;
 | 
					                context->lastSegmentPrefix = 0x3E;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 0x26: 
 | 
					        case 0x26: 
 | 
				
			||||||
            ++info->details.prefixes.has26;
 | 
					            ++info->details.prefixes.has26;
 | 
				
			||||||
 | 
					            if ((context->decoder->machineMode != ZYDIS_MACHINE_MODE_LONG_64) ||
 | 
				
			||||||
 | 
					               ((context->lastSegmentPrefix != 0x64) && (context->lastSegmentPrefix != 0x65)))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                context->lastSegmentPrefix = 0x26;
 | 
					                context->lastSegmentPrefix = 0x26;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 0x64:
 | 
					        case 0x64:
 | 
				
			||||||
            ++info->details.prefixes.has64;
 | 
					            ++info->details.prefixes.has64;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue