These are required when building with sparse and x86-64-v3 architecture enforced, e.g., on Ubuntu 26.04. The approach is the same as for the immintrin.h and the xmmintrin.h.
Signed-off-by: Ilya Maximets <[email protected]> --- include/sparse/automake.mk | 1 + include/sparse/smmintrin.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 include/sparse/smmintrin.h diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk index 6584b5617..16ec3dda6 100644 --- a/include/sparse/automake.mk +++ b/include/sparse/automake.mk @@ -1,6 +1,7 @@ noinst_HEADERS += \ include/sparse/rte_byteorder.h \ include/sparse/immintrin.h \ + include/sparse/smmintrin.h \ include/sparse/xmmintrin.h \ include/sparse/arpa/inet.h \ include/sparse/bits/floatn.h \ diff --git a/include/sparse/smmintrin.h b/include/sparse/smmintrin.h new file mode 100644 index 000000000..8918c4eec --- /dev/null +++ b/include/sparse/smmintrin.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2026 Red Hat, LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CHECKER__ +#error "Use this header only with sparse. It is not a correct implementation." +#endif + +#define __builtin_ia32_crc32si(crc, value) ((unsigned int) 0) +#define __builtin_ia32_crc32di(crc, value) ((unsigned long long) 0) + +/* Get actual <smmintrin.h> definitions for us to annotate and build on. */ +#include_next <smmintrin.h> -- 2.55.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
