|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!--
|
|
|
Copyright (c) 2017 OpenPOWER Foundation
|
|
|
|
|
|
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.
|
|
|
|
|
|
-->
|
|
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
version="5.0"
|
|
|
xml:id="ch_intel_intrinsic_porting">
|
|
|
<title>Intel Intrinsic porting guide for Power64LE</title>
|
|
|
|
|
|
<para>The goal of this project is to provide functional equivalents of the
|
|
|
Intel MMX, SSE, and AVX intrinsic functions, that are commonly used in Linux
|
|
|
applications, and make them (or equivalents) available for the PowerPC64LE
|
|
|
platform. These X86 intrinsics started with the Intel and Microsoft compilers
|
|
|
but were then ported to the GCC compiler. The GCC implementation is a set of
|
|
|
headers with inline functions. These inline functions provide an implementation
|
|
|
mapping from the Intel/Microsoft dialect intrinsic names to the corresponding
|
|
|
GCC Intel built-ins or directly via C language vector extension syntax.</para>
|
|
|
|
|
|
<para>The current proposal is to start with the existing X86 GCC intrinsic
|
|
|
headers and port them (copy and change the source) to POWER using C language
|
|
|
vector extensions, VMX and VSX built-ins. Another key assumption is that we
|
|
|
will be able to use many of the existing Intel DejaGNU test cases in
|
|
|
./gcc/testsuite/gcc.target/i386. This document is intended as a guide to
|
|
|
developers participating in this effort. However this document provides
|
|
|
guidance and examples that should be useful to developers who may encounter X86
|
|
|
intrinsics in code that they are porting to another platform.</para>
|
|
|
|
|
|
<note><para>(<emphasis>We have started contributions of X86 intrinsic headers
|
|
|
to the GCC project.</emphasis>) The current status of the project is the BMI
|
|
|
(bmiintrin.h), BMI2 (bmi2intrin.h), MMX (mmintrin.h), and SSE (xmmintrin.h)
|
|
|
intrinsic headers are committed to GCC development trunk for GCC 8.
|
|
|
Work on SSE2 (emmintrin.h) is in progress.
|
|
|
</para></note>
|
|
|
|
|
|
<xi:include href="sec_review_source.xml"/>
|
|
|
|
|
|
</chapter>
|
|
|
|