Index: doc/papers/concurrency/Paper.tex
===================================================================
--- doc/papers/concurrency/Paper.tex	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ doc/papers/concurrency/Paper.tex	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -248,8 +248,8 @@
 }
 
-\newbox\myboxA
-\newbox\myboxB
-\newbox\myboxC
-\newbox\myboxD
+\newsavebox{\myboxA}
+\newsavebox{\myboxB}
+\newsavebox{\myboxC}
+\newsavebox{\myboxD}
 
 \title{\texorpdfstring{Advanced Control-flow and Concurrency in \protect\CFA}{Advanced Control-flow in Cforall}}
@@ -2967,7 +2967,8 @@
 \lstset{language=CFA,moredelim=**[is][\color{red}]{@}{@},deletedelim=**[is][]{`}{`}}
 \begin{cfa}[aboveskip=0pt,belowskip=0pt]
-@coroutine@ C {} c;
-void main( C & ) { while () { @suspend;@ } }
+@coroutine@ C {};
+void main( C & ) { for () { @suspend;@ } }
 int main() { // coroutine test
+	C c;
 	BENCH( for ( N ) { @resume( c );@ } )
 	sout | result;
@@ -2989,5 +2990,5 @@
 \multicolumn{1}{@{}c}{} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 C function			& 1.8		& 1.8		& 0.0	\\
-\CFA generator		& 1.8		& 1.8		& 0.1	\\
+\CFA generator		& 1.8		& 2.0		& 0.3	\\
 \CFA coroutine		& 32.5		& 32.9		& 0.8	\\
 \CFA thread			& 93.8		& 93.6		& 2.2	\\
Index: doc/theses/andrew_beach_MMath/cfalab.sty
===================================================================
--- doc/theses/andrew_beach_MMath/cfalab.sty	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ doc/theses/andrew_beach_MMath/cfalab.sty	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,29 @@
+% Package for CFA Research Lab.
+%
+% Made by combining and updating
+
+% I don't know what the oldest LaTeX2e version with everything needed is.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{cfalab}[2020/03/09 v0.1 CFA Laboratory LaTeX Tools]
+
+% Other packages required.
+\RequirePackage{etoolbox}
+\RequirePackage{xspace}
+
+% Symbols: All symbols are zero argument robust commands with special rules
+% about the space following the c.s. token. Normally the space might be
+% re-added according to the rules of the xspace package. They may be followed
+% by a star (which the command will consume) to disable this behaviour.
+
+% \newsymbolcmd{<command>}{<expansion>}
+%    Defines <command> to be a symbol that has the given <expansion>.
+\newrobustcmd*\newsymbolcmd[2]{\newrobustcmd{#1}{\cfalab@symbol{#2}}}
+\def\cfalab@symbol#1{\@ifnextchar*{#1\cfalab@eatstar}{#1\xspace}}
+\def\cfalab@eatstar*{}
+
+% Cforall with the forall symbol.
+\newsymbolcmd\CFA{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}}
+
+\newcommand\codeC[1]{\texttt{#1}}
+
+\endinput
Index: doc/theses/andrew_beach_MMath/thesis.tex
===================================================================
--- doc/theses/andrew_beach_MMath/thesis.tex	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ doc/theses/andrew_beach_MMath/thesis.tex	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -1,4 +1,61 @@
 % Main tex file for thesis document.
 \documentclass[digital]{uw-ethesis}
+\usepackage{comment}
+\usepackage{fullpage}
+\setlength{\textheight}{8.75in}
+\renewcommand\labelitemi{\footnotesize$\bullet$} % shrink bullet for level 1 itemize
+\usepackage{lmodern}				% bold typewriter font
+
+\usepackage{listings}				% format program code
+% Default underscore is too low and wide. Cannot use lstlisting "literate" as replacing underscore
+% removes it as a variable-name character so keywords in variables are highlighted. MUST APPEAR
+% AFTER HYPERREF.
+%\DeclareTextCommandDefault{\textunderscore}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}
+\renewcommand{\textunderscore}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}}
+% parindent is relative, i.e., toggled on/off in environments like itemize, so store the value for
+% use rather than use \parident directly.
+\newlength{\parindentlnth}
+\setlength{\parindentlnth}{\parindent}
+
+% CFA programming language, based on ANSI C (with some gcc additions)
+\lstdefinelanguage{CFA}[ANSI]{C}{
+	morekeywords={
+		_Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, __attribute, __attribute__,
+		auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__, __const, __const__,
+		coroutine, disable, dtype, enable, exception, __extension__, fallthrough, fallthru, finally,
+		__float80, float80, __float128, float128, forall, ftype, generator, _Generic, _Imaginary, __imag, __imag__,
+		inline, __inline, __inline__, __int128, int128, __label__, monitor, mutex, _Noreturn, one_t, or,
+		otype, restrict, resume, __restrict, __restrict__, __signed, __signed__, _Static_assert, suspend, thread,
+		_Thread_local, throw, throwResume, timeout, trait, try, ttype, typeof, __typeof, __typeof__,
+		virtual, __volatile, __volatile__, waitfor, when, with, zero_t},
+	moredirectives={defined,include_next},
+	% replace/adjust listing characters that look bad in sanserif
+	literate={-}{\makebox[1ex][c]{\raisebox{0.5ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptstyle\land\,$}}1
+		{~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
+		{<}{\textrm{\textless}}1 {>}{\textrm{\textgreater}}1
+		{<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.5ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textrm{\textgreater}}}2,
+}
+
+\lstset{
+language=CFA,
+columns=fullflexible,
+basicstyle=\linespread{0.9}\tt,			% reduce line spacing and use sanserif font
+stringstyle=\tt,				% use typewriter font
+tabsize=5,					% N space tabbing
+xleftmargin=\parindentlnth,			% indent code to paragraph indentation
+%mathescape=true,				% LaTeX math escape in CFA code $...$
+escapechar=\$,					% LaTeX escape in CFA code
+keepspaces=true,
+showstringspaces=false,				% do not show spaces with cup
+showlines=true,					% show blank lines at end of code
+aboveskip=4pt,					% spacing above/below code block
+belowskip=3pt,
+moredelim=**[is][\color{red}]{`}{`},
+}% lstset
+
+\lstnewenvironment{cfa}[1][]
+{\lstset{#1}}
+{}
+% inline code @...@
 
 % Commands used in documenting how to use the template. To remove.
@@ -13,4 +70,6 @@
 % For including graphics, sets the pdftex graphics driver.
 \usepackage[pdftex]{graphicx}
+
+\usepackage{cfalab}
 
 \usehyperrefpackage[pdftex,pagebackref=false]{
@@ -43,9 +102,11 @@
 type=nomenclature,
 name=dingledorf,
-description={A person of supposed average intelligence who makes incredibly brainless misjudgments}
+description={A person of supposed average intelligence who makes incredibly
+               brainless misjudgments}
 }
 
 % List of Abbreviations (abbreviations are from the glossaries-extra package)
-\newabbreviation{aaaaz}{AAAAZ}{American Association of Amature Astronomers and Zoologists}
+\newabbreviation{aaaaz}{AAAAZ}{American Association of Amature Astronomers
+               and Zoologists}
 
 % List of Symbols
@@ -56,6 +117,10 @@
 sort={label},
 type=symbols,
-description={Random vector: a location in n-dimensional Cartesian space, where each dimensional component is determined by a random process}
-}
+description={Random vector: a location in n-dimensional Cartesian space, where
+               each dimensional component is determined by a random process}
+}
+
+% Must be here of cause problems with glossaries-extra.
+\lstMakeShortInline$%
 
 % Generate the glossaries defined above.
@@ -72,4 +137,6 @@
 % MAIN BODY
 %----------------------------------------------------------------------
+\input{unwinding}
+
 %======================================================================
 \chapter{Introduction}
Index: doc/theses/andrew_beach_MMath/unwinding.tex
===================================================================
--- doc/theses/andrew_beach_MMath/unwinding.tex	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ doc/theses/andrew_beach_MMath/unwinding.tex	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,168 @@
+\chapter{Unwinding in \CFA}
+
+When a function returns, a \emph{single} stack frame is unwound, removing the
+function's parameters and local variables, and control continues in the
+function's caller using the caller's stack frame.  When an exception is raised,
+\emph{multiple} stack frames are unwound, removing the function parameters and
+local variables for called functions from the exception raise-frame to the
+exception catch-frame.
+
+Unwinding multiple levels is simple for a programming languages without object
+destructors or block finalizers because a direct transfer is possible from the
+current stack frame to a prior stack frame, where control continues at a
+location within the prior caller's function. For example, C provides non-local
+transfer using $longjmp$, which stores a function's state including its
+frame pointer and program counter, and simply reloads this information to
+continue at this prior location on the stack.
+
+For programming languages with object destructors or block finalizers it is
+necessary to walk the stack frames from raise to catch, checking for code that
+must be executed as part of terminating each frame. Walking the stack has a
+higher cost, and necessary information must be available to detect
+destructors/finalizers and call them.
+
+A powerful package to provide stack-walking capabilities is $libunwind$,
+which is used in this work to provide exception handling in \CFA. The following
+explains how $libunwind$ works and how it is used.
+
+% Stack unwinding is the process of removing things from the stack from outside
+% the functions there. In languages that don't provide a way to guaranty that
+% code will run when the program leaves a scope or finishes a function, this
+% can be relatively trivial. C does this with $longjmp$ by setting the
+% stack pointer and a few other registers.
+
+\section{libunwind Usage}
+
+\CFA uses two primary functions in $libunwind$ to create most of its
+exceptional control-flow: $_Unwind_RaiseException$ and $_Unwind_ForcedUnwind$.
+Their operation is divided into two phases: search and clean-up. The search
+phase -- phase 1 -- is used to scan the stack but not unwinding it. The
+clean-up phase -- phase 2 -- is used for unwinding.
+
+% Somewhere around here I need to talk about the control structures.
+% $_Unwind_Exception$ is used to carry the API's universal data. Some
+% of this is internal, other fields are used to communicate between different
+% exception handling mechanisms in different runtimes.
+% $_Unwind_Context$ is an opaque data structure that is used to pass
+% information to helper functions.
+
+The raise-exception function uses both phases. It starts by searching for a
+handler, and if found, performs a clean-up phase to unwind the stack to the
+handler. If a handler is not found, control returns allowing the
+exception-handling policy for unhandled exception to be executed.  During both
+phases, the raise-exception function searches down the stack, calling each
+function's \emph{personality function}.
+
+A personality function performs three tasks, although not all have to be
+present. The tasks performed are decided by the actions provided.
+% Something argument something bitmask.
+\begin{itemize}
+\item$_UA_SEARCH_PHASE$ is called during the clean-up phase and means search
+for handlers. If a hander is found, the personality function should return
+$_URC_HANDLER_FOUND$, otherwise it returns $_URC_CONTINUE_UNWIND$.
+{\color{red}What is the connection between finding the handler and the
+personality function?}
+\item$_UA_CLEANUP_PHASE$ is passed in during the clean-up phase and means part
+or all of the stack frame is removed. The personality function should do
+whatever clean-up the language defines (such as running destructors/finalizers)
+and then generally returns $_URC_CONTINUE_UNWIND$.
+\item$_UA_HANDLER_FRAME$ means the personality function must install a
+handler. It is also passed in during the clean-up phase and is in addition to
+the clean-up action. $libunwind$ provides several helpers for the personality
+function here. Once it is done, the personality function must return
+$_URC_INSTALL_CONTEXT$.
+\end{itemize}
+
+Forced unwind only performs the clean-up phase. It is similar to the phase 2
+section of raise exception with a few changes. A simple difference is that it
+passes in an extra action to the personality function $_UA_FORCE_UNWIND$, which
+means a handler cannot be installed. The most difference significant is the
+addition of the $stop$ function, which is passed in as an argument to forced
+unwind.
+
+The $stop$ function is similar to a personality function. It takes an extra
+argument: a $void$ pointer passed into force unwind. It may return
+$_URC_NO_REASON$ to continue unwinding or it can transfer control out of the
+unwind code using its own mechanism.
+% Is there a reason that NO_REASON is used instead of CONTINUE_UNWIND?
+The $stop$ function is called for each stack frame and at the end of the
+stack. In a stack frame, it is called before the personality routine with the
+same arguments (except for the extra $void$ pointer). At the end of the stack,
+the arguments are mostly the same, except the stack pointer stored in the
+context is set to null. Because of this change, both GCC and Clang add an extra
+action in this case $_UA_END_OF_STACK$.  The $stop$ function may not return at
+the end of the stack.
+
+{\color{red}This needs work as I do not understand all of it.}
+
+
+\section{\CFA Implementation}
+
+To use $libunwind$, \CFA provides several wrappers, its own storage,
+personality functions, and a $stop$ function.
+
+The wrappers perform three tasks: set-up, clean-up and controlling the
+unwinding. The set-up allocates a copy of the \CFA exception into a handler to
+control its lifetime, and stores it in the exception context.  Clean-up -- run
+when control exits a catch clause and returns to normal code -- frees the
+exception copy.
+% It however does not set up the unwind exception so we can't use any inter-
+% runtime/language features. Also the exception context is global.
+
+The control code in the middle {\color{red}(In the middle of what?)} is run
+every time a throw or re-throw is called. It uses raise exception to search for
+a handler and to run it, if one is found. Otherwise, it uses forced unwind to
+unwind the stack, running all destructors, before terminating the process.
+
+The $stop$ function is very simple. It checks the end of stack flag to see if
+it is finished unwinding. If so, it calls $exit$ to end the process, otherwise
+it tells the system {\color{red}(What system?)} to continue unwinding.
+% Yeah, this is going to have to change.
+
+The personality routine is more complex because it has to obtain information
+about the function by scanning the LSDA (Language Specific Data Area). This
+step allows a single personality function to be used for multiple functions and
+it accounts for multiple regions{\color{red}(What's a region?)} and possible
+handlers in a single function.
+% Not that we do that yet.
+
+However, generating the LSDA is difficult. It requires knowledge about the
+location of the instruction pointer and stack layout, which varies by
+optimization levels. So for frames where there are only destructors, GCC's
+attribute cleanup with the $-fexception$ flag is sufficient to handle unwinding.
+
+For functions with handlers (defined in the $try$ statement) the function is
+split into several functions. Everything outside the $try$ statement is the
+first function, which only has destructors to be run during unwinding. The
+catch clauses of the $try$ block are then converted into GCC inner functions,
+which are passed via function pointers while still having access to the outer
+function's scope. $catchResume$ and $finally$ clauses are handled separately
+and not discussed here.
+
+The $try$ clause {\color{red}You have $try$ statement, $try$ block, and $try$
+clause, which need clarification.)} is converted to a function directly. The
+$catch$ clauses are combined into two functions. The first is the match
+function, which is used during the search phase to find a handler. The second
+it the catch function, which is a large switch-case for the different
+handlers. These functions do not interact with unwinding except for running
+destructors and so can be handled by GCC.
+
+These three functions are passed into $try_terminate$, an internal function
+that represents the $try$ statement. This function uses the generated
+personality functions as well as assembly statements to create the LSDA.  In
+normal execution, this function only calls the $try$ block closure. However,
+using $libunwind$, its personality function now handles exception matching and
+catching. {\color{red}(I don't understand the last sentence.)}
+
+During the search phase, the personality function retrieves the match function
+from the stack using the saved stack pointer. The function is called, either
+returning 0 for no match or the index (a positive integer) of the handler for a
+match. If a handler is found, the personality function reports it after saving
+the index to the exception context.
+
+During the clean-up phase there is nothing for the personality function to
+clean-up in $try_terminate$. So if this is not the handler frame, unwinding
+continues. If this is the handler frame, control is transferred to the catch
+function, giving it the exception and the handler index.
+
+{\color{red}This needs work as I do not understand all of it.}
Index: doc/theses/andrew_beach_MMath/uw-ethesis.cls
===================================================================
--- doc/theses/andrew_beach_MMath/uw-ethesis.cls	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ doc/theses/andrew_beach_MMath/uw-ethesis.cls	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -28,5 +28,5 @@
 %     with options in <setup> (set hyperref's \hypersetup for details).
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{uw-ethesis} %[DATE VERSION NOTES]
+\ProvidesClass{uw-ethesis}[2020/03/09 v0.1 UW E-Thesis Template Document Class]
 
 \RequirePackage{etoolbox}
Index: libcfa/src/Makefile.am
===================================================================
--- libcfa/src/Makefile.am	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ libcfa/src/Makefile.am	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:54:01 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Mon Jul 15 22:43:27 2019
-## Update Count     : 241
+## Last Modified On : Mon Mar 16 18:07:59 2020
+## Update Count     : 242
 ###############################################################################
 
@@ -39,5 +39,5 @@
 #----------------------------------------------------------------------------------------------------------------
 if BUILDLIB
-headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
+headers_nosrc = bitmanip.hfa math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
 headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
 	  containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
Index: libcfa/src/Makefile.in
===================================================================
--- libcfa/src/Makefile.in	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ libcfa/src/Makefile.in	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -237,5 +237,5 @@
 	limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
 	containers/maybe.hfa containers/pair.hfa containers/result.hfa \
-	containers/vector.hfa math.hfa gmp.hfa time_t.hfa \
+	containers/vector.hfa bitmanip.hfa math.hfa gmp.hfa time_t.hfa \
 	bits/align.hfa bits/containers.hfa bits/defs.hfa \
 	bits/debug.hfa bits/locks.hfa concurrency/coroutine.hfa \
@@ -432,11 +432,15 @@
 am__v_GOC_0 = @echo "  GOC     " $@;
 am__v_GOC_1 = 
+AM_V_PY = $(am__v_PY_@AM_V@)
+am__v_PY_ = $(am__v_PY_@AM_DEFAULT_V@)
+am__v_PY_0 = @echo "  PYTHON  " $@;
+am__v_PY_1 = 
 AM_V_RUST = $(am__v_RUST_@AM_V@)
 am__v_RUST_ = $(am__v_RUST_@AM_DEFAULT_V@)
-am__v_RUST_0 = @echo "  RUST     " $@;
+am__v_RUST_0 = @echo "  RUST    " $@;
 am__v_RUST_1 = 
 AM_V_NODEJS = $(am__v_NODEJS_@AM_V@)
 am__v_NODEJS_ = $(am__v_NODEJS_@AM_DEFAULT_V@)
-am__v_NODEJS_0 = @echo "  NODEJS     " $@;
+am__v_NODEJS_0 = @echo "  NODEJS  " $@;
 am__v_NODEJS_1 = 
 AM_V_JAVAC = $(am__v_JAVAC_@AM_V@)
@@ -457,5 +461,5 @@
 
 #----------------------------------------------------------------------------------------------------------------
-@BUILDLIB_TRUE@headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
+@BUILDLIB_TRUE@headers_nosrc = bitmanip.hfa math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
 @BUILDLIB_FALSE@headers = 
 @BUILDLIB_TRUE@headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
Index: libcfa/src/bitmanip.hfa
===================================================================
--- libcfa/src/bitmanip.hfa	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ libcfa/src/bitmanip.hfa	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,86 @@
+//                               -*- Mode: C -*- 
+// 
+// Cforall Version 1.0.0 Copyright (C) 2020 University of Waterloo
+// 
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// bitmanip.hfa -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Sat Mar 14 18:12:27 2020
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon Mar 16 14:28:46 2020
+// Update Count     : 49
+// 
+
+#pragma once
+
+// Reference: Bit Twiddling Hacks: http://graphics.stanford.edu/%7Eseander/bithacks.html#CountBitsSetNaive
+
+// Bits are numbered 1-N.
+
+#include <assert.h>
+
+static inline {
+    // Count leading 0 bits.
+    unsigned int cl0( unsigned char n ) { return n != 0 ? __builtin_clz( n ) - (sizeof(unsigned int) * __CHAR_BIT__ - sizeof(n) * __CHAR_BIT__) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int cl0( unsigned short int n ) { return n != 0 ? __builtin_clz( n ) - (sizeof(unsigned int) * __CHAR_BIT__ - sizeof(n) * __CHAR_BIT__) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int cl0( unsigned int n ) { return n != 0 ? __builtin_clz( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int cl0( unsigned long int n ) { return n != 0 ? __builtin_clzl( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int cl0( unsigned long long int n ) { return n != 0 ? __builtin_clzll( n ) : sizeof(n) * __CHAR_BIT__; }
+
+    // Count trailing 0 bits.
+    unsigned int ct0( unsigned char n ) { return n != 0 ? __builtin_ctz( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int ct0( unsigned short int n ) { return n != 0 ? __builtin_ctz( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int ct0( unsigned int n ) { return n != 0 ? __builtin_ctz( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int ct0( unsigned long int n ) { return n != 0 ? __builtin_ctzl( n ) : sizeof(n) * __CHAR_BIT__; }
+    unsigned int ct0( unsigned long long int n ) { return n != 0 ? __builtin_ctzll( n ) : sizeof(n) * __CHAR_BIT__; }
+
+    // Count all 1 bits.
+    unsigned int ca1( unsigned char n ) { return __builtin_popcount( n ); }
+    unsigned int ca1( unsigned short int n ) { return __builtin_popcount( n ); }
+    unsigned int ca1( unsigned int n ) { return __builtin_popcount( n ); }
+    unsigned int ca1( unsigned long int n ) { return __builtin_popcountl( n ); }
+    unsigned int ca1( unsigned long long int n ) { return __builtin_popcountll( n ); }
+
+    // Count all 0 bits.
+    unsigned int ca0( unsigned char n ) { return sizeof(n) * __CHAR_BIT__ - __builtin_popcount( n ); }
+    unsigned int ca0( unsigned short int n ) { return sizeof(n) * __CHAR_BIT__ - __builtin_popcount( n ); }
+    unsigned int ca0( unsigned int n ) { return sizeof(n) * __CHAR_BIT__ - __builtin_popcount( n ); }
+    unsigned int ca0( unsigned long int n ) { return sizeof(n) * __CHAR_BIT__ - __builtin_popcountl( n ); }
+    unsigned int ca0( unsigned long long int n ) { return sizeof(n) * __CHAR_BIT__ - __builtin_popcountll( n ); }
+
+    // Find least significiant set bit. (ffs)
+    unsigned int fls( unsigned int n ) { return __builtin_ffs( n ); }
+    unsigned int fls( unsigned long int n ) { return __builtin_ffsl( n ); }
+    unsigned int fls( unsigned long long int n ) { return __builtin_ffsll( n ); }
+
+    // Find most significiant set bit.
+    unsigned int fms( unsigned char n ) { return n != 0 ? sizeof(unsigned int) * __CHAR_BIT__ - __builtin_clz( n ) : 0; }
+    unsigned int fms( unsigned short int n ) { return n != 0 ? sizeof(unsigned int) * __CHAR_BIT__ - __builtin_clz( n ) : 0; }
+    unsigned int fms( unsigned int n ) { return n != 0 ? sizeof(n) * __CHAR_BIT__ - __builtin_clz( n ) : 0; }
+    unsigned int fms( unsigned long int n ) { return n != 0 ? sizeof(n) * __CHAR_BIT__ - __builtin_clzl( n ) : 0; }
+    unsigned int fms( unsigned long long int n ) { return n != 0 ? sizeof(n) * __CHAR_BIT__ - __builtin_clzll( n ) : 0; }
+
+    // Check for power of 2
+    bool pow2( unsigned long int value ) {
+		return (value & (value - 1)) == 0;				// clears bits below value, rounding down to the next lower multiple of value
+    } // pow2
+
+    // Returns value aligned at the floor of align.
+    unsigned long int floor( unsigned long int value, unsigned long int align ) {
+		assert( pow2( align ) );
+		return value & -align;							// clear bits above or equal to align, giving value % align
+    } // floor
+
+    // Returns value aligned at the ceiling of align.
+    unsigned long int ceiling( unsigned long int value, unsigned long int align ) {
+		assert( pow2( align ) );
+		return -floor( -value, align );					// negate, round down, negate is the same as round up
+    } // ceiling
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: libcfa/src/exception.c
===================================================================
--- libcfa/src/exception.c	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ libcfa/src/exception.c	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -252,7 +252,4 @@
 }
 
-#pragma GCC push_options
-#pragma GCC optimize("O0")
-
 // This is our personality routine. For every stack frame annotated with
 // ".cfi_personality 0x3,__gcfa_personality_v0" this function will be called twice when unwinding.
@@ -413,4 +410,7 @@
 	return _URC_CONTINUE_UNWIND;
 }
+
+#pragma GCC push_options
+#pragma GCC optimize("O0")
 
 // Try statements are hoisted out see comments for details. While this could probably be unique
Index: libcfa/src/interpose.cfa
===================================================================
--- libcfa/src/interpose.cfa	(revision 96df7c9cd72c9ab81e6a470d9a8cd38aa81aab33)
+++ libcfa/src/interpose.cfa	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar 29 16:10:31 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Mar  2 17:37:00 2020
-// Update Count     : 176
+// Last Modified On : Fri Mar 13 17:35:37 2020
+// Update Count     : 178
 //
 
@@ -234,5 +234,5 @@
 
 	if ( fmt[strlen( fmt ) - 1] != '\n' ) {				// add optional newline if missing at the end of the format text
-		__cfaabi_dbg_write( "\n", 1 );
+		__cfaabi_bits_write( STDERR_FILENO, "\n", 1 );
 	} // if
 	kernel_abort_msg( kernel_data, abort_text, abort_text_size );
Index: tests/.expect/bitmanip.x64.txt
===================================================================
--- tests/.expect/bitmanip.x64.txt	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ tests/.expect/bitmanip.x64.txt	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,71 @@
+cl0
+0 8, 1 7, 2 6, 4 5, 8 4, 16 3, 32 2, 64 1, -128 0,
+0 8, 1 7, 2 6, 4 5, 8 4, 16 3, 32 2, 64 1, 128 0,
+0 16, 1 15, 2 14, 4 13, 8 12, 16 11, 32 10, 64 9, 128 8, 256 7, 512 6, 1024 5, 2048 4, 4096 3, 8192 2, 16384 1, -32768 0,
+0 16, 1 15, 2 14, 4 13, 8 12, 16 11, 32 10, 64 9, 128 8, 256 7, 512 6, 1024 5, 2048 4, 4096 3, 8192 2, 16384 1, 32768 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, -2147483648 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, 2147483648 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, -9223372036854775808 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, 9223372036854775808 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, -9223372036854775808 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, 9223372036854775808 0,
+
+ct0
+0 8, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, -128 7,
+0 8, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7,
+0 16, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, -32768 15,
+0 16, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, -2147483648 31,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, -9223372036854775808 63,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, 9223372036854775808 63,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, -9223372036854775808 63,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, 9223372036854775808 63,
+
+ca1
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, -1 8,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, -1 16,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, -1 32,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32,
+
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32, 8589934591 33, 17179869183 34, 34359738367 35, 68719476735 36, 137438953471 37, 274877906943 38, 549755813887 39, 1099511627775 40, 2199023255551 41, 4398046511103 42, 8796093022207 43, 17592186044415 44, 35184372088831 45, 70368744177663 46, 140737488355327 47, 281474976710655 48, 562949953421311 49, 1125899906842623 50, 2251799813685247 51, 4503599627370495 52, 9007199254740991 53, 18014398509481983 54, 36028797018963967 55, 72057594037927935 56, 144115188075855871 57, 288230376151711743 58, 576460752303423487 59, 1152921504606846975 60, 2305843009213693951 61, 4611686018427387903 62, 9223372036854775807 63, 18446744073709551615 64,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32, 8589934591 33, 17179869183 34, 34359738367 35, 68719476735 36, 137438953471 37, 274877906943 38, 549755813887 39, 1099511627775 40, 2199023255551 41, 4398046511103 42, 8796093022207 43, 17592186044415 44, 35184372088831 45, 70368744177663 46, 140737488355327 47, 281474976710655 48, 562949953421311 49, 1125899906842623 50, 2251799813685247 51, 4503599627370495 52, 9007199254740991 53, 18014398509481983 54, 36028797018963967 55, 72057594037927935 56, 144115188075855871 57, 288230376151711743 58, 576460752303423487 59, 1152921504606846975 60, 2305843009213693951 61, 4611686018427387903 62, 9223372036854775807 63, -1 64,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32, 8589934591 33, 17179869183 34, 34359738367 35, 68719476735 36, 137438953471 37, 274877906943 38, 549755813887 39, 1099511627775 40, 2199023255551 41, 4398046511103 42, 8796093022207 43, 17592186044415 44, 35184372088831 45, 70368744177663 46, 140737488355327 47, 281474976710655 48, 562949953421311 49, 1125899906842623 50, 2251799813685247 51, 4503599627370495 52, 9007199254740991 53, 18014398509481983 54, 36028797018963967 55, 72057594037927935 56, 144115188075855871 57, 288230376151711743 58, 576460752303423487 59, 1152921504606846975 60, 2305843009213693951 61, 4611686018427387903 62, 9223372036854775807 63, 18446744073709551615 64,
+
+ca0
+0 8, 1 7, 3 6, 7 5, 15 4, 31 3, 63 2, 127 1, -1 0,
+0 8, 1 7, 3 6, 7 5, 15 4, 31 3, 63 2, 127 1, 255 0,
+0 16, 1 15, 3 14, 7 13, 15 12, 31 11, 63 10, 127 9, 255 8, 511 7, 1023 6, 2047 5, 4095 4, 8191 3, 16383 2, 32767 1, -1 0,
+0 16, 1 15, 3 14, 7 13, 15 12, 31 11, 63 10, 127 9, 255 8, 511 7, 1023 6, 2047 5, 4095 4, 8191 3, 16383 2, 32767 1, 65535 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, -1 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, 4294967295 0,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32, 8589934591 31, 17179869183 30, 34359738367 29, 68719476735 28, 137438953471 27, 274877906943 26, 549755813887 25, 1099511627775 24, 2199023255551 23, 4398046511103 22, 8796093022207 21, 17592186044415 20, 35184372088831 19, 70368744177663 18, 140737488355327 17, 281474976710655 16, 562949953421311 15, 1125899906842623 14, 2251799813685247 13, 4503599627370495 12, 9007199254740991 11, 18014398509481983 10, 36028797018963967 9, 72057594037927935 8, 144115188075855871 7, 288230376151711743 6, 576460752303423487 5, 1152921504606846975 4, 2305843009213693951 3, 4611686018427387903 2, 9223372036854775807 1, -1 0,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32, 8589934591 31, 17179869183 30, 34359738367 29, 68719476735 28, 137438953471 27, 274877906943 26, 549755813887 25, 1099511627775 24, 2199023255551 23, 4398046511103 22, 8796093022207 21, 17592186044415 20, 35184372088831 19, 70368744177663 18, 140737488355327 17, 281474976710655 16, 562949953421311 15, 1125899906842623 14, 2251799813685247 13, 4503599627370495 12, 9007199254740991 11, 18014398509481983 10, 36028797018963967 9, 72057594037927935 8, 144115188075855871 7, 288230376151711743 6, 576460752303423487 5, 1152921504606846975 4, 2305843009213693951 3, 4611686018427387903 2, 9223372036854775807 1, 18446744073709551615 0,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32, 8589934591 31, 17179869183 30, 34359738367 29, 68719476735 28, 137438953471 27, 274877906943 26, 549755813887 25, 1099511627775 24, 2199023255551 23, 4398046511103 22, 8796093022207 21, 17592186044415 20, 35184372088831 19, 70368744177663 18, 140737488355327 17, 281474976710655 16, 562949953421311 15, 1125899906842623 14, 2251799813685247 13, 4503599627370495 12, 9007199254740991 11, 18014398509481983 10, 36028797018963967 9, 72057594037927935 8, 144115188075855871 7, 288230376151711743 6, 576460752303423487 5, 1152921504606846975 4, 2305843009213693951 3, 4611686018427387903 2, 9223372036854775807 1, -1 0,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32, 8589934591 31, 17179869183 30, 34359738367 29, 68719476735 28, 137438953471 27, 274877906943 26, 549755813887 25, 1099511627775 24, 2199023255551 23, 4398046511103 22, 8796093022207 21, 17592186044415 20, 35184372088831 19, 70368744177663 18, 140737488355327 17, 281474976710655 16, 562949953421311 15, 1125899906842623 14, 2251799813685247 13, 4503599627370495 12, 9007199254740991 11, 18014398509481983 10, 36028797018963967 9, 72057594037927935 8, 144115188075855871 7, 288230376151711743 6, 576460752303423487 5, 1152921504606846975 4, 2305843009213693951 3, 4611686018427387903 2, 9223372036854775807 1, 18446744073709551615 0,
+
+fls
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, -128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, -32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
+
+fms
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, -128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, -32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
Index: tests/.expect/bitmanip.x86.txt
===================================================================
--- tests/.expect/bitmanip.x86.txt	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ tests/.expect/bitmanip.x86.txt	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,71 @@
+cl0
+0 8, 1 7, 2 6, 4 5, 8 4, 16 3, 32 2, 64 1, -128 0,
+0 8, 1 7, 2 6, 4 5, 8 4, 16 3, 32 2, 64 1, 128 0,
+0 16, 1 15, 2 14, 4 13, 8 12, 16 11, 32 10, 64 9, 128 8, 256 7, 512 6, 1024 5, 2048 4, 4096 3, 8192 2, 16384 1, -32768 0,
+0 16, 1 15, 2 14, 4 13, 8 12, 16 11, 32 10, 64 9, 128 8, 256 7, 512 6, 1024 5, 2048 4, 4096 3, 8192 2, 16384 1, 32768 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, -2147483648 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, 2147483648 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, -2147483648 0,
+0 32, 1 31, 2 30, 4 29, 8 28, 16 27, 32 26, 64 25, 128 24, 256 23, 512 22, 1024 21, 2048 20, 4096 19, 8192 18, 16384 17, 32768 16, 65536 15, 131072 14, 262144 13, 524288 12, 1048576 11, 2097152 10, 4194304 9, 8388608 8, 16777216 7, 33554432 6, 67108864 5, 134217728 4, 268435456 3, 536870912 2, 1073741824 1, 2147483648 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, -9223372036854775808 0,
+0 64, 1 63, 2 62, 4 61, 8 60, 16 59, 32 58, 64 57, 128 56, 256 55, 512 54, 1024 53, 2048 52, 4096 51, 8192 50, 16384 49, 32768 48, 65536 47, 131072 46, 262144 45, 524288 44, 1048576 43, 2097152 42, 4194304 41, 8388608 40, 16777216 39, 33554432 38, 67108864 37, 134217728 36, 268435456 35, 536870912 34, 1073741824 33, 2147483648 32, 4294967296 31, 8589934592 30, 17179869184 29, 34359738368 28, 68719476736 27, 137438953472 26, 274877906944 25, 549755813888 24, 1099511627776 23, 2199023255552 22, 4398046511104 21, 8796093022208 20, 17592186044416 19, 35184372088832 18, 70368744177664 17, 140737488355328 16, 281474976710656 15, 562949953421312 14, 1125899906842624 13, 2251799813685248 12, 4503599627370496 11, 9007199254740992 10, 18014398509481984 9, 36028797018963968 8, 72057594037927936 7, 144115188075855872 6, 288230376151711744 5, 576460752303423488 4, 1152921504606846976 3, 2305843009213693952 2, 4611686018427387904 1, 9223372036854775808 0,
+
+ct0
+0 8, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, -128 7,
+0 8, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7,
+0 16, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, -32768 15,
+0 16, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, -2147483648 31,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, -2147483648 31,
+0 32, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, -9223372036854775808 63,
+0 64, 1 0, 2 1, 4 2, 8 3, 16 4, 32 5, 64 6, 128 7, 256 8, 512 9, 1024 10, 2048 11, 4096 12, 8192 13, 16384 14, 32768 15, 65536 16, 131072 17, 262144 18, 524288 19, 1048576 20, 2097152 21, 4194304 22, 8388608 23, 16777216 24, 33554432 25, 67108864 26, 134217728 27, 268435456 28, 536870912 29, 1073741824 30, 2147483648 31, 4294967296 32, 8589934592 33, 17179869184 34, 34359738368 35, 68719476736 36, 137438953472 37, 274877906944 38, 549755813888 39, 1099511627776 40, 2199023255552 41, 4398046511104 42, 8796093022208 43, 17592186044416 44, 35184372088832 45, 70368744177664 46, 140737488355328 47, 281474976710656 48, 562949953421312 49, 1125899906842624 50, 2251799813685248 51, 4503599627370496 52, 9007199254740992 53, 18014398509481984 54, 36028797018963968 55, 72057594037927936 56, 144115188075855872 57, 288230376151711744 58, 576460752303423488 59, 1152921504606846976 60, 2305843009213693952 61, 4611686018427387904 62, 9223372036854775808 63,
+
+ca1
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, -1 8,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, -1 16,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, -1 32,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32,
+
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32,
+0 0, 1 1, 3 2, 7 3, 15 4, 31 5, 63 6, 127 7, 255 8, 511 9, 1023 10, 2047 11, 4095 12, 8191 13, 16383 14, 32767 15, 65535 16, 131071 17, 262143 18, 524287 19, 1048575 20, 2097151 21, 4194303 22, 8388607 23, 16777215 24, 33554431 25, 67108863 26, 134217727 27, 268435455 28, 536870911 29, 1073741823 30, 2147483647 31, 4294967295 32,
+
+ca0
+0 8, 1 7, 3 6, 7 5, 15 4, 31 3, 63 2, 127 1, -1 0,
+0 8, 1 7, 3 6, 7 5, 15 4, 31 3, 63 2, 127 1, 255 0,
+0 16, 1 15, 3 14, 7 13, 15 12, 31 11, 63 10, 127 9, 255 8, 511 7, 1023 6, 2047 5, 4095 4, 8191 3, 16383 2, 32767 1, -1 0,
+0 16, 1 15, 3 14, 7 13, 15 12, 31 11, 63 10, 127 9, 255 8, 511 7, 1023 6, 2047 5, 4095 4, 8191 3, 16383 2, 32767 1, 65535 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, -1 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, 4294967295 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, -1 0,
+0 32, 1 31, 3 30, 7 29, 15 28, 31 27, 63 26, 127 25, 255 24, 511 23, 1023 22, 2047 21, 4095 20, 8191 19, 16383 18, 32767 17, 65535 16, 131071 15, 262143 14, 524287 13, 1048575 12, 2097151 11, 4194303 10, 8388607 9, 16777215 8, 33554431 7, 67108863 6, 134217727 5, 268435455 4, 536870911 3, 1073741823 2, 2147483647 1, 4294967295 0,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32,
+0 64, 1 63, 3 62, 7 61, 15 60, 31 59, 63 58, 127 57, 255 56, 511 55, 1023 54, 2047 53, 4095 52, 8191 51, 16383 50, 32767 49, 65535 48, 131071 47, 262143 46, 524287 45, 1048575 44, 2097151 43, 4194303 42, 8388607 41, 16777215 40, 33554431 39, 67108863 38, 134217727 37, 268435455 36, 536870911 35, 1073741823 34, 2147483647 33, 4294967295 32,
+
+fls
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, -128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, -32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
+
+fms
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, -128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, -32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, -2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, -9223372036854775808 64,
+0 0, 1 1, 2 2, 4 3, 8 4, 16 5, 32 6, 64 7, 128 8, 256 9, 512 10, 1024 11, 2048 12, 4096 13, 8192 14, 16384 15, 32768 16, 65536 17, 131072 18, 262144 19, 524288 20, 1048576 21, 2097152 22, 4194304 23, 8388608 24, 16777216 25, 33554432 26, 67108864 27, 134217728 28, 268435456 29, 536870912 30, 1073741824 31, 2147483648 32, 4294967296 33, 8589934592 34, 17179869184 35, 34359738368 36, 68719476736 37, 137438953472 38, 274877906944 39, 549755813888 40, 1099511627776 41, 2199023255552 42, 4398046511104 43, 8796093022208 44, 17592186044416 45, 35184372088832 46, 70368744177664 47, 140737488355328 48, 281474976710656 49, 562949953421312 50, 1125899906842624 51, 2251799813685248 52, 4503599627370496 53, 9007199254740992 54, 18014398509481984 55, 36028797018963968 56, 72057594037927936 57, 144115188075855872 58, 288230376151711744 59, 576460752303423488 60, 1152921504606846976 61, 2305843009213693952 62, 4611686018427387904 63, 9223372036854775808 64,
Index: tests/bitmanip.cfa
===================================================================
--- tests/bitmanip.cfa	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
+++ tests/bitmanip.cfa	(revision 45f41477b36f2a11eaa49cd73c487ef65207fd23)
@@ -0,0 +1,413 @@
+#include <fstream.hfa>
+#include "bitmanip.hfa"
+
+int main() {
+    signed char sc;
+    unsigned char usc;
+    short int si;
+    unsigned short int usi;
+    int i;
+    unsigned int ui;
+    long int li;
+    unsigned long int uli;
+    long long int lli;
+    unsigned long long int ulli;
+
+    sout | nlOff;
+
+    //============================================================
+
+    sout | "cl0" | nl;
+
+    sc = 0;
+    sout | sc | cl0( sc ) | ",";
+    for ( sc = 1; sc != 0; sc <<= 1 ) {
+	sout | sc | cl0( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    sout | usc | cl0( usc ) | ",";
+    for ( usc = 1; usc != 0; usc <<= 1 ) {
+	sout | usc | cl0( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    sout | si | cl0( si ) | ",";
+    for ( si = 1; si != 0; si <<= 1 ) {
+	sout | si | cl0( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    sout | usi | cl0( usi ) | ",";
+    for ( usi = 1; usi != 0; usi <<= 1 ) {
+	sout | usi | cl0( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    sout | i | cl0( i ) | ",";
+    for ( i = 1; i != 0; i <<= 1 ) {
+	sout | i | cl0( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    sout | ui | cl0( ui ) | ",";
+    for ( ui = 1; ui != 0; ui <<= 1 ) {
+	sout | ui | cl0( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    sout | li | cl0( li ) | ",";
+    for ( li = 1; li != 0; li <<= 1 ) {
+	sout | li | cl0( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    sout | uli | cl0( uli ) | ",";
+    for ( uli = 1; uli != 0; uli <<= 1 ) {
+	sout | uli | cl0( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    sout | lli | cl0( lli ) | ",";
+    for ( lli = 1; lli != 0; lli <<= 1 ) {
+	sout | lli | cl0( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    sout | ulli | cl0( ulli ) | ",";
+    for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
+	sout | ulli | cl0( ulli ) | ",";
+    }
+    sout | nl;
+
+    //============================================================
+
+    sout | nl | "ct0" | nl;
+
+    sc = 0;
+    sout | sc | ct0( sc ) | ",";
+    for ( sc = 1; sc != 0; sc <<= 1 ) {
+	sout | sc | ct0( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    sout | usc | ct0( usc ) | ",";
+    for ( usc = 1; usc != 0; usc <<= 1 ) {
+	sout | usc | ct0( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    sout | si | ct0( si ) | ",";
+    for ( si = 1; si != 0; si <<= 1 ) {
+	sout | si | ct0( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    sout | usi | ct0( usi ) | ",";
+    for ( usi = 1; usi != 0; usi <<= 1 ) {
+	sout | usi | ct0( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    sout | i | ct0( i ) | ",";
+    for ( i = 1; i != 0; i <<= 1 ) {
+	sout | i | ct0( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    sout | ui | ct0( ui ) | ",";
+    for ( ui = 1; ui != 0; ui <<= 1 ) {
+	sout | ui | ct0( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    sout | li | ct0( li ) | ",";
+    for ( li = 1; li != 0; li <<= 1 ) {
+	sout | li | ct0( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    sout | uli | ct0( uli ) | ",";
+    for ( uli = 1; uli != 0; uli <<= 1 ) {
+	sout | uli | ct0( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    sout | lli | ct0( lli ) | ",";
+    for ( lli = 1; lli != 0; lli <<= 1 ) {
+	sout | lli | ct0( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    sout | ulli | ct0( ulli ) | ",";
+    for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
+	sout | ulli | ct0( ulli ) | ",";
+    }
+    sout | nl;
+
+    //============================================================
+
+    sout | nl | "ca1" | nl;
+
+    sc = 0;
+    for ( int p = 0; p < sizeof(sc) * __CHAR_BIT__ + 1; p += 1, sc = (sc << 1) + 1 ) {
+	sout | sc | ca1( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    for ( int p = 0; p < sizeof(sc) * __CHAR_BIT__ + 1; p += 1, usc = (usc << 1) + 1 ) {
+	sout | usc | ca1( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    for ( int p = 0; p < sizeof(si) * __CHAR_BIT__ + 1; p += 1, si = (si << 1) + 1 ) {
+	sout | si | ca1( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    for ( int p = 0; p < sizeof(usi) * __CHAR_BIT__ + 1; p += 1, usi = (usi << 1) + 1 ) {
+	sout | usi | ca1( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    for ( int p = 0; p < sizeof(i) * __CHAR_BIT__ + 1; p += 1, i = (i << 1) + 1 ) {
+	sout | i | ca1( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    for ( int p = 0; p < sizeof(ui) * __CHAR_BIT__ + 1; p += 1, ui = (ui << 1) + 1 ) {
+	sout | ui | ca1( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    for ( int p = 0; i < sizeof(li) * __CHAR_BIT__ + 1; p += 1, li = (li << 1) + 1 ) {
+	sout | li | ca1( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, uli = (uli << 1) + 1 ) {
+	sout | uli | ca1( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, lli = (lli << 1) + 1 ) {
+	sout | lli | ca1( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, ulli = (ulli << 1) + 1 ) {
+	sout | ulli | ca1( ulli ) | ",";
+    }
+    sout | nl;
+
+    //============================================================
+
+    sout | nl | "ca0" | nl;
+
+    sc = 0;
+    for ( int p = 0; p < sizeof(sc) * __CHAR_BIT__ + 1; p += 1, sc = (sc << 1) + 1 ) {
+	sout | sc | ca0( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    for ( int p = 0; p < sizeof(sc) * __CHAR_BIT__ + 1; p += 1, usc = (usc << 1) + 1 ) {
+	sout | usc | ca0( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    for ( int p = 0; p < sizeof(si) * __CHAR_BIT__ + 1; p += 1, si = (si << 1) + 1 ) {
+	sout | si | ca0( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    for ( int p = 0; p < sizeof(si) * __CHAR_BIT__ + 1; p += 1, usi = (usi << 1) + 1 ) {
+	sout | usi | ca0( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    for ( int p = 0; p < sizeof(i) * __CHAR_BIT__ + 1; p += 1, i = (i << 1) + 1 ) {
+	sout | i | ca0( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    for ( int p = 0; p < sizeof(ui) * __CHAR_BIT__ + 1; p += 1, ui = (ui << 1) + 1 ) {
+	sout | ui | ca0( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, li = (li << 1) + 1 ) {
+	sout | li | ca0( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, uli = (uli << 1) + 1 ) {
+	sout | uli | ca0( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, lli = (lli << 1) + 1 ) {
+	sout | lli | ca0( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    for ( int p = 0; p < sizeof(li) * __CHAR_BIT__ + 1; p += 1, ulli = (ulli << 1) + 1 ) {
+	sout | ulli | ca0( ulli ) | ",";
+    }
+    sout | nl;
+
+    //============================================================
+
+    sout | nl | "fls" | nl;
+
+    sc = 0;
+    sout | sc | fls( sc ) | ",";
+    for ( sc = 1; sc != 0; sc <<= 1 ) {
+	sout | sc | fls( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    sout | usc | fls( usc ) | ",";
+    for ( usc = 1; usc != 0; usc <<= 1 ) {
+	sout | usc | fls( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    sout | si | fls( si ) | ",";
+    for ( si = 1; si != 0; si <<= 1 ) {
+	sout | si | fls( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    sout | usi | fls( usi ) | ",";
+    for ( usi = 1; usi != 0; usi <<= 1 ) {
+	sout | usi | fls( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    sout | i | fls( i ) | ",";
+    for ( i = 1; i != 0; i <<= 1 ) {
+	sout | i | fls( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    sout | ui | fls( ui ) | ",";
+    for ( ui = 1; ui != 0; ui <<= 1 ) {
+	sout | ui | fls( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    sout | li | fls( li ) | ",";
+    for ( li = 1; li != 0; li <<= 1 ) {
+	sout | li | fls( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    sout | uli | fls( uli ) | ",";
+    for ( uli = 1; uli != 0; uli <<= 1 ) {
+	sout | uli | fls( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    sout | lli | fls( lli ) | ",";
+    for ( lli = 1; lli != 0; lli <<= 1 ) {
+	sout | lli | fls( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    sout | ulli | fls( ulli ) | ",";
+    for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
+	sout | ulli | fls( ulli ) | ",";
+    }
+    sout | nl;
+
+    //============================================================
+
+    sout | nl | "fms" | nl;
+
+    sc = 0;
+    sout | sc | fms( sc ) | ",";
+    for ( sc = 1; sc != 0; sc <<= 1 ) {
+	sout | sc | fms( sc ) | ",";
+    }
+    sout | nl;
+    usc = 0;
+    sout | usc | fms( usc ) | ",";
+    for ( usc = 1; usc != 0; usc <<= 1 ) {
+	sout | usc | fms( usc ) | ",";
+    }
+    sout | nl;
+
+    si = 0;
+    sout | si | fms( si ) | ",";
+    for ( si = 1; si != 0; si <<= 1 ) {
+	sout | si | fms( si ) | ",";
+    }
+    sout | nl;
+    usi = 0;
+    sout | usi | fms( usi ) | ",";
+    for ( usi = 1; usi != 0; usi <<= 1 ) {
+	sout | usi | fms( usi ) | ",";
+    }
+    sout | nl;
+
+    i = 0;
+    sout | i | fms( i ) | ",";
+    for ( i = 1; i != 0; i <<= 1 ) {
+	sout | i | fms( i ) | ",";
+    }
+    sout | nl;
+    ui = 0;
+    sout | ui | fms( ui ) | ",";
+    for ( ui = 1; ui != 0; ui <<= 1 ) {
+	sout | ui | fms( ui ) | ",";
+    }
+    sout | nl;
+
+    li = 0;
+    sout | li | fms( li ) | ",";
+    for ( li = 1; li != 0; li <<= 1 ) {
+	sout | li | fms( li ) | ",";
+    }
+    sout | nl;
+    uli = 0;
+    sout | uli | fms( uli ) | ",";
+    for ( uli = 1; uli != 0; uli <<= 1 ) {
+	sout | uli | fms( uli ) | ",";
+    }
+    sout | nl;
+
+    lli = 0;
+    sout | lli | fms( lli ) | ",";
+    for ( lli = 1; lli != 0; lli <<= 1 ) {
+	sout | lli | fms( lli ) | ",";
+    }
+    sout | nl;
+    ulli = 0;
+    sout | ulli | fms( ulli ) | ",";
+    for ( ulli = 1; ulli != 0; ulli <<= 1 ) {
+	sout | ulli | fms( ulli ) | ",";
+    }
+    sout | nl;
+#if 0
+#endif // 0
+}
