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

Method lar

source/emulation/cpu/common/cpu.cpp:479–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479U32 CPU::lar(U32 selector, U32 ar) {
480 this->fillFlags();
481 if (selector == 0 || selector>=LDT_ENTRIES) {
482 this->flags &=~ZF;
483 return ar;
484 }
485 struct user_desc* ldt = this->thread->getLDT(selector >> 3);
486 this->flags |= ZF;
487 ar = 0;
488 if (!ldt->seg_not_present)
489 ar|=0x0100;
490 ar|=0x0600; // ring 3 (dpl)
491 ar|=0x0800; // not system
492 // bits 5,6,7 = type, hopefully not used
493 ar|=0x8000; // accessed;
494 return ar;
495}
496
497U32 CPU::lsl(U32 selector, U32 limit) {
498 this->fillFlags();

Callers 5

common_larr16r16Function · 0.80
common_larr16e16Function · 0.80
common_larFunction · 0.80
normal_larr16r16Function · 0.80
normal_larr16e16Function · 0.80

Calls 2

fillFlagsMethod · 0.95
getLDTMethod · 0.45

Tested by

no test coverage detected