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

Function common_bsrr16e16

source/emulation/cpu/common/common_bit.cpp:282–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 }
281}
282void common_bsrr16e16(CPU* cpu, U32 address, U32 dstReg) {
283 U16 value=cpu->memory->readw(address);
284 cpu->fillFlagsNoZF();
285 if (value==0) {
286 cpu->addZF();
287 } else {
288 U16 result = 15;
289 while ((value & 0x8000)==0) { result--; value<<=1; }
290 cpu->removeZF();
291 cpu->reg[dstReg].u16=result;
292 }
293}
294void common_bsrr32r32(CPU* cpu, U32 srcReg, U32 dstReg) {
295 U32 value=cpu->reg[srcReg].u32;
296 cpu->fillFlagsNoZF();

Callers 1

normal_bsrr16e16Function · 0.85

Calls 4

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

Tested by

no test coverage detected