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

Function common_bsfr32e32

source/emulation/cpu/common/common_bit.cpp:258–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256 }
257}
258void common_bsfr32e32(CPU* cpu, U32 address, U32 dstReg) {
259 U32 value=cpu->memory->readd(address);
260 cpu->fillFlagsNoZF();
261 if (value==0) {
262 cpu->addZF();
263 } else {
264 U32 result = 0;
265 while ((value & 0x01)==0) { result++; value>>=1; }
266 cpu->removeZF();
267 cpu->reg[dstReg].u32=result;
268 }
269}
270void common_bsrr16r16(CPU* cpu, U32 srcReg, U32 dstReg) {
271 U16 value=cpu->reg[srcReg].u16;
272 cpu->fillFlagsNoZF();

Callers 1

normal_bsfr32e32Function · 0.85

Calls 4

fillFlagsNoZFMethod · 0.80
addZFMethod · 0.80
removeZFMethod · 0.80
readdMethod · 0.45

Tested by

no test coverage detected