\documentclass[oneside]{book}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{lscape}
\usepackage{sectsty}
\usepackage{appendix}
\usepackage{graphicx}
\usepackage{anyfontsize}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
    \usepackage{mathspec}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage[unicode=true]{hyperref}
\hypersetup{
            pdfborder={0 0 0},
            breaklinks=true}
\usepackage[margin=0.9in]{geometry}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\},xleftmargin=5mm}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}

% indent all verbatim
\catcode`\@=11
\let \saveverbatime \@xverbatim
\def \@xverbatim {\leftskip = 1cm\relax\saveverbatime}
\catcode`\@=12

\usepackage{longtable,booktabs}
% Fix footnotes in tables (requires footnote package)
\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long 
table}}{}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

% set default figure placement to htbp
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\def\fps@figure{htbp}
\makeatother


\date{}

\begin{document}

\chapter*{Preamble}
\addcontentsline{toc}{chapter}{Preamble} \markboth{INTRODUCTION}{}

This document is an auto-generated version of the Draft SVP64
Specification available at

\begin{verbatim}
     https://libre-soc.org/openpower/sv
\end{verbatim}

for which the source code is available at

\begin{verbatim}
     https://git.libre-soc.org/?p=libreriscv.git;a=tree;f=openpower;hb=HEAD
\end{verbatim}

This PDF may be created with "make pdf" from the following file:

\begin{verbatim}
    https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/Makefile;hb=HEAD
\end{verbatim}

by executing the following commands:

\begin{verbatim}
    git clone https://git.libre-soc.org/git/libreriscv.git libresoc
    cd libresoc/libresoc/openpower
    make pdf
\end{verbatim}

Simple-V Cray-style Vectors have been developed by the Libre-SOC Team,
sponsored by the NLnet Foundation and NGI POINTER under
EU Grants 871528 and 957073.

Simple-V is in DRAFT Status and will be submitted publicly
(non-confidentially) through the OPF ISA WG "External Submissions"
Process. Funding from NLnet, through their Privacy and Enhanced Trust
Programme, requires full transparency.

\tableofcontents

\part{Scalable Vectors}

\chapter{Fields and Forms}
\hypertarget{svux2ffields}{}
\input{tex_out/fields.tex}
\chapter{Scalable Vectors for the Power ISA}
\hypertarget{svux2fscalvecpowisa}{}
\hypertarget{SVux7csv}{}
\input{tex_out/sv.tex}
\chapter{Other Vector ISAs}\hypertarget{svux2fvector_isa_comparison}{}
\input{tex_out/vector_isas.tex}
\chapter{Overview}\hypertarget{svux2foverview}{}
\input{tex_out/overview.tex}
\chapter{Compliancy Levels}\hypertarget{svux2fcompliancy_levels}{}
\input{tex_out/compliancy_levels.tex}
\chapter{SVP64}\hypertarget{svux2fsvp64}{}
\input{tex_out/svp64.tex}
\chapter{SPRs}\hypertarget{svux2fsprs}{}
\input{tex_out/sprs.tex}
\chapter{Arithmetic Mode}\hypertarget{svux2fnormal}{}
\input{tex_out/normal.tex}
\chapter{Load/Store Mode}\hypertarget{svux2fldst}{}
\input{tex_out/ldst.tex}
\chapter{Condition Register Fields Mode}\hypertarget{svux2fcr_ops}{}
\input{tex_out/cr_ops.tex}
\chapter{Branch Mode}\hypertarget{svux2fbranches}{}
\input{tex_out/branches.tex}
\chapter{setvl instruction}\hypertarget{svux2fsetvl}{}
\input{tex_out/setvl.tex}
\chapter{svstep instruction}\hypertarget{svux2fsvstep}{}
\input{tex_out/svstep.tex}
\chapter{REMAP subsystem}\hypertarget{svux2fremap}{}
\input{tex_out/remap.tex}
\chapter{Swizzle Move}\hypertarget{svux2fmv.swizzle}{}
\input{tex_out/mv_swizzle.tex}
\chapter{Pack / Unpack}\hypertarget{svux2fmv.vec}{}
\input{tex_out/mv_vec.tex}

\begin{appendices}
\chapter{SVP64 Appendix}\hypertarget{svp64ux2fappendix}{}
\hypertarget{svux2fsvp64ux2fappendix}{}
\input{tex_out/svp64_appendix.tex}
\chapter{SVP64 Quirks}\hypertarget{svux2fsvp64_quirks}{}
\input{tex_out/svp64_quirks.tex}
\chapter{REMAP algorithms}\hypertarget{svux2fremapux2fappendix}{}
\input{tex_out/remap_appendix.tex}
\chapter{Simple-V pseudocode}\hypertarget{svux2fpseudocode_simplev}{}
\input{tex_out/pseudocode_simplev.tex}
\chapter{SVP64 Augmentation Table}\hypertarget{opcode_regs_deduped}{}
\begin{landscape}
{
\fontsize{7}{9}\selectfont
\input{tex_out/opcode_regs_deduped.tex}
}
\end{landscape}
\end{appendices}

\part{Scalar Instructions}

\chapter{SV Vector ops}\hypertarget{svux2fvector_ops}{}
\input{tex_out/vector_ops.tex}
\chapter{CR Weird ops}\hypertarget{svux2fcr_int_predication}{}
\hypertarget{cr_int_predication}{}
\input{tex_out/cr_int_predication.tex}
\chapter{Bitmanip ops}\hypertarget{svux2fbitmanip}{}
\input{tex_out/bitmanip.tex}
\chapter{FP/Int Conversion ops}\hypertarget{svux2fint_fp_mv}{}
\input{tex_out/int_fp_mv.tex}
\chapter{FP Class ops}\hypertarget{svux2ffclass}{}
\input{tex_out/fclass.tex}
\chapter{Audio and Video Opcodes}\hypertarget{svux2fav_opcodes}{}
\hypertarget{av_opcodes}{}
\input{tex_out/av_opcodes.tex}
\chapter{Big Integer}\hypertarget{svux2fbiginteger}{}
\input{tex_out/big_integer.tex}
\chapter{Transcendentals}\hypertarget{transcendentals}{}
\input{tex_out/transcendentals.tex}
\chapter{Acquire/Release Atomic Memory}\hypertarget{atomics}{}
\input{tex_out/atomics.tex}

\begin{appendices}
\chapter{Big Integer Analysis}\hypertarget{svux2fbigintegerux2fanalysis}{}
\input{tex_out/big_integer_analysis.tex}
\chapter{Bitmanip pseudocode}\hypertarget{svux2fpseudocode_bitmanip}{}
\input{tex_out/pseudocode_bitmanip.tex}
\chapter{Floating Point pseudocode}\hypertarget{isaux2fsvfparith}{}
\input{tex_out/pseudocode_svfparith.tex}
\chapter{Fixed Point pseudocode}
\hypertarget{isaux2fsvfixedarith}{}
\input{tex_out/pseudocode_svfixedarith.tex}
\end{appendices}

\part{Scalar Power ISA pseudocode}

\chapter*{Preamble}
\addcontentsline{toc}{chapter}{Preamble} \markboth{INTRODUCTION}{}

This section contains updated pseudocode from the Power ISA Specification
v3.0B to be executable.  Several bugfixes in Power ISA v3.0B have been
found and reported as a direct result due to actually running the
pseudocode as executable code in a Simulator.
A Formal Correctness Proof Research Paper written by Boris
Shingarov.

Additionally, with SVP64 performing element-width over-rides it is the
\textit{Scalar} pseudocode that needs adapting to variable-length
(\textbf{XLEN}).  Maintaining duplicate identical copies in every
respect \textit{except} for an XLEN as part of the Simple-V Specification
is completely pointless and a waste of time: the updates to include
XLEN need to be part
of the Scalar Power ISA Specification.  This has the added benefit
that it makes life much easier for 32-bit implementors, and has an
additional benefit of making it possible for the Scalar Power ISA
to extend to 128-bit in future (like RV128).

\begin{appendices}
\chapter{Binary Coded Decimal pseudocode}
\hypertarget{svux2fpseudocode_bcd}{}
\input{tex_out/pseudocode_bcd.tex}
\chapter{Branch pseudocode}
\hypertarget{openpowerux2fisaux2fbranch}{}
\hypertarget{svux2fpseudocode_branch}{}
\input{tex_out/pseudocode_branch.tex}
\chapter{Fixed Point Compare pseudocode}
\hypertarget{svux2fpseudocode_comparefixed}{}
\input{tex_out/pseudocode_comparefixed.tex}
\chapter{Condition Register pseudocode}
\hypertarget{svux2fpseudocode_condition}{}
\input{tex_out/pseudocode_condition.tex}

\chapter{Fixed Point Arithmetic pseudocode}
\hypertarget{svux2fpseudocode_fixedarith}{}
\input{tex_out/pseudocode_fixedarith.tex}
\chapter{Fixed Point Load pseudocode}
\hypertarget{svux2fpseudocode_fixedload}{}
\input{tex_out/pseudocode_fixedload.tex}
\chapter{Fixed Point Logical pseudocode}
\hypertarget{svux2fpseudocode_fixedlogical}{}
\input{tex_out/pseudocode_fixedlogical.tex}
\chapter{Fixed Point Rotate pseudocode}
\hypertarget{svux2fpseudocode_fixedshift}{}
\input{tex_out/pseudocode_fixedshift.tex}

\chapter{Fixed Point Store pseudocode}
\hypertarget{svux2fpseudocode_fixedstore}{}
\input{tex_out/pseudocode_fixedstore.tex}
\chapter{Fixed Point Trap pseudocode}
\hypertarget{svux2fpseudocode_fixedtrap}{}
\input{tex_out/pseudocode_fixedtrap.tex}
\chapter{Special Purpose Register pseudocode}
\hypertarget{svux2fpseudocode_sprset}{}
\input{tex_out/pseudocode_sprset.tex}
\chapter{String Load/Store pseudocode}
\hypertarget{svux2fpseudocode_stringldst}{}
\input{tex_out/pseudocode_stringldst.tex}
\chapter{System Call pseudocode}
\hypertarget{svux2fpseudocode_system}{}
\input{tex_out/pseudocode_system.tex}

\chapter{Floating Point Load pseudocode}
\hypertarget{svux2fpseudocode_fpload}{}
\input{tex_out/pseudocode_fpload.tex}
\chapter{Floating Point Store pseudocode}
\hypertarget{svux2fpseudocode_fpstore}{}
\input{tex_out/pseudocode_fpstore.tex}
\chapter{Floating Point Move pseudocode}
\hypertarget{svux2fpseudocode_fpmove}{}
\input{tex_out/pseudocode_fpmove.tex}
\chapter{Floating Point Arithmetic pseudocode}
\hypertarget{svux2fpseudocode_fparith}{}
\input{tex_out/pseudocode_fparith.tex}
\chapter{Floating Point Integer Conversion pseudocode}
\hypertarget{svux2fpseudocode_fpcvt}{}
\input{tex_out/pseudocode_fpcvt.tex}

\end{appendices}




\end{document}
