1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4313 Introduced TSInt128 that is a storage class for int128

Removed uint128 from joblist/lbidlist.*

Another toString() method for wide-decimal that is EMPTY/NULL aware

Unified decimal processing in WF functions

Fixed a potential issue in EqualCompData::operator() for
    wide-decimal processing

Fixed some signedness warnings
This commit is contained in:
Roman Nozdrin
2020-11-06 10:52:43 +00:00
parent d5c6645ba1
commit 3eb26c0d4a
35 changed files with 505 additions and 364 deletions

View File

@ -37,6 +37,7 @@ using namespace boost;
#define BYTESTREAM_DLLEXPORT
#include "bytestream.h"
#undef BYTESTREAM_DLLEXPORT
#include "datatypes/mcs_int128.h"
#define DEBUG_DUMP_STRINGS_LESS_THAN 0
@ -239,15 +240,8 @@ ByteStream& ByteStream::operator<<(const uint128_t& o)
{
if (fBuf == 0 || (fCurInPtr - fBuf + 16U > fMaxLen + ISSOverhead))
growBuf(fMaxLen + BlockSize);
__asm__ volatile("movups %1,%0;"
:"=m" ( *fCurInPtr ) // output
:"v"( o ) // input
: "memory" // clobbered
);
datatypes::TSInt128::storeUnaligned(fCurInPtr, o);
fCurInPtr += 16;
return *this;
}
@ -255,14 +249,8 @@ ByteStream& ByteStream::operator<<(const int128_t& o)
{
if (fBuf == 0 || (fCurInPtr - fBuf + 16U > fMaxLen + ISSOverhead))
growBuf(fMaxLen + BlockSize);
__asm__ volatile("movups %1,%0;"
:"=m" ( *fCurInPtr ) // output
:"v"( o ) // input
: "memory" // clobbered
);
datatypes::TSInt128::storeUnaligned(fCurInPtr, o);
fCurInPtr += 16;
return *this;
}
@ -446,38 +434,16 @@ void ByteStream::peek(uint64_t& o) const
void ByteStream::peek(uint128_t& o) const
{
if (length() < 16)
throw underflow_error("ByteStream>uint128_t: not enough data in stream to fill datatype");
__asm__ volatile("movdqu %0,%%xmm0;"
:
:"m"( *fCurOutPtr ) // input
:"xmm0" // clobbered
);
__asm__ volatile("movups %%xmm0,%0;"
: "=m" (o)// output
: // input
: "memory", "xmm0" // clobbered
);
datatypes::TSInt128::assignPtrPtr(&o, fCurOutPtr);
}
void ByteStream::peek(int128_t& o) const
{
if (length() < 16)
throw underflow_error("ByteStream>int128_t: not enough data in stream to fill datatype");
__asm__ volatile("movdqu %0,%%xmm0;"
:
:"m"( *fCurOutPtr ) // input
:"xmm0" // clobbered
);
__asm__ volatile("movups %%xmm0,%0;"
: "=m" (o)// output
: // input
: "memory", "xmm0" // clobbered
);
datatypes::TSInt128::assignPtrPtr(&o, fCurOutPtr);
}
void ByteStream::peek(string& s) const