|
|
|
@ -157,6 +157,11 @@ namespace vm::transform
|
|
|
|
|
return _byteswap_ulong( a );
|
|
|
|
|
if constexpr ( std::is_same_v< T, std::uint16_t > )
|
|
|
|
|
return _byteswap_ushort( a );
|
|
|
|
|
// XCHG AL, AH... the size will be "8 bits" because it only
|
|
|
|
|
// looks at the first operand but this is truly a "BSWAP 16"...
|
|
|
|
|
// which btw: BSWAP on 16bit registers isnt a thing...
|
|
|
|
|
if constexpr ( std::is_same_v< T, std::uint8_t > )
|
|
|
|
|
return _byteswap_ushort( a );
|
|
|
|
|
|
|
|
|
|
throw std::invalid_argument( "invalid type size..." );
|
|
|
|
|
};
|
|
|
|
|