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

Function x86ADD

NULLC/Translator_X86.cpp:565–579  ·  view source on GitHub ↗

add dst, num

Source from the content-addressed store, hash-verified

563
564// add dst, num
565int x86ADD(unsigned char *stream, x86Reg dst, int num)
566{
567 if((char)(num) == num)
568 {
569 stream[0] = 0x83;
570 stream[1] = encodeRegister(dst, 0);
571 stream[2] = (char)(num);
572 return 3;
573 }
574 // else
575 stream[0] = 0x81;
576 stream[1] = encodeRegister(dst, 0);
577 *(int*)(stream+2) = num;
578 return 6;
579}
580// add dst, src
581int x86ADD(unsigned char *stream, x86Reg dst, x86Reg src)
582{

Callers 1

TranslateToNativeMethod · 0.85

Calls 3

encodeRegisterFunction · 0.85
assertFunction · 0.85
encodeAddressFunction · 0.85

Tested by

no test coverage detected