Home | History | Annotate | Download | only in m_syswrap

Lines Matching refs:gdt

188    LDT/GDT simulation
297 /* Create initial GDT. */
301 VexGuestX86SegDescr* gdt = VG_(calloc)("di.syswrap-x86.azxG.1", nbytes, 1);
318 if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
320 if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
325 if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
327 return gdt;
337 /* Free up an LDT or GDT allocated by the above fns. */
373 "ldt = 0x%llx, gdt = 0x%llx\n",
520 VexGuestX86SegDescr* gdt;
530 gdt = (VexGuestX86SegDescr*)(HWord)VG_(threads)[tid].arch.vex.guest_GDT;
532 /* If the thread doesn't have a GDT, allocate it now. */
533 if (!gdt) {
534 gdt = alloc_system_x86_GDT();
535 VG_(threads)[tid].arch.vex.guest_GDT = (HWord)gdt;
546 if (gdt[idx].LdtEnt.Words.word1 == 0
547 && gdt[idx].LdtEnt.Words.word2 == 0)
554 /* Similarly, reject attempts to use GDT[0]. */
558 translate_to_hw_format(info, &gdt[idx], 0);
574 VexGuestX86SegDescr* gdt;
589 gdt = (VexGuestX86SegDescr*)(HWord)VG_(threads)[tid].arch.vex.guest_GDT;
591 /* If the thread doesn't have a GDT, allocate it now. */
592 if (!gdt) {
593 gdt = alloc_system_x86_GDT();
594 VG_(threads)[tid].arch.vex.guest_GDT = (HWord)gdt;
597 info->base_addr = ( gdt[idx].LdtEnt.Bits.BaseHi << 24 ) |
598 ( gdt[idx].LdtEnt.Bits.BaseMid << 16 ) |
599 gdt[idx].LdtEnt.Bits.BaseLow;
600 info->limit = ( gdt[idx].LdtEnt.Bits.LimitHi << 16 ) |
601 gdt[idx].LdtEnt.Bits.LimitLow;
602 info->seg_32bit = gdt[idx].LdtEnt.Bits.Default_Big;
603 info->contents = ( gdt[idx].LdtEnt.Bits.Type >> 2 ) & 0x3;
604 info->read_exec_only = ( gdt[idx].LdtEnt.Bits.Type & 0x1 ) ^ 0x1;
605 info->limit_in_pages = gdt[idx].LdtEnt.Bits.Granularity;
606 info->seg_not_present = gdt[idx].LdtEnt.Bits.Pres ^ 0x1;
607 info->useable = gdt[idx].LdtEnt.Bits.Sys;
620 /* On x86, we have to dump the LDT and GDT. */
639 /* Either we start with an empty GDT (the usual case) or inherit a