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

Function x86PUSH

NULLC/Translator_X86.cpp:365–377  ·  view source on GitHub ↗

push dword [index*mult+base+shift]

Source from the content-addressed store, hash-verified

363
364// push dword [index*mult+base+shift]
365int x86PUSH(unsigned char *stream, x86Size size, x86Reg index, int multiplier, x86Reg base, int shift)
366{
367 (void)size;
368 assert(size == sDWORD);
369 if(base == rNONE && index != rNONE && multiplier == 1) // swap so if there is only one register, it will be base
370 {
371 base = index;
372 index = rNONE;
373 }
374 stream[0] = 0xff;
375 unsigned int asize = encodeAddress(stream+1, index, multiplier, base, shift, 6);
376 return 1+asize;
377}
378int x86PUSH(unsigned char *stream, x86Reg reg)
379{
380 stream[0] = 0x50 + regCode[reg];

Callers 1

TranslateToNativeMethod · 0.85

Calls 2

assertFunction · 0.85
encodeAddressFunction · 0.85

Tested by

no test coverage detected