VirtualBox

Changeset 60200 in vbox for trunk/include


Ignore:
Timestamp:
Mar 26, 2016 10:48:01 PM (9 years ago)
Author:
vboxsync
Message:

iprt/asmdefs.mac: AssertCompileMemberAlignment and AssertCompile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asmdefs.mac

    r60134 r60200  
    947947
    948948;;
    949 ; Structure memember offset assertion macro.
     949; Structure member offset assertion macro.
    950950%define AssertCompileMemberOffset(a_Type, a_Member, a_off) AssertCompileMemberOffsetML a_Type, a_Member, a_off
    951951%macro AssertCompileMemberOffsetML 3
     
    959959%endmacro
    960960
    961 %endif
    962 
     961;;
     962; Structure member alignment assertion macro.
     963%define AssertCompileMemberAlignment(a_Type, a_Member, a_cbAlign) AssertCompileMemberAlignmentML a_Type, a_Member, a_cbAlign
     964%macro AssertCompileMemberAlignmentML 3
     965 %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
     966  %assign AssertVar_offActual   %1 %+ . %+ %2
     967  %assign AssertVar_cbAlign     %3
     968  %if AssertVar_offActual & (AssertVar_cbAlign - 1)
     969   %error %1 %+ . %+ %2 is at AssertVar_offActual, expected AssertVar_cbAlign alignment
     970  %endif
     971 %endif
     972%endmacro
     973
     974;;
     975; Generic compile time expression assertion.
     976%define AssertCompile(a_Expr) AssertCompileML { a_Expr }
     977%macro AssertCompileML 1
     978 %ifndef KBUILD_GENERATING_MAKEFILE_DEPENDENCIES
     979  ;%assign AssertVar_uResult %1
     980  %if (%1) != 1
     981   %error %1 => AssertVar_uResult
     982  %endif
     983 %endif
     984%endmacro
     985
     986%endif
     987
Note: See TracChangeset for help on using the changeset viewer.

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