comparison crc32x86.c @ 2:ead9f84d11db

*: make it work on non-x86 too
author Paper <paper@tflc.us>
date Mon, 09 Feb 2026 01:21:00 -0500
parents 422835bc1aca
children 6483683ac857
comparison
equal deleted inserted replaced
1:90cb48b87dcc 2:ead9f84d11db
1 /* x86-specific CRC routines */ 1 /* x86-specific CRC routines */
2
3 #ifdef __x86_64__
2 4
3 #include "crc32.h" 5 #include "crc32.h"
4 #include "crc32i.h" 6 #include "crc32i.h"
5 #include <stdio.h> 7 #include <stdio.h>
6 #include <immintrin.h> 8 #include <immintrin.h>
199 * or else it will break), and we process 16-bytes at a time. This 201 * or else it will break), and we process 16-bytes at a time. This
200 * means `msg` is aligned 16-bytes, a multiple of 4-byte, so we don't 202 * means `msg` is aligned 16-bytes, a multiple of 4-byte, so we don't
201 * need to align any more (or use crc32c_r). */ 203 * need to align any more (or use crc32c_r). */
202 return crc32qw_r(crc, msg, sz); 204 return crc32qw_r(crc, msg, sz);
203 } 205 }
206
207 #endif