#include "c.h"
#include "port/pg_crc32c.h"
Go to the source code of this file.
◆ pg_comp_crc32c_loongarch()
Definition at line 20 of file pg_crc32c_loongarch.c.
21{
22 const unsigned char *p =
data;
23 const unsigned char *
pend = p +
len;
24
25
26
27
28
29
32 {
33 crc = __builtin_loongarch_crcc_w_b_w(*p,
crc);
34 p += 1;
35 }
38 {
39 crc = __builtin_loongarch_crcc_w_h_w(*(
uint16 *) p,
crc);
40 p += 2;
41 }
44 {
45 crc = __builtin_loongarch_crcc_w_w_w(*(
uint32 *) p,
crc);
46 p += 4;
47 }
48
49
51 {
52 crc = __builtin_loongarch_crcc_w_d_w(*(
uint64 *) p,
crc);
53 p += 8;
54 }
55
56
58 {
59 crc = __builtin_loongarch_crcc_w_w_w(*(
uint32 *) p,
crc);
60 p += 4;
61 }
63 {
64 crc = __builtin_loongarch_crcc_w_h_w(*(
uint16 *) p,
crc);
65 p += 2;
66 }
68 {
69 crc = __builtin_loongarch_crcc_w_b_w(*p,
crc);
70 }
71
73}
#define PointerIsAligned(pointer, type)
const unsigned char * pend
References crc, data, len, pend, and PointerIsAligned.