Imported Upstream version 16.11
[deb_dpdk.git] / lib / librte_eal / common / include / arch / ppc_64 / rte_vect.h
similarity index 69%
rename from lib/librte_eal/bsdapp/eal/eal_log.c
rename to lib/librte_eal/common/include/arch/ppc_64/rte_vect.h
index a425f7a..05209e5 100644 (file)
@@ -1,8 +1,7 @@
-/*-
+/*
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
+ *   Copyright (C) IBM Corporation 2016.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -14,7 +13,7 @@
  *       notice, this list of conditions and the following disclaimer in
  *       the documentation and/or other materials provided with the
  *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
+ *     * Neither the name of IBM Corporation nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+*/
 
-#include <stdio.h>
-#include <rte_common.h>
-#include <rte_log.h>
+#ifndef _RTE_VECT_PPC_64_H_
+#define _RTE_VECT_PPC_64_H_
 
-#include <eal_private.h>
+#include <altivec.h>
 
-/*
- * set the log to default function, called during eal init process,
- * once memzones are available.
- */
-int
-rte_eal_log_init(const char *id __rte_unused, int facility __rte_unused)
-{
-       if (rte_eal_common_log_init(stderr) < 0)
-               return -1;
-       return 0;
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef vector signed int xmm_t;
 
-int
-rte_eal_log_early_init(void)
-{
-       rte_openlog_stream(stderr);
-       return 0;
+#define        XMM_SIZE        (sizeof(xmm_t))
+#define        XMM_MASK        (XMM_SIZE - 1)
+
+typedef union rte_xmm {
+       xmm_t    x;
+       uint8_t  u8[XMM_SIZE / sizeof(uint8_t)];
+       uint16_t u16[XMM_SIZE / sizeof(uint16_t)];
+       uint32_t u32[XMM_SIZE / sizeof(uint32_t)];
+       uint64_t u64[XMM_SIZE / sizeof(uint64_t)];
+       double   pd[XMM_SIZE / sizeof(double)];
+} __attribute__((aligned(16))) rte_xmm_t;
+
+#ifdef __cplusplus
 }
+#endif
+
+#endif /* _RTE_VECT_PPC_64_H_ */