library/src/decoders/x86ASM/BP-x86OperandAnalysis.cc
// Looks at the RM byte and determines if it is a sib encoded
// rm value.
Looks at the RM byte and determines if it is a sib encoded
rm value.
Looks at the RM byte and determines if it is a sib encoded rm value .
size_t X86_32_IsRmSibEncoded(unsigned char byte){
	switch(byte){
		case 0x04:
			return true;
		case 0x0c:
			return true;
		case 0x14:
			return true;
		case 0x1c:
			return true;
		case 0x24:
			return true;
		case 0x2c:
			return true;
		case 0x34:
			return true;
		case 0x3c:
			return true;
		case 0x44:
			return true;
		case 0x4c:
			return true;
		case 0x54:
			return true;
		case 0x5c:
			return true;
		case 0x64:
			return true;
		case 0x6c:
			return true;
		case 0x74:
			return true;
		case 0x7c:
			return true;
		case 0x84:
			return true;
		case 0x8c:
			return true;
		case 0x94:
			return true;
		case 0x9c:
			return true;
		case 0xa4:
			return true;
		case 0xac:
			return true;
		case 0xb4:
			return true;
		case 0xbc:
			return true;
		default:
			break;
	}
	return 0;
}
size_t X86_32_IsRmSibEncoded ( unsigned char byte ) { switch ( byte ) { case 0x04 : return true ; case 0x0c : return true ; case 0x14 : return true ; case 0x1c : return true ; case 0x24 : return true ; case 0x2c : return true ; case 0x34 : return true ; case 0x3c : return true ; case 0x44 : return true ; case 0x4c : return true ; case 0x54 : return true ; case 0x5c : return true ; case 0x64 : return true ; case 0x6c : return true ; case 0x74 : return true ; case 0x7c : return true ; case 0x84 : return true ; case 0x8c : return true ; case 0x94 : return true ; case 0x9c : return true ; case 0xa4 : return true ; case 0xac : return true ; case 0xb4 : return true ; case 0xbc : return true ; default : break ; } return 0 ; }
Looks at the RM byte and determines if it is a sib encoded
rm value.
Looks at the RM byte and determines if it is a sib encoded rm value .
// this is effectively this // if ( ((i & 0xf) == 0x4) || ((i&0xf) == 0xc) ) return true; // i wrote out the switches to make it easier to understand for whoever // ends up doing maintainence. // SIB encoded with no displacement // now disp8 sib encoding // sib 32bit disp encoding