MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / common_bsfr16e16

Function common_bsfr16e16

source/emulation/cpu/common/common_bit.cpp:234–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232 }
233}
234void common_bsfr16e16(CPU* cpu, U32 address, U32 dstReg) {
235 U16 value=cpu->memory->readw(address);
236 cpu->fillFlagsNoZF();
237 if (value==0) {
238 cpu->addZF();
239 } else {
240 U16 result = 0;
241 while ((value & 0x01)==0) { result++; value>>=1; }
242 cpu->removeZF();
243 cpu->reg[dstReg].u16=result;
244 }
245}
246void common_bsfr32r32(CPU* cpu, U32 srcReg, U32 dstReg) {
247 U32 value=cpu->reg[srcReg].u32;
248 cpu->fillFlagsNoZF();

Callers 1

normal_bsfr16e16Function · 0.85

Calls 4

fillFlagsNoZFMethod · 0.80
addZFMethod · 0.80
removeZFMethod · 0.80
readwMethod · 0.45

Tested by

no test coverage detected