VirtualBox

Changeset 73097 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Jul 12, 2018 9:06:33 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123672
Message:

*: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxRecompiler.c

    r72493 r73097  
    290290    AssertReleaseMsg(sizeof(pVM->rem.padding) >= sizeof(pVM->rem.s), ("%#x >= %#x; sizeof(Env)=%#x\n", sizeof(pVM->rem.padding), sizeof(pVM->rem.s), sizeof(pVM->rem.s.Env)));
    291291    AssertReleaseMsg(sizeof(pVM->rem.s.Env) <= REM_ENV_SIZE, ("%#x == %#x\n", sizeof(pVM->rem.s.Env), REM_ENV_SIZE));
    292     AssertReleaseMsg(!(RT_OFFSETOF(VM, rem) & 31), ("off=%#x\n", RT_OFFSETOF(VM, rem)));
     292    AssertReleaseMsg(!(RT_UOFFSETOF(VM, rem) & 31), ("off=%#zx\n", RT_UOFFSETOF(VM, rem)));
    293293#if 0 /* just an annoyance at the moment. */
    294294#if defined(DEBUG) && !defined(RT_OS_SOLARIS) && !defined(RT_OS_FREEBSD) /// @todo fix the solaris and freebsd math stuff.
     
    300300     * Init some internal data members.
    301301     */
    302     pVM->rem.s.offVM = RT_OFFSETOF(VM, rem.s);
     302    pVM->rem.s.offVM = RT_UOFFSETOF(VM, rem.s);
    303303    pVM->rem.s.Env.pVM = pVM;
    304304#ifdef CPU_RAW_MODE_INIT
     
    697697        /* Redundant REM CPU state has to be loaded, but can be ignored. */
    698698        CPUX86State_Ver16 temp;
    699         SSMR3GetMem(pSSM,   &temp, RT_OFFSETOF(CPUX86State_Ver16, jmp_env));
     699        SSMR3GetMem(pSSM,   &temp, RT_UOFFSETOF(CPUX86State_Ver16, jmp_env));
    700700    }
    701701
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette