static really_inline void init_stream(struct hs_stream *s, const struct RoseEngine *rose) { s->rose = rose; s->offset = 0; u8 *state = (u8 *)getMultiState(s); roseInitState(rose, state); clearEvec((char *)state + rose->stateOffsets.exhausted, rose); // SOM state multibit structures. initSomState(rose, state); }
static really_inline void init_stream(struct hs_stream *s, const struct RoseEngine *rose) { char *state = getMultiState(s); // Make absolutely sure that the 16 bytes leading up to the end of the // history buffer are initialised, as we rely on this (regardless of the // actual values used) in FDR. char *hist_end = state + rose->stateOffsets.history + rose->historyRequired; assert(hist_end - 16 >= (const char *)s); unaligned_store_u64a(hist_end - 16, 0xDEADDEADDEADDEADull); unaligned_store_u64a(hist_end - 8, 0xDEADDEADDEADDEADull); s->rose = rose; s->offset = 0; setStreamStatus(state, 0); roseInitState(rose, state); clearEvec(rose, state + rose->stateOffsets.exhausted); // SOM state multibit structures. initSomState(rose, state); }