MCPcopy Create free account
hub / github.com/WheretIB/nullc / x86CMP

Function x86CMP

NULLC/Translator_X86.cpp:992–1005  ·  view source on GitHub ↗

cmp reg, num

Source from the content-addressed store, hash-verified

990
991// cmp reg, num
992int x86CMP(unsigned char *stream, x86Reg reg, int num)
993{
994 if((char)(num) == num)
995 {
996 stream[0] = 0x83;
997 stream[1] = encodeRegister(reg, 7);
998 stream[2] = (char)num;
999 return 3;
1000 }
1001 stream[0] = 0x81;
1002 stream[1] = encodeRegister(reg, 7);
1003 *(int*)(stream+2) = num;
1004 return 6;
1005}
1006// cmp reg1, reg2
1007int x86CMP(unsigned char *stream, x86Reg reg1, x86Reg reg2)
1008{

Callers 1

TranslateToNativeMethod · 0.85

Calls 3

encodeRegisterFunction · 0.85
assertFunction · 0.85
encodeAddressFunction · 0.85

Tested by

no test coverage detected