mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 01:41:51 +03:00
Introduce a 64-bit LimEx model.
On 64-bit platforms, the Limex 64 model is implemented in normal GPRs. On 32-bit platforms, however, 128-bit SSE registers are used for the runtime implementation.
This commit is contained in:
@@ -82,6 +82,22 @@ size_t doAccel32(u32 s, u32 accel, const u8 *accelTable,
|
||||
return accelScanWrapper(accelTable, aux, input, idx, i, end);
|
||||
}
|
||||
|
||||
#ifdef ARCH_64_BIT
|
||||
size_t doAccel64(u64a s, u64a accel, const u8 *accelTable,
|
||||
const union AccelAux *aux, const u8 *input, size_t i,
|
||||
size_t end) {
|
||||
u32 idx = packedExtract64(s, accel);
|
||||
return accelScanWrapper(accelTable, aux, input, idx, i, end);
|
||||
}
|
||||
#else
|
||||
size_t doAccel64(m128 s, m128 accel, const u8 *accelTable,
|
||||
const union AccelAux *aux, const u8 *input, size_t i,
|
||||
size_t end) {
|
||||
u32 idx = packedExtract64(movq(s), movq(accel));
|
||||
return accelScanWrapper(accelTable, aux, input, idx, i, end);
|
||||
}
|
||||
#endif
|
||||
|
||||
size_t doAccel128(const m128 *state, const struct LimExNFA128 *limex,
|
||||
const u8 *accelTable, const union AccelAux *aux,
|
||||
const u8 *input, size_t i, size_t end) {
|
||||
|
||||
Reference in New Issue
Block a user