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

Method FBST

source/emulation/cpu/common/fpu.cpp:448–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448void FPU::FBST(CPU* cpu, U32 addr) {
449 S64 sValue;
450 if (isRegCached[this->top]) {
451 sValue = (S64)this->regCache[this->top].d;
452 } else {
453 sValue = extF80_to_i64(regs[top], getSoftRounding(), getSoftExact());
454 }
455 U64 value = sValue < 0 ? (U64)(-1 * sValue) : (U64)sValue;
456 U8 data[10] = { 0 };
457
458 for (int i = 0; i < 9; i++) {
459
460 data[i] = (value % 10);
461 value /= 10;
462 data[i] |= (value % 10) << 4;
463 value /= 10;
464 }
465 data[9] = (sValue < 0) ? 0x80 : 0;
466 cpu->memory->memcpy(addr, data, 10);
467}
468
469void FPU::FADD(int op1, int op2) {
470 if (KSystem::useF64) {

Callers 1

common_FBSTP_PACKED_BCDFunction · 0.80

Calls 2

extF80_to_i64Function · 0.85
memcpyMethod · 0.80

Tested by

no test coverage detected