
44 changed files with 5362 additions and 0 deletions
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -0,0 +1,176 @@
@@ -0,0 +1,176 @@
|
||||
|
||||
Apache License |
||||
Version 2.0, January 2004 |
||||
http://www.apache.org/licenses/ |
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
||||
1. Definitions. |
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, |
||||
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by |
||||
the copyright owner that is granting the License. |
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all |
||||
other entities that control, are controlled by, or are under common |
||||
control with that entity. For the purposes of this definition, |
||||
"control" means (i) the power, direct or indirect, to cause the |
||||
direction or management of such entity, whether by contract or |
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity |
||||
exercising permissions granted by this License. |
||||
|
||||
"Source" form shall mean the preferred form for making modifications, |
||||
including but not limited to software source code, documentation |
||||
source, and configuration files. |
||||
|
||||
"Object" form shall mean any form resulting from mechanical |
||||
transformation or translation of a Source form, including but |
||||
not limited to compiled object code, generated documentation, |
||||
and conversions to other media types. |
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or |
||||
Object form, made available under the License, as indicated by a |
||||
copyright notice that is included in or attached to the work |
||||
(an example is provided in the Appendix below). |
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object |
||||
form, that is based on (or derived from) the Work and for which the |
||||
editorial revisions, annotations, elaborations, or other modifications |
||||
represent, as a whole, an original work of authorship. For the purposes |
||||
of this License, Derivative Works shall not include works that remain |
||||
separable from, or merely link (or bind by name) to the interfaces of, |
||||
the Work and Derivative Works thereof. |
||||
|
||||
"Contribution" shall mean any work of authorship, including |
||||
the original version of the Work and any modifications or additions |
||||
to that Work or Derivative Works thereof, that is intentionally |
||||
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
or by an individual or Legal Entity authorized to submit on behalf of |
||||
the copyright owner. For the purposes of this definition, "submitted" |
||||
means any form of electronic, verbal, or written communication sent |
||||
to the Licensor or its representatives, including but not limited to |
||||
communication on electronic mailing lists, source code control systems, |
||||
and issue tracking systems that are managed by, or on behalf of, the |
||||
Licensor for the purpose of discussing and improving the Work, but |
||||
excluding communication that is conspicuously marked or otherwise |
||||
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
on behalf of whom a Contribution has been received by Licensor and |
||||
subsequently incorporated within the Work. |
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
copyright license to reproduce, prepare Derivative Works of, |
||||
publicly display, publicly perform, sublicense, and distribute the |
||||
Work and such Derivative Works in Source or Object form. |
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
(except as stated in this section) patent license to make, have made, |
||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
where such license applies only to those patent claims licensable |
||||
by such Contributor that are necessarily infringed by their |
||||
Contribution(s) alone or by combination of their Contribution(s) |
||||
with the Work to which such Contribution(s) was submitted. If You |
||||
institute patent litigation against any entity (including a |
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
or a Contribution incorporated within the Work constitutes direct |
||||
or contributory patent infringement, then any patent licenses |
||||
granted to You under this License for that Work shall terminate |
||||
as of the date such litigation is filed. |
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the |
||||
Work or Derivative Works thereof in any medium, with or without |
||||
modifications, and in Source or Object form, provided that You |
||||
meet the following conditions: |
||||
|
||||
(a) You must give any other recipients of the Work or |
||||
Derivative Works a copy of this License; and |
||||
|
||||
(b) You must cause any modified files to carry prominent notices |
||||
stating that You changed the files; and |
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works |
||||
that You distribute, all copyright, patent, trademark, and |
||||
attribution notices from the Source form of the Work, |
||||
excluding those notices that do not pertain to any part of |
||||
the Derivative Works; and |
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its |
||||
distribution, then any Derivative Works that You distribute must |
||||
include a readable copy of the attribution notices contained |
||||
within such NOTICE file, excluding those notices that do not |
||||
pertain to any part of the Derivative Works, in at least one |
||||
of the following places: within a NOTICE text file distributed |
||||
as part of the Derivative Works; within the Source form or |
||||
documentation, if provided along with the Derivative Works; or, |
||||
within a display generated by the Derivative Works, if and |
||||
wherever such third-party notices normally appear. The contents |
||||
of the NOTICE file are for informational purposes only and |
||||
do not modify the License. You may add Your own attribution |
||||
notices within Derivative Works that You distribute, alongside |
||||
or as an addendum to the NOTICE text from the Work, provided |
||||
that such additional attribution notices cannot be construed |
||||
as modifying the License. |
||||
|
||||
You may add Your own copyright statement to Your modifications and |
||||
may provide additional or different license terms and conditions |
||||
for use, reproduction, or distribution of Your modifications, or |
||||
for any such Derivative Works as a whole, provided Your use, |
||||
reproduction, and distribution of the Work otherwise complies with |
||||
the conditions stated in this License. |
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
any Contribution intentionally submitted for inclusion in the Work |
||||
by You to the Licensor shall be under the terms and conditions of |
||||
this License, without any additional terms or conditions. |
||||
Notwithstanding the above, nothing herein shall supersede or modify |
||||
the terms of any separate license agreement you may have executed |
||||
with Licensor regarding such Contributions. |
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade |
||||
names, trademarks, service marks, or product names of the Licensor, |
||||
except as required for reasonable and customary use in describing the |
||||
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
agreed to in writing, Licensor provides the Work (and each |
||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
implied, including, without limitation, any warranties or conditions |
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
appropriateness of using or redistributing the Work and assume any |
||||
risks associated with Your exercise of permissions under this License. |
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, |
||||
whether in tort (including negligence), contract, or otherwise, |
||||
unless required by applicable law (such as deliberate and grossly |
||||
negligent acts) or agreed to in writing, shall any Contributor be |
||||
liable to You for damages, including any direct, indirect, special, |
||||
incidental, or consequential damages of any character arising as a |
||||
result of this License or out of the use or inability to use the |
||||
Work (including but not limited to damages for loss of goodwill, |
||||
work stoppage, computer failure or malfunction, or any and all |
||||
other commercial damages or losses), even if such Contributor |
||||
has been advised of the possibility of such damages. |
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing |
||||
the Work or Derivative Works thereof, You may choose to offer, |
||||
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
or other liability obligations and/or rights consistent with this |
||||
License. However, in accepting such obligations, You may act only |
||||
on Your own behalf and on Your sole responsibility, not on behalf |
||||
of any other Contributor, and only if You agree to indemnify, |
||||
defend, and hold each Contributor harmless for any liability |
||||
incurred by, or claims asserted against, such Contributor by reason |
||||
of your accepting any such warranty or additional liability. |
||||
|
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
# Porting Guide for Linux on Power |
||||
TBD... |
||||
|
||||
To build this project, one must ensure that the Docs-Master project has |
||||
also been cloned at the same directory level as the Docs-Template project. |
||||
This can be accomplished with the following steps: |
||||
|
||||
1. Clone the master documentation project (Docs-Master) using the following command: |
||||
|
||||
``` |
||||
$ git clone https://github.com/OpenPOWERFoundation/Docs-Master.git |
||||
``` |
||||
|
||||
2. Clone this project (Docs-Template) using the following command: |
||||
|
||||
``` |
||||
$ git clone https://ibm.github.com/scheel/SJM-Porting-Guide.git |
||||
``` |
||||
|
||||
3. Build the project with these commands: |
||||
``` |
||||
$ cd SJM-Porting-Guide |
||||
$ mvn clean generate-sources |
||||
``` |
||||
|
||||
The online version of the document can be found in the OpenPOWER Foundation |
||||
Document library at [TBD](http://openpowerfoundation.org/?resource_lib=TBD). |
||||
|
||||
The project which controls the look and feel of the document is the |
||||
[Docs-Maven-Plugin project](https://github.com/OpenPOWERFoundation/Docs-Maven-Plugin), an |
||||
OpenPOWER Foundation private project on GitHub. To obtain access to the Maven Plugin project, |
||||
contact Jeff Scheel \([scheel@us.ibm.com](mailto://scheel@us.ibm.com)\) or |
||||
Jeff Brown \([jeffdb@us.ibm.com](mailto://jeffdb@us.ibm.com)\). |
||||
|
||||
## License |
||||
This project is licensed under the Apache V2 license. More information |
||||
can be found in the LICENSE file or online at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
## Community |
||||
TBD... |
||||
|
||||
## Contributions |
||||
TBD... |
||||
|
||||
Contributions to this project should conform to the `Developer Certificate |
||||
of Origin` as defined at http://elinux.org/Developer_Certificate_Of_Origin. |
||||
Commits to this project need to contain the following line to indicate |
||||
the submitter accepts the DCO: |
||||
``` |
||||
Signed-off-by: Your Name <your_email@domain.com> |
||||
``` |
||||
By contributing in this way, you agree to the terms as follows: |
||||
``` |
||||
Developer Certificate of Origin |
||||
Version 1.1 |
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
||||
660 York Street, Suite 102, |
||||
San Francisco, CA 94110 USA |
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this |
||||
license document, but changing it is not allowed. |
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1 |
||||
|
||||
By making a contribution to this project, I certify that: |
||||
|
||||
(a) The contribution was created in whole or in part by me and I |
||||
have the right to submit it under the open source license |
||||
indicated in the file; or |
||||
|
||||
(b) The contribution is based upon previous work that, to the best |
||||
of my knowledge, is covered under an appropriate open source |
||||
license and I have the right under that license to submit that |
||||
work with modifications, whether created in whole or in part |
||||
by me, under the same open source license (unless I am |
||||
permitted to submit under a different license), as indicated |
||||
in the file; or |
||||
|
||||
(c) The contribution was provided directly to me by some other |
||||
person who certified (a), (b) or (c) and I have not modified |
||||
it. |
||||
|
||||
(d) I understand and agree that this project and the contribution |
||||
are public and that a record of the contribution (including all |
||||
personal information I submit with it, including my sign-off) is |
||||
maintained indefinitely and may be redistributed consistent with |
||||
this project or the open source license(s) involved. |
||||
``` |
||||
|
@ -0,0 +1,318 @@
@@ -0,0 +1,318 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<appendix 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="app_intel_suffixes"> |
||||
<?dbhtml stop-chunking?> |
||||
<title>Intel Intrinsic suffixes</title> |
||||
|
||||
<section> |
||||
<title>MMX</title> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pi16</literal></emphasis></term> |
||||
<listitem><para>4 x packed short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pi32</literal></emphasis></term> |
||||
<listitem><para>2 x packed int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pi8</literal></emphasis></term> |
||||
<listitem><para>8 x packed signed char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pu16</literal></emphasis></term> |
||||
<listitem><para>4 x packed unsigned short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pu8</literal></emphasis></term> |
||||
<listitem><para>8 x packed unsigned char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si64</literal></emphasis></term> |
||||
<listitem><para>single 64-bit binary (logical)</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</section> |
||||
|
||||
<section> |
||||
<title>SSE</title> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps</literal></emphasis></term> |
||||
<listitem><para>4 x packed float</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ss</literal></emphasis></term> |
||||
<listitem><para>single scalar float</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si32</literal></emphasis></term> |
||||
<listitem><para>single 32-bit int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si64</literal></emphasis></term> |
||||
<listitem><para>single 64-bit long int</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</section> |
||||
|
||||
<section> |
||||
<title>SSE2</title> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi16</literal></emphasis></term> |
||||
<listitem><para>8 x packed short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi32</literal></emphasis></term> |
||||
<listitem><para>4 x packed int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi64</literal></emphasis></term> |
||||
<listitem><para>2 x packed long int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi8</literal></emphasis></term> |
||||
<listitem><para>16 x packed signed char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu16</literal></emphasis></term> |
||||
<listitem><para>8 x packed unsigned short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu32</literal></emphasis></term> |
||||
<listitem><para>4 x packed unsigned int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu8</literal></emphasis></term> |
||||
<listitem><para>16 x packed unsigned char</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
|
||||
<!-- Is this break really desired? --> |
||||
<para/> |
||||
|
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd</literal></emphasis></term> |
||||
<listitem><para>2 x packed double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_sd</literal></emphasis></term> |
||||
<listitem><para>single scalar double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pi64</literal></emphasis></term> |
||||
<listitem><para>single long int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si128</literal></emphasis></term> |
||||
<listitem><para>single 128-bit binary (logical)</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
|
||||
</section> |
||||
|
||||
<section> |
||||
<title>AVX/AVX2 __m256_*</title> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps</literal></emphasis></term> |
||||
<listitem><para>8 x packed float</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd</literal></emphasis></term> |
||||
<listitem><para>4 x packed double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi16</literal></emphasis></term> |
||||
<listitem><para>16 x packed short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi32</literal></emphasis></term> |
||||
<listitem><para>8 x packed int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi64</literal></emphasis></term> |
||||
<listitem><para>4 x packed long int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi8</literal></emphasis></term> |
||||
<listitem><para>32 x packed signed char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu16</literal></emphasis></term> |
||||
<listitem><para>16 x packed unsigned short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu32</literal></emphasis></term> |
||||
<listitem><para>8 x packed unsigned int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu8</literal></emphasis></term> |
||||
<listitem><para>32 x packed unsigned char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ss</literal></emphasis></term> |
||||
<listitem><para>single scalar float (broadcast/splat)</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_sd</literal></emphasis></term> |
||||
<listitem><para>single scalar double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si256</literal></emphasis></term> |
||||
<listitem><para>single 256-bit binary (logical)</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd256</literal></emphasis></term> |
||||
<listitem><para>cast / zero extend</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps256</literal></emphasis></term> |
||||
<listitem><para>cast / zero extend</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd128</literal></emphasis></term> |
||||
<listitem><para>cast</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps128</literal></emphasis></term> |
||||
<listitem><para>cast</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</section> |
||||
|
||||
<section> |
||||
<title>AVX512 __m512_*</title> |
||||
<variablelist> |
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps</literal></emphasis></term> |
||||
<listitem><para>16 x packed float</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd</literal></emphasis></term> |
||||
<listitem><para>8 x packed double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi16</literal></emphasis></term> |
||||
<listitem><para>32 x packed short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi32</literal></emphasis></term> |
||||
<listitem><para>16 x packed int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi64</literal></emphasis></term> |
||||
<listitem><para>8 x packed long int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epi8</literal></emphasis></term> |
||||
<listitem><para>64 x packed signed char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu16</literal></emphasis></term> |
||||
<listitem><para>32 x packed unsigned short int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu32</literal></emphasis></term> |
||||
<listitem><para>16 x packed unsigned int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu64</literal></emphasis></term> |
||||
<listitem><para>8 x packed unsigned long int</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_epu8</literal></emphasis></term> |
||||
<listitem><para>64 x packed unsigned char</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ss</literal></emphasis></term> |
||||
<listitem><para>single scalar float</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_sd</literal></emphasis></term> |
||||
<listitem><para>single scalar double</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_si512</literal></emphasis></term> |
||||
<listitem><para>single 512-bit binary (logical)</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_pd512</literal></emphasis></term> |
||||
<listitem><para>cast / zero extend</para></listitem> |
||||
</varlistentry> |
||||
|
||||
<varlistentry> |
||||
<term><emphasis role="bold"><literal>_ps512</literal></emphasis></term> |
||||
<listitem><para>cast / zero extend</para></listitem> |
||||
</varlistentry> |
||||
</variablelist> |
||||
</section> |
||||
|
||||
</appendix> |
||||
|
@ -0,0 +1,70 @@
@@ -0,0 +1,70 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<appendix 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="app_references"> |
||||
<?dbhtml stop-chunking?> |
||||
<title>Document references</title> |
||||
|
||||
<section> |
||||
<title>OpenPOWER and Power documents</title> |
||||
<para> |
||||
<link xlink:href="https://openpowerfoundation.org/technical/technical-resources/technical-specifications/">OpenPOWER™ Technical Specifications</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://openpowerfoundation.org/?resource_lib=ibm-power-isa-version-2-07-b">Power ISA™ Version 2.07 B</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://www.docdroid.net/tWT7hjD/powerisa-v30.pdf.html">Power ISA™ Version 3.0</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://openpowerfoundation.org/technical/technical-resources/technical-specifications/">Power Architecture 64-bit ELF ABI Specification (AKA OpenPower ABI for Linux Supplement)</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="http://www.nxp.com/assets/documents/data/en/reference-manuals/ALTIVECPEM.pdf">AltiVec™ Technology Programming Environments Manual</link> |
||||
</para> |
||||
|
||||
</section> |
||||
<section> |
||||
<title>A.2 Intel documents</title> |
||||
<para> |
||||
<link xlink:href="https://software.intel.com/en-us/articles/intel-sdm">Intel® 64 and IA-32 Architectures Software Developer’s Manual</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/">Intel™ Intrinsics Guide</link> |
||||
</para> |
||||
<para/> |
||||
</section> |
||||
<section> |
||||
<title>A.3 GNU Compiler Collection (GCC) documents</title> |
||||
<para> |
||||
<link xlink:href="https://gcc.gnu.org/onlinedocs/">GCC online documentation</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/">GCC Manual (GCC 6.3)</link> |
||||
</para> |
||||
<para> |
||||
<link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/">GCC Internals Manual</link> |
||||
</para> |
||||
<para/> |
||||
</section> |
||||
|
||||
</appendix> |
||||
|
@ -0,0 +1,103 @@
@@ -0,0 +1,103 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<book 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="bk_main"> |
||||
|
||||
<title>Linux on Power Porting Guide</title> |
||||
<subtitle>Vector Intrinsic</subtitle> |
||||
|
||||
<info> |
||||
<author> |
||||
<personname> |
||||
<surname>System Software Work Group</surname> |
||||
</personname> |
||||
<email>syssw-chair@openpowerfoundation.org</email> |
||||
<affiliation> |
||||
<orgname>OpenPOWER Foundation</orgname> |
||||
</affiliation> |
||||
</author> |
||||
<copyright> |
||||
<year>2017</year> |
||||
<holder>OpenPOWER Foundation</holder> |
||||
</copyright> |
||||
<!-- TODO: Set the correct document releaseinfo --> |
||||
<releaseinfo>Revision 0.1</releaseinfo> |
||||
<productname>OpenPOWER</productname> |
||||
<pubdate/> |
||||
|
||||
<legalnotice role="apache2"> |
||||
|
||||
<annotation> |
||||
<remark>Copyright details are filled in by the template.</remark> |
||||
</annotation> |
||||
</legalnotice> |
||||
|
||||
<!-- TODO: Update the following text with the correct document description (first paragraph), |
||||
Work Group name, and Work Product track (both in second paragraph). --> |
||||
<abstract> |
||||
<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.</para> |
||||
|
||||
<para>This document is a Standard Track, Work Group Note work product owned by the |
||||
System Software Workgroup and handled in compliance with the requirements outlined in the |
||||
<citetitle>OpenPOWER Foundation Work Group (WG) Process</citetitle> document. It was |
||||
created using the <citetitle>Master Template Guide</citetitle> version 0.9.5. Comments, |
||||
questions, etc. can be submitted to the public mailing list for this document at |
||||
<link xlink:href="http://tbd.openpowerfoundation.org">TBD</link>.</para> |
||||
</abstract> |
||||
|
||||
<revhistory> |
||||
<!-- TODO: Update as new revisions created --> |
||||
<revision> |
||||
<date>2017-07-26</date> |
||||
<revdescription> |
||||
<itemizedlist spacing="compact"> |
||||
<listitem> |
||||
<para>Revision 0.1 - initial draft from Steve Munroe</para> |
||||
</listitem> |
||||
</itemizedlist> |
||||
</revdescription> |
||||
</revision> |
||||
</revhistory> |
||||
</info> |
||||
|
||||
<!-- The ch_preface.xml file is required by all documents --> |
||||
<xi:include href="../../Docs-Master/common/ch_preface.xml"/> |
||||
|
||||
<!-- Chapter heading files --> |
||||
<xi:include href="ch_intel_intrinsic_porting.xml"/> |
||||
<xi:include href="ch_howto_start.xml"/> |
||||
|
||||
<!-- Placeholder files ATM --> |
||||
<!--chapter><title>Placeholders</title> |
||||
</chapter--> |
||||
|
||||
|
||||
<!-- Document specific appendices --> |
||||
<xi:include href="app_references.xml"/> |
||||
<xi:include href="app_intel_suffixes.xml"/> |
||||
|
||||
<!-- The app_foundation.xml appendix file is required by all documents. --> |
||||
<xi:include href="../../Docs-Master/common/app_foundation.xml"/> |
||||
|
||||
</book> |
@ -0,0 +1,148 @@
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
||||
<parent> |
||||
|
||||
<groupId>org.openpowerfoundation.docs</groupId> |
||||
<artifactId>workgroup-pom</artifactId> |
||||
<version>1.0.0-SNAPSHOT</version> |
||||
<relativePath>../pom.xml</relativePath> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<!-- TODO: Rename the artifactID field to some appropriate for your new document --> |
||||
<artifactId>Porting-Guide-Vector-Intrinsics</artifactId> |
||||
|
||||
<packaging>jar</packaging> |
||||
|
||||
<!-- TODO: Rename the name field to some appropriate for your new document --> |
||||
<name>Porting-Guide-Vector-Intrinsics</name> |
||||
|
||||
<properties> |
||||
<!-- This is set by Jenkins according to the branch. --> |
||||
<release.path.name></release.path.name> |
||||
<comments.enabled>0</comments.enabled> |
||||
</properties> |
||||
<!-- ################################################ --> |
||||
<!-- USE "mvn clean generate-sources" to run this POM --> |
||||
<!-- ################################################ --> |
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
|
||||
<groupId>org.openpowerfoundation.docs</groupId> |
||||
|
||||
<artifactId>openpowerdocs-maven-plugin</artifactId> |
||||
<!-- version set in ../pom.xml --> |
||||
<executions> |
||||
<execution> |
||||
<id>generate-webhelp</id> |
||||
<goals> |
||||
<goal>generate-webhelp</goal> |
||||
</goals> |
||||
<phase>generate-sources</phase> |
||||
<configuration> |
||||
<!-- These parameters only apply to webhelp --> |
||||
<enableDisqus>${comments.enabled}</enableDisqus> |
||||
<disqusShortname>LoPAR-Virtualization</disqusShortname> |
||||
<enableGoogleAnalytics>1</enableGoogleAnalytics> |
||||
<googleAnalyticsId>UA-17511903-1</googleAnalyticsId> |
||||
<generateToc> |
||||
appendix toc,title |
||||
article/appendix nop |
||||
article toc,title |
||||
book toc,title,figure,table,example,equation |
||||
book/appendix nop |
||||
book/chapter nop |
||||
chapter toc,title |
||||
chapter/section nop |
||||
section toc |
||||
part toc,title |
||||
qandadiv toc |
||||
qandaset toc |
||||
reference toc,title |
||||
set toc,title |
||||
</generateToc> |
||||
<!-- The following elements sets the autonumbering of sections in output for chapter numbers but no numbered sections--> |
||||
<sectionAutolabel>1</sectionAutolabel> |
||||
<tocSectionDepth>3</tocSectionDepth> |
||||
<sectionLabelIncludesComponentLabel>1</sectionLabelIncludesComponentLabel> |
||||
|
||||
<!-- TODO: Rename the webhelpDirname field to the new directory for new document --> |
||||
<webhelpDirname>Vector-Intrinsics</webhelpDirname> |
||||
|
||||
<!-- TODO: Rename the pdfFilenameBase field to the PDF name for new document --> |
||||
<pdfFilenameBase>Vector-Intrinsics</pdfFilenameBase> |
||||
|
||||
<!-- TODO: Define the appropriate work product type. These values are defined by the IPR Policy. |
||||
Consult with the Work Group Chair or a Technical Steering Committee member if you have |
||||
questions about which value to select. |
||||
|
||||
If no value is provided below, the document will default to "Work Group Notes".--> |
||||
<workProduct>workgroupNotes</workProduct> |
||||
<!--workProduct>workgroupSpecification</workProduct--> |
||||
<!-- workProduct>candidateStandard</workProduct --> |
||||
<!-- workProduct>openpowerStandard</workProduct --> |
||||
|
||||
<!-- TODO: Set the appropriate security policy for the document. For documents |
||||
which are not "public" this will affect the document title page and |
||||
create a vertical running ribbon on the internal margin of the |
||||
security status in all CAPS. Values and definitions are formally |
||||
defined by the IPR policy. A layman's definition follows: |
||||
|
||||
public = this document may be shared outside the |
||||
foundation and thus this setting must be |
||||
used only when completely sure it allowed |
||||
foundationConfidential = this document may be shared freely with |
||||
OpenPOWER Foundation members but may not be |
||||
shared publicly |
||||
workgroupConfidential = this document may only be shared within the |
||||
work group and should not be shared with |
||||
other Foundation members or the public |
||||
|
||||
The appropriate starting security for a new document is "workgroupConfidential". --> |
||||
<!--security>workgroupConfidential</security --> |
||||
<!-- security>foundationConfidential</security --> |
||||
<security>public</security> |
||||
|
||||
<!-- TODO: Set the appropriate work flow status for the document. For documents |
||||
which are not "published" this will affect the document title page |
||||
and create a vertical running ribbon on the internal margin of the |
||||
security status in all CAPS. Values and definitions are formally |
||||
defined by the IPR policy. A layman's definition follows: |
||||
|
||||
published = this document has completed all reviews and has |
||||
been published |
||||
draft = this document is actively being updated and has |
||||
not yet been reviewed |
||||
review = this document is presently being reviewed |
||||
|
||||
The appropriate starting security for a new document is "draft". --> |
||||
<documentStatus>draft</documentStatus> |
||||
<!-- documentStatus>review</documentStatus --> |
||||
<!-- documentStatus>publish</documentStatus --> |
||||
|
||||
</configuration> |
||||
</execution> |
||||
</executions> |
||||
<configuration> |
||||
<!-- These parameters apply to pdf and webhelp --> |
||||
<xincludeSupported>true</xincludeSupported> |
||||
<sourceDirectory>.</sourceDirectory> |
||||
<includes> |
||||
<!-- TODO: If you desire, you may change the following filename to something more appropriate for the new document --> |
||||
bk_main.xml |
||||
</includes> |
||||
|
||||
<!-- **TODO: Set to the correct project URL. This likely needs input from the TSC. --> |
||||
<!-- canonicalUrlBase>http://openpowerfoundation.org/docs/template-guide/content</canonicalUrlBase --> |
||||
<glossaryCollection>${basedir}/../glossary/glossary-terms.xml</glossaryCollection> |
||||
<includeCoverLogo>1</includeCoverLogo> |
||||
<coverUrl>www.openpowerfoundation.org</coverUrl> |
||||
</configuration> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
</project> |
||||
|
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<section 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="sec_api_implemented"> |
||||
<title>How the API is implemented</title> |
||||
|
||||
<para>One pleasant surprise is that many (at least for the older Intel) |
||||
Intrinsics are implemented directly in C vector extension code and/or a simple |
||||
mapping to GCC target specific builtins. </para> |
||||
|
||||
<xi:include href="sec_simple_examples.xml"/> |
||||
<xi:include href="sec_extra_attributes.xml"/> |
||||
<xi:include href="sec_how_findout.xml"/> |
||||
<xi:include href="sec_other_intrinsic_examples.xml"/> |
||||
|
||||
</section> |
||||
|
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<section 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="sec_floatingpoint_rounding"> |
||||
<title>Floating-point rounding modes</title> |
||||
|
||||
<para>The Intel (x86 / x86_64) and PowerISA architectures both support the |
||||
4 IEEE754 rounding modes. Again while the Intel Intrinsic API allows the |
||||
application to change rounding modes via updates to the |
||||
<literal>MXCSR</literal> it is a bad idea |
||||
and should be replaced with the POSIX APIs (<literal>fegetround</literal> and |
||||
<literal>fesetround</literal>). </para> |
||||
|
||||
</section> |
||||
|
@ -0,0 +1,91 @@
@@ -0,0 +1,91 @@
|
||||
<?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. |
||||
|
||||
--> |
||||
<section 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="sec_handling_avx"> |
||||
<title>Dealing with AVX and AVX512</title> |
||||
|
||||
<para>AVX is a bit easier for PowerISA and the ELF V2 ABI. First we have |
||||
lots (64) of vector registers and a super scalar vector pipe-line (can execute |
||||
two or more independent 128-bit vector operations concurrently). Second the ELF |
||||
V2 ABI was designed to pass and return larger aggregates in vector |
||||
registers:</para> |
||||
|
||||
<itemizedlist> |
||||
<listitem> |
||||
<para>Up to 12 qualified vector arguments can be passed in |
||||
v2–v13.</para> |
||||
</listitem> |
||||
<listitem> |
||||
<para>A qualified vector argument corresponds to: |
||||
<itemizedlist> |
||||
<listitem> |
||||
<para>A vector data type</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para>A member of a homogeneous aggregate of multiple like data types |
||||
passed in up to eight vector registers.</para> |
||||
</listitem> |
||||
|
||||
<listitem> |
||||
<para>Homogeneous floating-point or vector aggregate return values |
||||
that consist of up to eight registers with up to eight elements will |
||||
be returned in floating-point or vector registers that correspond to |
||||
the parameter registers that would be used if the return value type |
||||
were the first input parameter to a function.</para> |
||||
</listitem> |
||||
</itemizedlist> |
||||
</para> |
||||
</listitem> |
||||
</itemizedlist> |
||||
|
||||
<para>So the ABI allows for passing up to three structures each |
||||
representing 512-bit vectors and returning such (512-bit) structure all in VMX |
||||
registers. This can be extended further by spilling parameters (beyond 12 X |
||||
128-bit vectors) to the parameter save area, but we should not need that, as |
||||
most intrinsics only use 2 or 3 operands.. Vector registers not needed for |
||||
parameter passing, along with an additional 8 volatile vector registers, are |
||||
available for scratch and local variables. All can be used by the application |
||||
without requiring register spill to the save area. So most intrinsic operations |
||||
on 256- or 512-bit vectors can be held within existing PowerISA vector |
||||
registers. </para> |
||||
|
||||
<para>For larger functions that might use multiple AVX 256 or 512-bit |
||||
intrinsics and, as a result, push beyond the 20 volatile vector registers, the |
||||
compiler will just allocate non-volatile vector registers by allocating a stack |
||||
frame and spilling non-volatile vector registers to the save area (as needed in |
||||
the function prologue). This frees up to 64 vectors (32 x 256-bit or 16 x |
||||
512-bit structs) for code optimization. </para> |
||||
|
||||