.TH "sources/import/edz/lzma/CpuArch.h" 3 "Version 0.200.1-dev" "QElectroTech" \" -*- nroff -*-
.ad l
.nh
.SH NAME
sources/import/edz/lzma/CpuArch.h
.SH SYNOPSIS
.br
.PP
\fR#include '7zTypes\&.h'\fP
.br

.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBMY_CPU_pragma_pack_push_1\fP   _Pragma('pack(push, 1)')"
.br
.ti -1c
.RI "#define \fBMY_CPU_pragma_pop\fP   _Pragma('pack(pop)')"
.br
.ti -1c
.RI "#define \fBZ7_has_builtin\fP(x)"
.br
.ti -1c
.RI "#define \fBZ7_BSWAP32_CONST\fP(v)"
.br
.ti -1c
.RI "#define \fBZ7_BSWAP16\fP(v)"
.br
.ti -1c
.RI "#define \fBZ7_BSWAP32\fP(v)"
.br
.ti -1c
.RI "#define \fBZ7_BSWAP64\fP(v)"
.br
.ti -1c
.RI "#define \fBGetUi16\fP(p)"
.br
.ti -1c
.RI "#define \fBGetUi32\fP(p)"
.br
.ti -1c
.RI "#define \fBSetUi16\fP(p,  v)"
.br
.ti -1c
.RI "#define \fBSetUi32\fP(p,  v)"
.br
.ti -1c
.RI "#define \fBGetUi64\fP(p)"
.br
.ti -1c
.RI "#define \fBSetUi64\fP(p,  v)"
.br
.ti -1c
.RI "#define \fBGetBe32\fP(p)"
.br
.ti -1c
.RI "#define \fBSetBe32\fP(p,  v)"
.br
.ti -1c
.RI "#define \fBGetBe64\fP(p)"
.br
.ti -1c
.RI "#define \fBGetBe16\fP(p)"
.br
.in -1c
.SH "Macro Definition Documentation"
.PP 
.SS "#define GetBe16( p)"
\fBValue:\fP
.nf
    ( (UInt16) ( \\
    ((UInt16)((const Byte *)(p))[0] << 8) | \\
             ((const Byte *)(p))[1] ))
.PP
.fi

.SS "#define GetBe32( p)"
\fBValue:\fP
.nf
    ( \\
    ((UInt32)((const Byte *)(p))[0] << 24) | \\
    ((UInt32)((const Byte *)(p))[1] << 16) | \\
    ((UInt32)((const Byte *)(p))[2] <<  8) | \\
             ((const Byte *)(p))[3] )
.PP
.fi

.SS "#define GetBe64( p)"
\fBValue:\fP
.nf
(((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4))
.PP
.fi

.SS "#define GetUi16( p)"
\fBValue:\fP
.nf
             ( (UInt16) ( \\
             ((const Byte *)(p))[0] | \\
    ((UInt16)((const Byte *)(p))[1] << 8) ))
.PP
.fi

.SS "#define GetUi32( p)"
\fBValue:\fP
.nf
             ( \\
             ((const Byte *)(p))[0]        | \\
    ((UInt32)((const Byte *)(p))[1] <<  8) | \\
    ((UInt32)((const Byte *)(p))[2] << 16) | \\
    ((UInt32)((const Byte *)(p))[3] << 24))
.PP
.fi

.SS "#define GetUi64( p)"
\fBValue:\fP
.nf
(GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32))
.PP
.fi

.SS "#define MY_CPU_pragma_pack_push_1   _Pragma('pack(push, 1)')"

.SS "#define MY_CPU_pragma_pop   _Pragma('pack(pop)')"

.SS "#define SetBe32( p,  v)"
\fBValue:\fP
.nf
    { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \\
    _ppp_[0] = (Byte)(_vvv_ >> 24); \\
    _ppp_[1] = (Byte)(_vvv_ >> 16); \\
    _ppp_[2] = (Byte)(_vvv_ >> 8); \\
    _ppp_[3] = (Byte)_vvv_; }
.PP
.fi

.SS "#define SetUi16( p,  v)"
\fBValue:\fP
.nf
    { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \\
    _ppp_[0] = (Byte)_vvv_; \\
    _ppp_[1] = (Byte)(_vvv_ >> 8); }
.PP
.fi

.SS "#define SetUi32( p,  v)"
\fBValue:\fP
.nf
    { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \\
    _ppp_[0] = (Byte)_vvv_; \\
    _ppp_[1] = (Byte)(_vvv_ >> 8); \\
    _ppp_[2] = (Byte)(_vvv_ >> 16); \\
    _ppp_[3] = (Byte)(_vvv_ >> 24); }
.PP
.fi

.SS "#define SetUi64( p,  v)"
\fBValue:\fP
.nf
    { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \\
    SetUi32(_ppp2_    , (UInt32)_vvv2_) \\
    SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)) }
.PP
.fi

.SS "#define Z7_BSWAP16( v)"
\fBValue:\fP
.nf
       ((UInt16) \\
       ( ((UInt32)(v) << 8) \\
       | ((UInt32)(v) >> 8) \\
       ))
.PP
.fi

.SS "#define Z7_BSWAP32( v)"
\fBValue:\fP
.nf
Z7_BSWAP32_CONST(v)
.PP
.fi

.SS "#define Z7_BSWAP32_CONST( v)"
\fBValue:\fP
.nf
       ( (((UInt32)(v) << 24)                   ) \\
       | (((UInt32)(v) <<  8) & (UInt32)0xff0000) \\
       | (((UInt32)(v) >>  8) & (UInt32)0xff00  ) \\
       | (((UInt32)(v) >> 24)                   ))
.PP
.fi

.SS "#define Z7_BSWAP64( v)"
\fBValue:\fP
.nf
       ( ( ( (UInt64)(v)                           ) << 8 * 7 ) \\
       | ( ( (UInt64)(v) & ((UInt32)0xff << 8 * 1) ) << 8 * 5 ) \\
       | ( ( (UInt64)(v) & ((UInt32)0xff << 8 * 2) ) << 8 * 3 ) \\
       | ( ( (UInt64)(v) & ((UInt32)0xff << 8 * 3) ) << 8 * 1 ) \\
       | ( ( (UInt64)(v) >> 8 * 1 ) & ((UInt32)0xff << 8 * 3) ) \\
       | ( ( (UInt64)(v) >> 8 * 3 ) & ((UInt32)0xff << 8 * 2) ) \\
       | ( ( (UInt64)(v) >> 8 * 5 ) & ((UInt32)0xff << 8 * 1) ) \\
       | ( ( (UInt64)(v) >> 8 * 7 )                           ) \\
       )
.PP
.fi

.SS "#define Z7_has_builtin( x)"
\fBValue:\fP
.nf
0
.PP
.fi

.SH "Author"
.PP 
Generated automatically by Doxygen for QElectroTech from the source code\&.
