pike.git
/
src
/
post_modules
/
Nettle
/
nettle.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/Nettle/nettle.cmod:548:
/*! @decl int(0..) crc32c(string(8bit) data) *! Implements the Castagnoli CRC, CRC32C. Hardware optimized on Intel *! CPUs with SSE 4.2. */ PIKEFUN int(0..) crc32c(string(8bit) data) { #ifdef HAVE_CRC32_INTRINSICS if(supports_sse42) {
-
RETURN
intel_crc32c((const unsigned int *)data->str, data->len);
+
push_int64(
intel_crc32c((const unsigned int *)data->str, data->len)
)
;
} else #endif /* HAVE_CRC32_INTRISINCS */ { unsigned int h=0xffffffff, i=0; for(; i<data->len; i++) h = (h>>8)^crc[(h^data->str[i])&0xFF];
-
RETURN
h ^ 0xffffffff;
+
push_int64(
h ^ 0xffffffff
)
;
} } /*! @endmodule */ #endif /* HAVE_LIBNETTLE */ PIKE_MODULE_INIT {