You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4313 Very fragile but high speed approach with inline ASM
GCC compiler uses aligned versions of SIMD instructions expecting aligned memory blocks that is hard to implement now
This commit is contained in:
@ -231,7 +231,11 @@ void ColumnCommand::loadData()
|
||||
{
|
||||
ByteStream::hexbyte h;
|
||||
utils::getEmptyRowValue(colType.colDataType, colType.colWidth, (uint8_t*)&h);
|
||||
hPtr[idx] = h;
|
||||
__asm__ volatile("movups %1,%0"
|
||||
:"=m" ( hPtr[idx] ) // output
|
||||
:"v"( h ) // input
|
||||
: "memory" // clobbered
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,7 +332,18 @@ void ColumnCommand::process_OT_BOTH()
|
||||
|
||||
bpp->relRids[i] = *((uint16_t*) &bpp->outputMsg[pos]);
|
||||
pos += 2;
|
||||
wide128Values[i] = *((int128_t*) &bpp->outputMsg[pos]);
|
||||
int128_t* int128Ptr = reinterpret_cast<int128_t*>(&bpp->outputMsg[pos]);
|
||||
__asm__ volatile("movdqu %0,%%xmm0;"
|
||||
:
|
||||
:"m"( *int128Ptr ) // input
|
||||
:"xmm0" // clobbered
|
||||
);
|
||||
__asm__ volatile("movups %%xmm0,%0;"
|
||||
: "=m" (wide128Values[i])// output
|
||||
: // input
|
||||
: "memory", "xmm0" // clobbered
|
||||
);
|
||||
|
||||
pos += 16;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user