repo_name
stringlengths
4
116
path
stringlengths
3
942
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
BPI-SINOVOIP/BPI-Mainline-kernel
toolchains/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/share/doc/gccint/Defining-Mode-Iterators.html
5702
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Funding Free Software", the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled "GNU Free Documentation License". (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. --> <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> <head> <title>GNU Compiler Collection (GCC) Internals: Defining Mode Iterators</title> <meta name="description" content="GNU Compiler Collection (GCC) Internals: Defining Mode Iterators"> <meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Defining Mode Iterators"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.html#Top" rel="start" title="Top"> <link href="Option-Index.html#Option-Index" rel="index" title="Option Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Mode-Iterators.html#Mode-Iterators" rel="up" title="Mode Iterators"> <link href="Substitutions.html#Substitutions" rel="next" title="Substitutions"> <link href="Mode-Iterators.html#Mode-Iterators" rel="prev" title="Mode Iterators"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} blockquote.smallquotation {font-size: smaller} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} div.indentedblock {margin-left: 3.2em} div.lisp {margin-left: 3.2em} div.smalldisplay {margin-left: 3.2em} div.smallexample {margin-left: 3.2em} div.smallindentedblock {margin-left: 3.2em; font-size: smaller} div.smalllisp {margin-left: 3.2em} kbd {font-style:oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} span.nocodebreak {white-space:nowrap} span.nolinebreak {white-space:nowrap} span.roman {font-family:serif; font-weight:normal} span.sansserif {font-family:sans-serif; font-weight:normal} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <a name="Defining-Mode-Iterators"></a> <div class="header"> <p> Next: <a href="Substitutions.html#Substitutions" accesskey="n" rel="next">Substitutions</a>, Up: <a href="Mode-Iterators.html#Mode-Iterators" accesskey="u" rel="up">Mode Iterators</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Defining-Mode-Iterators-1"></a> <h4 class="subsubsection">16.23.1.1 Defining Mode Iterators</h4> <a name="index-define_005fmode_005fiterator"></a> <p>The syntax for defining a mode iterator is: </p> <div class="smallexample"> <pre class="smallexample">(define_mode_iterator <var>name</var> [(<var>mode1</var> &quot;<var>cond1</var>&quot;) &hellip; (<var>moden</var> &quot;<var>condn</var>&quot;)]) </pre></div> <p>This allows subsequent <samp>.md</samp> file constructs to use the mode suffix <code>:<var>name</var></code>. Every construct that does so will be expanded <var>n</var> times, once with every use of <code>:<var>name</var></code> replaced by <code>:<var>mode1</var></code>, once with every use replaced by <code>:<var>mode2</var></code>, and so on. In the expansion for a particular <var>modei</var>, every C condition will also require that <var>condi</var> be true. </p> <p>For example: </p> <div class="smallexample"> <pre class="smallexample">(define_mode_iterator P [(SI &quot;Pmode == SImode&quot;) (DI &quot;Pmode == DImode&quot;)]) </pre></div> <p>defines a new mode suffix <code>:P</code>. Every construct that uses <code>:P</code> will be expanded twice, once with every <code>:P</code> replaced by <code>:SI</code> and once with every <code>:P</code> replaced by <code>:DI</code>. The <code>:SI</code> version will only apply if <code>Pmode == SImode</code> and the <code>:DI</code> version will only apply if <code>Pmode == DImode</code>. </p> <p>As with other <samp>.md</samp> conditions, an empty string is treated as &ldquo;always true&rdquo;. <code>(<var>mode</var> &quot;&quot;)</code> can also be abbreviated to <code><var>mode</var></code>. For example: </p> <div class="smallexample"> <pre class="smallexample">(define_mode_iterator GPR [SI (DI &quot;TARGET_64BIT&quot;)]) </pre></div> <p>means that the <code>:DI</code> expansion only applies if <code>TARGET_64BIT</code> but that the <code>:SI</code> expansion has no such constraint. </p> <p>Iterators are applied in the order they are defined. This can be significant if two iterators are used in a construct that requires substitutions. See <a href="Substitutions.html#Substitutions">Substitutions</a>. </p> </body> </html>
gpl-2.0
heptalium/rpi-sources-3.16
arch/powerpc/include/asm/ppc_asm.h
21388
/* * Copyright (C) 1995-1999 Gary Thomas, Paul Mackerras, Cort Dougan. */ #ifndef _ASM_POWERPC_PPC_ASM_H #define _ASM_POWERPC_PPC_ASM_H #include <linux/stringify.h> #include <asm/asm-compat.h> #include <asm/processor.h> #include <asm/ppc-opcode.h> #include <asm/firmware.h> #ifndef __ASSEMBLY__ #error __FILE__ should only be used in assembler files #else #define SZL (BITS_PER_LONG/8) /* * Stuff for accurate CPU time accounting. * These macros handle transitions between user and system state * in exception entry and exit and accumulate time to the * user_time and system_time fields in the paca. */ #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE #define ACCOUNT_CPU_USER_ENTRY(ra, rb) #define ACCOUNT_CPU_USER_EXIT(ra, rb) #define ACCOUNT_STOLEN_TIME #else #define ACCOUNT_CPU_USER_ENTRY(ra, rb) \ MFTB(ra); /* get timebase */ \ ld rb,PACA_STARTTIME_USER(r13); \ std ra,PACA_STARTTIME(r13); \ subf rb,rb,ra; /* subtract start value */ \ ld ra,PACA_USER_TIME(r13); \ add ra,ra,rb; /* add on to user time */ \ std ra,PACA_USER_TIME(r13); \ #define ACCOUNT_CPU_USER_EXIT(ra, rb) \ MFTB(ra); /* get timebase */ \ ld rb,PACA_STARTTIME(r13); \ std ra,PACA_STARTTIME_USER(r13); \ subf rb,rb,ra; /* subtract start value */ \ ld ra,PACA_SYSTEM_TIME(r13); \ add ra,ra,rb; /* add on to system time */ \ std ra,PACA_SYSTEM_TIME(r13) #ifdef CONFIG_PPC_SPLPAR #define ACCOUNT_STOLEN_TIME \ BEGIN_FW_FTR_SECTION; \ beq 33f; \ /* from user - see if there are any DTL entries to process */ \ ld r10,PACALPPACAPTR(r13); /* get ptr to VPA */ \ ld r11,PACA_DTL_RIDX(r13); /* get log read index */ \ addi r10,r10,LPPACA_DTLIDX; \ LDX_BE r10,0,r10; /* get log write index */ \ cmpd cr1,r11,r10; \ beq+ cr1,33f; \ bl accumulate_stolen_time; \ ld r12,_MSR(r1); \ andi. r10,r12,MSR_PR; /* Restore cr0 (coming from user) */ \ 33: \ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR) #else /* CONFIG_PPC_SPLPAR */ #define ACCOUNT_STOLEN_TIME #endif /* CONFIG_PPC_SPLPAR */ #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ /* * Macros for storing registers into and loading registers from * exception frames. */ #ifdef __powerpc64__ #define SAVE_GPR(n, base) std n,GPR0+8*(n)(base) #define REST_GPR(n, base) ld n,GPR0+8*(n)(base) #define SAVE_NVGPRS(base) SAVE_8GPRS(14, base); SAVE_10GPRS(22, base) #define REST_NVGPRS(base) REST_8GPRS(14, base); REST_10GPRS(22, base) #else #define SAVE_GPR(n, base) stw n,GPR0+4*(n)(base) #define REST_GPR(n, base) lwz n,GPR0+4*(n)(base) #define SAVE_NVGPRS(base) SAVE_GPR(13, base); SAVE_8GPRS(14, base); \ SAVE_10GPRS(22, base) #define REST_NVGPRS(base) REST_GPR(13, base); REST_8GPRS(14, base); \ REST_10GPRS(22, base) #endif #define SAVE_2GPRS(n, base) SAVE_GPR(n, base); SAVE_GPR(n+1, base) #define SAVE_4GPRS(n, base) SAVE_2GPRS(n, base); SAVE_2GPRS(n+2, base) #define SAVE_8GPRS(n, base) SAVE_4GPRS(n, base); SAVE_4GPRS(n+4, base) #define SAVE_10GPRS(n, base) SAVE_8GPRS(n, base); SAVE_2GPRS(n+8, base) #define REST_2GPRS(n, base) REST_GPR(n, base); REST_GPR(n+1, base) #define REST_4GPRS(n, base) REST_2GPRS(n, base); REST_2GPRS(n+2, base) #define REST_8GPRS(n, base) REST_4GPRS(n, base); REST_4GPRS(n+4, base) #define REST_10GPRS(n, base) REST_8GPRS(n, base); REST_2GPRS(n+8, base) #define SAVE_FPR(n, base) stfd n,8*TS_FPRWIDTH*(n)(base) #define SAVE_2FPRS(n, base) SAVE_FPR(n, base); SAVE_FPR(n+1, base) #define SAVE_4FPRS(n, base) SAVE_2FPRS(n, base); SAVE_2FPRS(n+2, base) #define SAVE_8FPRS(n, base) SAVE_4FPRS(n, base); SAVE_4FPRS(n+4, base) #define SAVE_16FPRS(n, base) SAVE_8FPRS(n, base); SAVE_8FPRS(n+8, base) #define SAVE_32FPRS(n, base) SAVE_16FPRS(n, base); SAVE_16FPRS(n+16, base) #define REST_FPR(n, base) lfd n,8*TS_FPRWIDTH*(n)(base) #define REST_2FPRS(n, base) REST_FPR(n, base); REST_FPR(n+1, base) #define REST_4FPRS(n, base) REST_2FPRS(n, base); REST_2FPRS(n+2, base) #define REST_8FPRS(n, base) REST_4FPRS(n, base); REST_4FPRS(n+4, base) #define REST_16FPRS(n, base) REST_8FPRS(n, base); REST_8FPRS(n+8, base) #define REST_32FPRS(n, base) REST_16FPRS(n, base); REST_16FPRS(n+16, base) #define SAVE_VR(n,b,base) li b,16*(n); stvx n,base,b #define SAVE_2VRS(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base) #define SAVE_4VRS(n,b,base) SAVE_2VRS(n,b,base); SAVE_2VRS(n+2,b,base) #define SAVE_8VRS(n,b,base) SAVE_4VRS(n,b,base); SAVE_4VRS(n+4,b,base) #define SAVE_16VRS(n,b,base) SAVE_8VRS(n,b,base); SAVE_8VRS(n+8,b,base) #define SAVE_32VRS(n,b,base) SAVE_16VRS(n,b,base); SAVE_16VRS(n+16,b,base) #define REST_VR(n,b,base) li b,16*(n); lvx n,base,b #define REST_2VRS(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base) #define REST_4VRS(n,b,base) REST_2VRS(n,b,base); REST_2VRS(n+2,b,base) #define REST_8VRS(n,b,base) REST_4VRS(n,b,base); REST_4VRS(n+4,b,base) #define REST_16VRS(n,b,base) REST_8VRS(n,b,base); REST_8VRS(n+8,b,base) #define REST_32VRS(n,b,base) REST_16VRS(n,b,base); REST_16VRS(n+16,b,base) #ifdef __BIG_ENDIAN__ #define STXVD2X_ROT(n,b,base) STXVD2X(n,b,base) #define LXVD2X_ROT(n,b,base) LXVD2X(n,b,base) #else #define STXVD2X_ROT(n,b,base) XXSWAPD(n,n); \ STXVD2X(n,b,base); \ XXSWAPD(n,n) #define LXVD2X_ROT(n,b,base) LXVD2X(n,b,base); \ XXSWAPD(n,n) #endif /* Save the lower 32 VSRs in the thread VSR region */ #define SAVE_VSR(n,b,base) li b,16*(n); STXVD2X_ROT(n,R##base,R##b) #define SAVE_2VSRS(n,b,base) SAVE_VSR(n,b,base); SAVE_VSR(n+1,b,base) #define SAVE_4VSRS(n,b,base) SAVE_2VSRS(n,b,base); SAVE_2VSRS(n+2,b,base) #define SAVE_8VSRS(n,b,base) SAVE_4VSRS(n,b,base); SAVE_4VSRS(n+4,b,base) #define SAVE_16VSRS(n,b,base) SAVE_8VSRS(n,b,base); SAVE_8VSRS(n+8,b,base) #define SAVE_32VSRS(n,b,base) SAVE_16VSRS(n,b,base); SAVE_16VSRS(n+16,b,base) #define REST_VSR(n,b,base) li b,16*(n); LXVD2X_ROT(n,R##base,R##b) #define REST_2VSRS(n,b,base) REST_VSR(n,b,base); REST_VSR(n+1,b,base) #define REST_4VSRS(n,b,base) REST_2VSRS(n,b,base); REST_2VSRS(n+2,b,base) #define REST_8VSRS(n,b,base) REST_4VSRS(n,b,base); REST_4VSRS(n+4,b,base) #define REST_16VSRS(n,b,base) REST_8VSRS(n,b,base); REST_8VSRS(n+8,b,base) #define REST_32VSRS(n,b,base) REST_16VSRS(n,b,base); REST_16VSRS(n+16,b,base) /* * b = base register for addressing, o = base offset from register of 1st EVR * n = first EVR, s = scratch */ #define SAVE_EVR(n,s,b,o) evmergehi s,s,n; stw s,o+4*(n)(b) #define SAVE_2EVRS(n,s,b,o) SAVE_EVR(n,s,b,o); SAVE_EVR(n+1,s,b,o) #define SAVE_4EVRS(n,s,b,o) SAVE_2EVRS(n,s,b,o); SAVE_2EVRS(n+2,s,b,o) #define SAVE_8EVRS(n,s,b,o) SAVE_4EVRS(n,s,b,o); SAVE_4EVRS(n+4,s,b,o) #define SAVE_16EVRS(n,s,b,o) SAVE_8EVRS(n,s,b,o); SAVE_8EVRS(n+8,s,b,o) #define SAVE_32EVRS(n,s,b,o) SAVE_16EVRS(n,s,b,o); SAVE_16EVRS(n+16,s,b,o) #define REST_EVR(n,s,b,o) lwz s,o+4*(n)(b); evmergelo n,s,n #define REST_2EVRS(n,s,b,o) REST_EVR(n,s,b,o); REST_EVR(n+1,s,b,o) #define REST_4EVRS(n,s,b,o) REST_2EVRS(n,s,b,o); REST_2EVRS(n+2,s,b,o) #define REST_8EVRS(n,s,b,o) REST_4EVRS(n,s,b,o); REST_4EVRS(n+4,s,b,o) #define REST_16EVRS(n,s,b,o) REST_8EVRS(n,s,b,o); REST_8EVRS(n+8,s,b,o) #define REST_32EVRS(n,s,b,o) REST_16EVRS(n,s,b,o); REST_16EVRS(n+16,s,b,o) /* Macros to adjust thread priority for hardware multithreading */ #define HMT_VERY_LOW or 31,31,31 # very low priority #define HMT_LOW or 1,1,1 #define HMT_MEDIUM_LOW or 6,6,6 # medium low priority #define HMT_MEDIUM or 2,2,2 #define HMT_MEDIUM_HIGH or 5,5,5 # medium high priority #define HMT_HIGH or 3,3,3 #define HMT_EXTRA_HIGH or 7,7,7 # power7 only #ifdef CONFIG_PPC64 #define ULONG_SIZE 8 #else #define ULONG_SIZE 4 #endif #define __VCPU_GPR(n) (VCPU_GPRS + (n * ULONG_SIZE)) #define VCPU_GPR(n) __VCPU_GPR(__REG_##n) #ifdef __KERNEL__ #ifdef CONFIG_PPC64 #define STACKFRAMESIZE 256 #define __STK_REG(i) (112 + ((i)-14)*8) #define STK_REG(i) __STK_REG(__REG_##i) #if defined(_CALL_ELF) && _CALL_ELF == 2 #define STK_GOT 24 #define __STK_PARAM(i) (32 + ((i)-3)*8) #else #define STK_GOT 40 #define __STK_PARAM(i) (48 + ((i)-3)*8) #endif #define STK_PARAM(i) __STK_PARAM(__REG_##i) #if defined(_CALL_ELF) && _CALL_ELF == 2 #define _GLOBAL(name) \ .section ".text"; \ .align 2 ; \ .type name,@function; \ .globl name; \ name: #define _GLOBAL_TOC(name) \ .section ".text"; \ .align 2 ; \ .type name,@function; \ .globl name; \ name: \ 0: addis r2,r12,(.TOC.-0b)@ha; \ addi r2,r2,(.TOC.-0b)@l; \ .localentry name,.-name #define DOTSYM(a) a #else #define XGLUE(a,b) a##b #define GLUE(a,b) XGLUE(a,b) #define _GLOBAL(name) \ .section ".text"; \ .align 2 ; \ .globl name; \ .globl GLUE(.,name); \ .section ".opd","aw"; \ name: \ .quad GLUE(.,name); \ .quad .TOC.@tocbase; \ .quad 0; \ .previous; \ .type GLUE(.,name),@function; \ GLUE(.,name): #define _GLOBAL_TOC(name) _GLOBAL(name) #define DOTSYM(a) GLUE(.,a) #endif #else /* 32-bit */ #define _ENTRY(n) \ .globl n; \ n: #define _GLOBAL(n) \ .text; \ .stabs __stringify(n:F-1),N_FUN,0,0,n;\ .globl n; \ n: #define _GLOBAL_TOC(name) _GLOBAL(name) #endif /* * __kprobes (the C annotation) puts the symbol into the .kprobes.text * section, which gets emitted at the end of regular text. * * _ASM_NOKPROBE_SYMBOL and NOKPROBE_SYMBOL just adds the symbol to * a blacklist. The former is for core kprobe functions/data, the * latter is for those that incdentially must be excluded from probing * and allows them to be linked at more optimal location within text. */ #define _ASM_NOKPROBE_SYMBOL(entry) \ .pushsection "_kprobe_blacklist","aw"; \ PPC_LONG (entry) ; \ .popsection /* * LOAD_REG_IMMEDIATE(rn, expr) * Loads the value of the constant expression 'expr' into register 'rn' * using immediate instructions only. Use this when it's important not * to reference other data (i.e. on ppc64 when the TOC pointer is not * valid) and when 'expr' is a constant or absolute address. * * LOAD_REG_ADDR(rn, name) * Loads the address of label 'name' into register 'rn'. Use this when * you don't particularly need immediate instructions only, but you need * the whole address in one register (e.g. it's a structure address and * you want to access various offsets within it). On ppc32 this is * identical to LOAD_REG_IMMEDIATE. * * LOAD_REG_ADDR_PIC(rn, name) * Loads the address of label 'name' into register 'run'. Use this when * the kernel doesn't run at the linked or relocated address. Please * note that this macro will clobber the lr register. * * LOAD_REG_ADDRBASE(rn, name) * ADDROFF(name) * LOAD_REG_ADDRBASE loads part of the address of label 'name' into * register 'rn'. ADDROFF(name) returns the remainder of the address as * a constant expression. ADDROFF(name) is a signed expression < 16 bits * in size, so is suitable for use directly as an offset in load and store * instructions. Use this when loading/storing a single word or less as: * LOAD_REG_ADDRBASE(rX, name) * ld rY,ADDROFF(name)(rX) */ /* Be careful, this will clobber the lr register. */ #define LOAD_REG_ADDR_PIC(reg, name) \ bl 0f; \ 0: mflr reg; \ addis reg,reg,(name - 0b)@ha; \ addi reg,reg,(name - 0b)@l; #ifdef __powerpc64__ #ifdef HAVE_AS_ATHIGH #define __AS_ATHIGH high #else #define __AS_ATHIGH h #endif #define LOAD_REG_IMMEDIATE(reg,expr) \ lis reg,(expr)@highest; \ ori reg,reg,(expr)@higher; \ rldicr reg,reg,32,31; \ oris reg,reg,(expr)@__AS_ATHIGH; \ ori reg,reg,(expr)@l; #define LOAD_REG_ADDR(reg,name) \ ld reg,name@got(r2) #define LOAD_REG_ADDRBASE(reg,name) LOAD_REG_ADDR(reg,name) #define ADDROFF(name) 0 /* offsets for stack frame layout */ #define LRSAVE 16 #else /* 32-bit */ #define LOAD_REG_IMMEDIATE(reg,expr) \ lis reg,(expr)@ha; \ addi reg,reg,(expr)@l; #define LOAD_REG_ADDR(reg,name) LOAD_REG_IMMEDIATE(reg, name) #define LOAD_REG_ADDRBASE(reg, name) lis reg,name@ha #define ADDROFF(name) name@l /* offsets for stack frame layout */ #define LRSAVE 4 #endif /* various errata or part fixups */ #ifdef CONFIG_PPC601_SYNC_FIX #define SYNC \ BEGIN_FTR_SECTION \ sync; \ isync; \ END_FTR_SECTION_IFSET(CPU_FTR_601) #define SYNC_601 \ BEGIN_FTR_SECTION \ sync; \ END_FTR_SECTION_IFSET(CPU_FTR_601) #define ISYNC_601 \ BEGIN_FTR_SECTION \ isync; \ END_FTR_SECTION_IFSET(CPU_FTR_601) #else #define SYNC #define SYNC_601 #define ISYNC_601 #endif #if defined(CONFIG_PPC_CELL) || defined(CONFIG_PPC_FSL_BOOK3E) #define MFTB(dest) \ 90: mfspr dest, SPRN_TBRL; \ BEGIN_FTR_SECTION_NESTED(96); \ cmpwi dest,0; \ beq- 90b; \ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96) #elif defined(CONFIG_8xx) #define MFTB(dest) mftb dest #else #define MFTB(dest) mfspr dest, SPRN_TBRL #endif #ifndef CONFIG_SMP #define TLBSYNC #else /* CONFIG_SMP */ /* tlbsync is not implemented on 601 */ #define TLBSYNC \ BEGIN_FTR_SECTION \ tlbsync; \ sync; \ END_FTR_SECTION_IFCLR(CPU_FTR_601) #endif #ifdef CONFIG_PPC64 #define MTOCRF(FXM, RS) \ BEGIN_FTR_SECTION_NESTED(848); \ mtcrf (FXM), RS; \ FTR_SECTION_ELSE_NESTED(848); \ mtocrf (FXM), RS; \ ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_NOEXECUTE, 848) /* * PPR restore macros used in entry_64.S * Used for P7 or later processors */ #define HMT_MEDIUM_LOW_HAS_PPR \ BEGIN_FTR_SECTION_NESTED(944) \ HMT_MEDIUM_LOW; \ END_FTR_SECTION_NESTED(CPU_FTR_HAS_PPR,CPU_FTR_HAS_PPR,944) #define SET_DEFAULT_THREAD_PPR(ra, rb) \ BEGIN_FTR_SECTION_NESTED(945) \ lis ra,INIT_PPR@highest; /* default ppr=3 */ \ ld rb,PACACURRENT(r13); \ sldi ra,ra,32; /* 11- 13 bits are used for ppr */ \ std ra,TASKTHREADPPR(rb); \ END_FTR_SECTION_NESTED(CPU_FTR_HAS_PPR,CPU_FTR_HAS_PPR,945) #endif /* * This instruction is not implemented on the PPC 603 or 601; however, on * the 403GCX and 405GP tlbia IS defined and tlbie is not. * All of these instructions exist in the 8xx, they have magical powers, * and they must be used. */ #if !defined(CONFIG_4xx) && !defined(CONFIG_8xx) #define tlbia \ li r4,1024; \ mtctr r4; \ lis r4,KERNELBASE@h; \ 0: tlbie r4; \ addi r4,r4,0x1000; \ bdnz 0b #endif #ifdef CONFIG_IBM440EP_ERR42 #define PPC440EP_ERR42 isync #else #define PPC440EP_ERR42 #endif /* The following stops all load and store data streams associated with stream * ID (ie. streams created explicitly). The embedded and server mnemonics for * dcbt are different so we use machine "power4" here explicitly. */ #define DCBT_STOP_ALL_STREAM_IDS(scratch) \ .machine push ; \ .machine "power4" ; \ lis scratch,0x60000000@h; \ dcbt r0,scratch,0b01010; \ .machine pop /* * toreal/fromreal/tophys/tovirt macros. 32-bit BookE makes them * keep the address intact to be compatible with code shared with * 32-bit classic. * * On the other hand, I find it useful to have them behave as expected * by their name (ie always do the addition) on 64-bit BookE */ #if defined(CONFIG_BOOKE) && !defined(CONFIG_PPC64) #define toreal(rd) #define fromreal(rd) /* * We use addis to ensure compatibility with the "classic" ppc versions of * these macros, which use rs = 0 to get the tophys offset in rd, rather than * converting the address in r0, and so this version has to do that too * (i.e. set register rd to 0 when rs == 0). */ #define tophys(rd,rs) \ addis rd,rs,0 #define tovirt(rd,rs) \ addis rd,rs,0 #elif defined(CONFIG_PPC64) #define toreal(rd) /* we can access c000... in real mode */ #define fromreal(rd) #define tophys(rd,rs) \ clrldi rd,rs,2 #define tovirt(rd,rs) \ rotldi rd,rs,16; \ ori rd,rd,((KERNELBASE>>48)&0xFFFF);\ rotldi rd,rd,48 #else /* * On APUS (Amiga PowerPC cpu upgrade board), we don't know the * physical base address of RAM at compile time. */ #define toreal(rd) tophys(rd,rd) #define fromreal(rd) tovirt(rd,rd) #define tophys(rd,rs) \ 0: addis rd,rs,-PAGE_OFFSET@h; \ .section ".vtop_fixup","aw"; \ .align 1; \ .long 0b; \ .previous #define tovirt(rd,rs) \ 0: addis rd,rs,PAGE_OFFSET@h; \ .section ".ptov_fixup","aw"; \ .align 1; \ .long 0b; \ .previous #endif #ifdef CONFIG_PPC_BOOK3S_64 #define RFI rfid #define MTMSRD(r) mtmsrd r #define MTMSR_EERI(reg) mtmsrd reg,1 #else #define FIX_SRR1(ra, rb) #ifndef CONFIG_40x #define RFI rfi #else #define RFI rfi; b . /* Prevent prefetch past rfi */ #endif #define MTMSRD(r) mtmsr r #define MTMSR_EERI(reg) mtmsr reg #define CLR_TOP32(r) #endif #endif /* __KERNEL__ */ /* The boring bits... */ /* Condition Register Bit Fields */ #define cr0 0 #define cr1 1 #define cr2 2 #define cr3 3 #define cr4 4 #define cr5 5 #define cr6 6 #define cr7 7 /* * General Purpose Registers (GPRs) * * The lower case r0-r31 should be used in preference to the upper * case R0-R31 as they provide more error checking in the assembler. * Use R0-31 only when really nessesary. */ #define r0 %r0 #define r1 %r1 #define r2 %r2 #define r3 %r3 #define r4 %r4 #define r5 %r5 #define r6 %r6 #define r7 %r7 #define r8 %r8 #define r9 %r9 #define r10 %r10 #define r11 %r11 #define r12 %r12 #define r13 %r13 #define r14 %r14 #define r15 %r15 #define r16 %r16 #define r17 %r17 #define r18 %r18 #define r19 %r19 #define r20 %r20 #define r21 %r21 #define r22 %r22 #define r23 %r23 #define r24 %r24 #define r25 %r25 #define r26 %r26 #define r27 %r27 #define r28 %r28 #define r29 %r29 #define r30 %r30 #define r31 %r31 /* Floating Point Registers (FPRs) */ #define fr0 0 #define fr1 1 #define fr2 2 #define fr3 3 #define fr4 4 #define fr5 5 #define fr6 6 #define fr7 7 #define fr8 8 #define fr9 9 #define fr10 10 #define fr11 11 #define fr12 12 #define fr13 13 #define fr14 14 #define fr15 15 #define fr16 16 #define fr17 17 #define fr18 18 #define fr19 19 #define fr20 20 #define fr21 21 #define fr22 22 #define fr23 23 #define fr24 24 #define fr25 25 #define fr26 26 #define fr27 27 #define fr28 28 #define fr29 29 #define fr30 30 #define fr31 31 /* AltiVec Registers (VPRs) */ #define vr0 0 #define vr1 1 #define vr2 2 #define vr3 3 #define vr4 4 #define vr5 5 #define vr6 6 #define vr7 7 #define vr8 8 #define vr9 9 #define vr10 10 #define vr11 11 #define vr12 12 #define vr13 13 #define vr14 14 #define vr15 15 #define vr16 16 #define vr17 17 #define vr18 18 #define vr19 19 #define vr20 20 #define vr21 21 #define vr22 22 #define vr23 23 #define vr24 24 #define vr25 25 #define vr26 26 #define vr27 27 #define vr28 28 #define vr29 29 #define vr30 30 #define vr31 31 /* VSX Registers (VSRs) */ #define vsr0 0 #define vsr1 1 #define vsr2 2 #define vsr3 3 #define vsr4 4 #define vsr5 5 #define vsr6 6 #define vsr7 7 #define vsr8 8 #define vsr9 9 #define vsr10 10 #define vsr11 11 #define vsr12 12 #define vsr13 13 #define vsr14 14 #define vsr15 15 #define vsr16 16 #define vsr17 17 #define vsr18 18 #define vsr19 19 #define vsr20 20 #define vsr21 21 #define vsr22 22 #define vsr23 23 #define vsr24 24 #define vsr25 25 #define vsr26 26 #define vsr27 27 #define vsr28 28 #define vsr29 29 #define vsr30 30 #define vsr31 31 #define vsr32 32 #define vsr33 33 #define vsr34 34 #define vsr35 35 #define vsr36 36 #define vsr37 37 #define vsr38 38 #define vsr39 39 #define vsr40 40 #define vsr41 41 #define vsr42 42 #define vsr43 43 #define vsr44 44 #define vsr45 45 #define vsr46 46 #define vsr47 47 #define vsr48 48 #define vsr49 49 #define vsr50 50 #define vsr51 51 #define vsr52 52 #define vsr53 53 #define vsr54 54 #define vsr55 55 #define vsr56 56 #define vsr57 57 #define vsr58 58 #define vsr59 59 #define vsr60 60 #define vsr61 61 #define vsr62 62 #define vsr63 63 /* SPE Registers (EVPRs) */ #define evr0 0 #define evr1 1 #define evr2 2 #define evr3 3 #define evr4 4 #define evr5 5 #define evr6 6 #define evr7 7 #define evr8 8 #define evr9 9 #define evr10 10 #define evr11 11 #define evr12 12 #define evr13 13 #define evr14 14 #define evr15 15 #define evr16 16 #define evr17 17 #define evr18 18 #define evr19 19 #define evr20 20 #define evr21 21 #define evr22 22 #define evr23 23 #define evr24 24 #define evr25 25 #define evr26 26 #define evr27 27 #define evr28 28 #define evr29 29 #define evr30 30 #define evr31 31 /* some stab codes */ #define N_FUN 36 #define N_RSYM 64 #define N_SLINE 68 #define N_SO 100 /* * Create an endian fixup trampoline * * This starts with a "tdi 0,0,0x48" instruction which is * essentially a "trap never", and thus akin to a nop. * * The opcode for this instruction read with the wrong endian * however results in a b . + 8 * * So essentially we use that trick to execute the following * trampoline in "reverse endian" if we are running with the * MSR_LE bit set the "wrong" way for whatever endianness the * kernel is built for. */ #ifdef CONFIG_PPC_BOOK3E #define FIXUP_ENDIAN #else #define FIXUP_ENDIAN \ tdi 0,0,0x48; /* Reverse endian of b . + 8 */ \ b $+36; /* Skip trampoline if endian is good */ \ .long 0x05009f42; /* bcl 20,31,$+4 */ \ .long 0xa602487d; /* mflr r10 */ \ .long 0x1c004a39; /* addi r10,r10,28 */ \ .long 0xa600607d; /* mfmsr r11 */ \ .long 0x01006b69; /* xori r11,r11,1 */ \ .long 0xa6035a7d; /* mtsrr0 r10 */ \ .long 0xa6037b7d; /* mtsrr1 r11 */ \ .long 0x2400004c /* rfid */ #endif /* !CONFIG_PPC_BOOK3E */ #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_PPC_ASM_H */
gpl-2.0
chris-se/dietlibc-packaging
include/rpc/pmap_rmt.h
2082
/* @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC; from 1.2 88/02/08 SMI */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape * media and as a part of the software program in whole or part. Users * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 */ /* * Structures and XDR routines for parameters to and replies from * the portmapper remote-call-service. * * Copyright (C) 1986, Sun Microsystems, Inc. */ #ifndef _RPC_PMAP_RMT_H #define _RPC_PMAP_RMT_H #include <sys/cdefs.h> #include <sys/types.h> #include <rpc/types.h> #include <rpc/xdr.h> __BEGIN_DECLS struct rmtcallargs { unsigned long prog, vers, proc, arglen; char* args_ptr; xdrproc_t xdr_args; }; extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) __THROW; struct rmtcallres { unsigned long *port_ptr; unsigned long resultslen; char* results_ptr; xdrproc_t xdr_results; }; extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; __END_DECLS #endif /* rpc/pmap_rmt.h */
gpl-2.0
atmark-techno/atmark-dist
user/ruby-mqtt/examples/simple_get.rb
403
#!/usr/bin/env ruby # # Connect to a MQTT server, subscribe to all topics # and then loop, displaying any messages received. # $:.unshift File.dirname(__FILE__)+'/../lib' require 'rubygems' require 'mqtt' MQTT::Client.connect('test.mosquitto.org') do |client| # If you pass a block to the get method, then it will loop client.get('#') do |topic,message| puts "#{topic}: #{message}" end end
gpl-2.0
wyuka/calligra
libs/flake/tests/TestPointMergeCommand.cpp
8389
/* This file is part of the KDE project * Copyright (C) 2009 Jan Hambrecht <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "TestPointMergeCommand.h" #include "KoPathPointMergeCommand.h" #include "KoPathShape.h" #include "KoPathPoint.h" #include "KoPathPointData.h" #include <KDebug> void TestPointMergeCommand::closeSingleLinePath() { KoPathShape path1; path1.moveTo(QPointF(40, 0)); path1.lineTo(QPointF(60, 0)); path1.lineTo(QPointF(60, 30)); path1.lineTo(QPointF(0, 30)); path1.lineTo(QPointF(0, 0)); path1.lineTo(QPointF(20, 0)); KoPathPointIndex index1(0,0); KoPathPointIndex index2(0,5); KoPathPointData pd1(&path1, index1); KoPathPointData pd2(&path1, index2); KoPathPoint * p1 = path1.pointByIndex(index1); KoPathPoint * p2 = path1.pointByIndex(index2); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 6); QCOMPARE(p1->point(), QPointF(40,0)); QCOMPARE(p2->point(), QPointF(20,0)); KoPathPointMergeCommand cmd1(pd1,pd2); cmd1.redo(); QVERIFY(path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 5); QCOMPARE(p2->point(), QPointF(30,0)); cmd1.undo(); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 6); QCOMPARE(p1->point(), QPointF(40,0)); QCOMPARE(p2->point(), QPointF(20,0)); KoPathPointMergeCommand cmd2(pd2,pd1); cmd2.redo(); QVERIFY(path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 5); QCOMPARE(p2->point(), QPointF(30,0)); cmd2.undo(); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 6); QCOMPARE(p1->point(), QPointF(40,0)); QCOMPARE(p2->point(), QPointF(20,0)); } void TestPointMergeCommand::closeSingleCurvePath() { KoPathShape path1; path1.moveTo(QPointF(40, 0)); path1.curveTo(QPointF(60, 0), QPointF(60,0), QPointF(60,60)); path1.lineTo(QPointF(0, 60)); path1.curveTo(QPointF(0, 0), QPointF(0,0), QPointF(20,0)); KoPathPointIndex index1(0,0); KoPathPointIndex index2(0,3); KoPathPointData pd1(&path1, index1); KoPathPointData pd2(&path1, index2); KoPathPoint * p1 = path1.pointByIndex(index1); KoPathPoint * p2 = path1.pointByIndex(index2); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 4); QCOMPARE(p1->point(), QPointF(40,0)); QVERIFY(!p1->activeControlPoint1()); QCOMPARE(p2->point(), QPointF(20,0)); QVERIFY(!p2->activeControlPoint2()); KoPathPointMergeCommand cmd1(pd1,pd2); cmd1.redo(); QVERIFY(path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 3); QCOMPARE(p2->point(), QPointF(30,0)); QVERIFY(p2->activeControlPoint1()); QVERIFY(p2->activeControlPoint2()); cmd1.undo(); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 4); QCOMPARE(p1->point(), QPointF(40,0)); QVERIFY(!p1->activeControlPoint1()); QCOMPARE(p2->point(), QPointF(20,0)); QVERIFY(!p2->activeControlPoint2()); KoPathPointMergeCommand cmd2(pd2,pd1); cmd2.redo(); QVERIFY(path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 3); QCOMPARE(p2->point(), QPointF(30,0)); QVERIFY(p2->activeControlPoint1()); QVERIFY(p2->activeControlPoint2()); cmd2.undo(); QVERIFY(!path1.isClosedSubpath(0)); QCOMPARE(path1.subpathPointCount(0), 4); QCOMPARE(p1->point(), QPointF(40,0)); QVERIFY(!p1->activeControlPoint1()); QCOMPARE(p2->point(), QPointF(20,0)); QVERIFY(!p2->activeControlPoint2()); } void TestPointMergeCommand::connectLineSubpaths() { KoPathShape path1; path1.moveTo(QPointF(0,0)); path1.lineTo(QPointF(10,0)); path1.moveTo(QPointF(20,0)); path1.lineTo(QPointF(30,0)); KoPathPointIndex index1(0,1); KoPathPointIndex index2(1,0); KoPathPointData pd1(&path1, index1); KoPathPointData pd2(&path1, index2); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(10,0)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(20,0)); KoPathPointMergeCommand cmd1(pd1, pd2); cmd1.redo(); QCOMPARE(path1.subpathCount(), 1); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(15,0)); cmd1.undo(); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(10,0)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(20,0)); KoPathPointMergeCommand cmd2(pd2, pd1); cmd2.redo(); QCOMPARE(path1.subpathCount(), 1); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(15,0)); cmd2.undo(); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(10,0)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(20,0)); } void TestPointMergeCommand::connectCurveSubpaths() { KoPathShape path1; path1.moveTo(QPointF(0,0)); path1.curveTo(QPointF(20,0),QPointF(0,20),QPointF(20,20)); path1.moveTo(QPointF(50,0)); path1.curveTo(QPointF(30,0), QPointF(50,20), QPointF(30,20)); KoPathPointIndex index1(0,1); KoPathPointIndex index2(1,1); KoPathPointData pd1(&path1, index1); KoPathPointData pd2(&path1, index2); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(20,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint1(), QPointF(0,20)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(30,20)); QCOMPARE(path1.pointByIndex(index2)->controlPoint1(), QPointF(50,20)); QVERIFY(path1.pointByIndex(index1)->activeControlPoint1()); QVERIFY(!path1.pointByIndex(index1)->activeControlPoint2()); KoPathPointMergeCommand cmd1(pd1, pd2); cmd1.redo(); QCOMPARE(path1.subpathCount(), 1); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(25,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint1(), QPointF(5,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint2(), QPointF(45,20)); QVERIFY(path1.pointByIndex(index1)->activeControlPoint1()); QVERIFY(path1.pointByIndex(index1)->activeControlPoint2()); cmd1.undo(); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(20,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint1(), QPointF(0,20)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(30,20)); QCOMPARE(path1.pointByIndex(index2)->controlPoint1(), QPointF(50,20)); QVERIFY(path1.pointByIndex(index1)->activeControlPoint1()); QVERIFY(!path1.pointByIndex(index1)->activeControlPoint2()); KoPathPointMergeCommand cmd2(pd2, pd1); cmd2.redo(); QCOMPARE(path1.subpathCount(), 1); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(25,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint1(), QPointF(5,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint2(), QPointF(45,20)); QVERIFY(path1.pointByIndex(index1)->activeControlPoint1()); QVERIFY(path1.pointByIndex(index1)->activeControlPoint2()); cmd2.undo(); QCOMPARE(path1.subpathCount(), 2); QCOMPARE(path1.pointByIndex(index1)->point(), QPointF(20,20)); QCOMPARE(path1.pointByIndex(index1)->controlPoint1(), QPointF(0,20)); QCOMPARE(path1.pointByIndex(index2)->point(), QPointF(30,20)); QCOMPARE(path1.pointByIndex(index2)->controlPoint1(), QPointF(50,20)); QVERIFY(path1.pointByIndex(index1)->activeControlPoint1()); QVERIFY(!path1.pointByIndex(index1)->activeControlPoint2()); } QTEST_MAIN(TestPointMergeCommand) #include <TestPointMergeCommand.moc>
gpl-2.0
fdroid/gp-peak-kernel
drivers/char/mem.c
20686
/* * linux/drivers/char/mem.c * * Copyright (C) 1991, 1992 Linus Torvalds * * Added devfs support. * Jan-11-1998, C. Scott Ananian <[email protected]> * Shared /dev/zero mmapping support, Feb 2000, Kanoj Sarcar <[email protected]> */ #include <linux/mm.h> #include <linux/miscdevice.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/mman.h> #include <linux/random.h> #include <linux/init.h> #include <linux/raw.h> #include <linux/tty.h> #include <linux/capability.h> #include <linux/ptrace.h> #include <linux/device.h> #include <linux/highmem.h> #include <linux/crash_dump.h> #include <linux/backing-dev.h> #include <linux/bootmem.h> #include <linux/splice.h> #include <linux/pfn.h> #include <asm/uaccess.h> #include <asm/io.h> #ifdef CONFIG_IA64 # include <linux/efi.h> #endif static inline unsigned long size_inside_page(unsigned long start, unsigned long size) { unsigned long sz; sz = PAGE_SIZE - (start & (PAGE_SIZE - 1)); return min(sz, size); } #ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE static inline int valid_phys_addr_range(unsigned long addr, size_t count) { return addr + count <= __pa(high_memory); } static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) { return 1; } #endif #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) #ifdef CONFIG_STRICT_DEVMEM static inline int range_is_allowed(unsigned long pfn, unsigned long size) { u64 from = ((u64)pfn) << PAGE_SHIFT; u64 to = from + size; u64 cursor = from; while (cursor < to) { if (!devmem_is_allowed(pfn)) { printk(KERN_INFO "Program %s tried to access /dev/mem between %Lx->%Lx.\n", current->comm, from, to); return 0; } cursor += PAGE_SIZE; pfn++; } return 1; } #else static inline int range_is_allowed(unsigned long pfn, unsigned long size) { return 1; } #endif #endif #ifdef CONFIG_DEVMEM void __weak unxlate_dev_mem_ptr(unsigned long phys, void *addr) { } /* * This funcion reads the *physical* memory. The f_pos points directly to the * memory location. */ static ssize_t read_mem(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; ssize_t read, sz; char *ptr; if (!valid_phys_addr_range(p, count)) return -EFAULT; read = 0; #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED /* we don't have page 0 mapped on sparc and m68k.. */ if (p < PAGE_SIZE) { sz = size_inside_page(p, count); if (sz > 0) { if (clear_user(buf, sz)) return -EFAULT; buf += sz; p += sz; count -= sz; read += sz; } } #endif while (count > 0) { unsigned long remaining; sz = size_inside_page(p, count); if (!range_is_allowed(p >> PAGE_SHIFT, count)) return -EPERM; /* * On ia64 if a page has been mapped somewhere as uncached, then * it must also be accessed uncached by the kernel or data * corruption may occur. */ ptr = xlate_dev_mem_ptr(p); if (!ptr) return -EFAULT; remaining = copy_to_user(buf, ptr, sz); unxlate_dev_mem_ptr(p, ptr); if (remaining) return -EFAULT; buf += sz; p += sz; count -= sz; read += sz; } *ppos += read; return read; } static ssize_t write_mem(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; ssize_t written, sz; unsigned long copied; void *ptr; if (!valid_phys_addr_range(p, count)) return -EFAULT; written = 0; #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED /* we don't have page 0 mapped on sparc and m68k.. */ if (p < PAGE_SIZE) { sz = size_inside_page(p, count); /* Hmm. Do something? */ buf += sz; p += sz; count -= sz; written += sz; } #endif while (count > 0) { sz = size_inside_page(p, count); if (!range_is_allowed(p >> PAGE_SHIFT, sz)) return -EPERM; /* * On ia64 if a page has been mapped somewhere as uncached, then * it must also be accessed uncached by the kernel or data * corruption may occur. */ ptr = xlate_dev_mem_ptr(p); if (!ptr) { if (written) break; return -EFAULT; } copied = copy_from_user(ptr, buf, sz); unxlate_dev_mem_ptr(p, ptr); if (copied) { written += sz - copied; if (written) break; return -EFAULT; } buf += sz; p += sz; count -= sz; written += sz; } *ppos += written; return written; } #endif /* CONFIG_DEVMEM */ #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) int __weak phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, unsigned long size, pgprot_t *vma_prot) { return 1; } #ifndef __HAVE_PHYS_MEM_ACCESS_PROT /* * Architectures vary in how they handle caching for addresses * outside of main memory. * */ #ifdef pgprot_noncached static int uncached_access(struct file *file, unsigned long addr) { #if defined(CONFIG_IA64) /* * On ia64, we ignore O_DSYNC because we cannot tolerate memory * attribute aliases. */ return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); #elif defined(CONFIG_MIPS) { extern int __uncached_access(struct file *file, unsigned long addr); return __uncached_access(file, addr); } #else /* * Accessing memory above the top the kernel knows about or through a * file pointer * that was marked O_DSYNC will be done non-cached. */ if (file->f_flags & O_DSYNC) return 1; return addr >= __pa(high_memory); #endif } #endif static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot) { #ifdef pgprot_noncached unsigned long offset = pfn << PAGE_SHIFT; if (uncached_access(file, offset)) return pgprot_noncached(vma_prot); #endif return vma_prot; } #endif #ifndef CONFIG_MMU static unsigned long get_unmapped_area_mem(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { if (!valid_mmap_phys_addr_range(pgoff, len)) return (unsigned long) -EINVAL; return pgoff << PAGE_SHIFT; } /* can't do an in-place private mapping if there's no MMU */ static inline int private_mapping_ok(struct vm_area_struct *vma) { return vma->vm_flags & VM_MAYSHARE; } #else #define get_unmapped_area_mem NULL static inline int private_mapping_ok(struct vm_area_struct *vma) { return 1; } #endif static const struct vm_operations_struct mmap_mem_ops = { #ifdef CONFIG_HAVE_IOREMAP_PROT .access = generic_access_phys #endif }; static int mmap_mem(struct file *file, struct vm_area_struct *vma) { size_t size = vma->vm_end - vma->vm_start; if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) return -EINVAL; if (!private_mapping_ok(vma)) return -ENOSYS; if (!range_is_allowed(vma->vm_pgoff, size)) return -EPERM; if (!phys_mem_access_prot_allowed(file, vma->vm_pgoff, size, &vma->vm_page_prot)) return -EINVAL; vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, size, vma->vm_page_prot); vma->vm_ops = &mmap_mem_ops; /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size, vma->vm_page_prot)) { return -EAGAIN; } return 0; } #endif /* CONFIG_DEVMEM */ #ifdef CONFIG_DEVKMEM static int mmap_kmem(struct file *file, struct vm_area_struct *vma) { unsigned long pfn; /* Turn a kernel-virtual address into a physical page frame */ pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT; /* * RED-PEN: on some architectures there is more mapped memory than * available in mem_map which pfn_valid checks for. Perhaps should add a * new macro here. * * RED-PEN: vmalloc is not supported right now. */ if (!pfn_valid(pfn)) return -EIO; vma->vm_pgoff = pfn; return mmap_mem(file, vma); } #endif #ifdef CONFIG_CRASH_DUMP /* * Read memory corresponding to the old kernel. */ static ssize_t read_oldmem(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long pfn, offset; size_t read = 0, csize; int rc = 0; while (count) { pfn = *ppos / PAGE_SIZE; if (pfn > saved_max_pfn) return read; offset = (unsigned long)(*ppos % PAGE_SIZE); if (count > PAGE_SIZE - offset) csize = PAGE_SIZE - offset; else csize = count; rc = copy_oldmem_page(pfn, buf, csize, offset, 1); if (rc < 0) return rc; buf += csize; *ppos += csize; read += csize; count -= csize; } return read; } #endif #ifdef CONFIG_DEVKMEM /* * This function reads the *virtual* memory as seen by the kernel. */ static ssize_t read_kmem(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; ssize_t low_count, read, sz; char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */ int err = 0; read = 0; if (p < (unsigned long) high_memory) { low_count = count; if (count > (unsigned long)high_memory - p) low_count = (unsigned long)high_memory - p; #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED /* we don't have page 0 mapped on sparc and m68k.. */ if (p < PAGE_SIZE && low_count > 0) { sz = size_inside_page(p, low_count); if (clear_user(buf, sz)) return -EFAULT; buf += sz; p += sz; read += sz; low_count -= sz; count -= sz; } #endif while (low_count > 0) { sz = size_inside_page(p, low_count); /* * On ia64 if a page has been mapped somewhere as * uncached, then it must also be accessed uncached * by the kernel or data corruption may occur */ kbuf = xlate_dev_kmem_ptr((char *)p); if (copy_to_user(buf, kbuf, sz)) return -EFAULT; buf += sz; p += sz; read += sz; low_count -= sz; count -= sz; } } if (count > 0) { kbuf = (char *)__get_free_page(GFP_KERNEL); if (!kbuf) return -ENOMEM; while (count > 0) { sz = size_inside_page(p, count); if (!is_vmalloc_or_module_addr((void *)p)) { err = -ENXIO; break; } sz = vread(kbuf, (char *)p, sz); if (!sz) break; if (copy_to_user(buf, kbuf, sz)) { err = -EFAULT; break; } count -= sz; buf += sz; read += sz; p += sz; } free_page((unsigned long)kbuf); } *ppos = p; return read ? read : err; } static ssize_t do_write_kmem(unsigned long p, const char __user *buf, size_t count, loff_t *ppos) { ssize_t written, sz; unsigned long copied; written = 0; #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED /* we don't have page 0 mapped on sparc and m68k.. */ if (p < PAGE_SIZE) { sz = size_inside_page(p, count); /* Hmm. Do something? */ buf += sz; p += sz; count -= sz; written += sz; } #endif while (count > 0) { char *ptr; sz = size_inside_page(p, count); /* * On ia64 if a page has been mapped somewhere as uncached, then * it must also be accessed uncached by the kernel or data * corruption may occur. */ ptr = xlate_dev_kmem_ptr((char *)p); copied = copy_from_user(ptr, buf, sz); if (copied) { written += sz - copied; if (written) break; return -EFAULT; } buf += sz; p += sz; count -= sz; written += sz; } *ppos += written; return written; } /* * This function writes to the *virtual* memory as seen by the kernel. */ static ssize_t write_kmem(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; ssize_t wrote = 0; ssize_t virtr = 0; char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ int err = 0; if (p < (unsigned long) high_memory) { unsigned long to_write = min_t(unsigned long, count, (unsigned long)high_memory - p); wrote = do_write_kmem(p, buf, to_write, ppos); if (wrote != to_write) return wrote; p += wrote; buf += wrote; count -= wrote; } if (count > 0) { kbuf = (char *)__get_free_page(GFP_KERNEL); if (!kbuf) return wrote ? wrote : -ENOMEM; while (count > 0) { unsigned long sz = size_inside_page(p, count); unsigned long n; if (!is_vmalloc_or_module_addr((void *)p)) { err = -ENXIO; break; } n = copy_from_user(kbuf, buf, sz); if (n) { err = -EFAULT; break; } vwrite(kbuf, (char *)p, sz); count -= sz; buf += sz; virtr += sz; p += sz; } free_page((unsigned long)kbuf); } *ppos = p; return virtr + wrote ? : err; } #endif #ifdef CONFIG_DEVPORT static ssize_t read_port(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long i = *ppos; char __user *tmp = buf; if (!access_ok(VERIFY_WRITE, buf, count)) return -EFAULT; while (count-- > 0 && i < 65536) { if (__put_user(inb(i), tmp) < 0) return -EFAULT; i++; tmp++; } *ppos = i; return tmp-buf; } static ssize_t write_port(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { unsigned long i = *ppos; const char __user * tmp = buf; if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; while (count-- > 0 && i < 65536) { char c; if (__get_user(c, tmp)) { if (tmp > buf) break; return -EFAULT; } outb(c, i); i++; tmp++; } *ppos = i; return tmp-buf; } #endif static ssize_t read_null(struct file *file, char __user *buf, size_t count, loff_t *ppos) { return 0; } static ssize_t write_null(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { return count; } static int pipe_to_null(struct pipe_inode_info *info, struct pipe_buffer *buf, struct splice_desc *sd) { return sd->len; } static ssize_t splice_write_null(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) { return splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_null); } static ssize_t read_zero(struct file *file, char __user *buf, size_t count, loff_t *ppos) { size_t written; if (!count) return 0; if (!access_ok(VERIFY_WRITE, buf, count)) return -EFAULT; written = 0; while (count) { unsigned long unwritten; size_t chunk = count; if (chunk > PAGE_SIZE) chunk = PAGE_SIZE; /* Just for latency reasons */ unwritten = __clear_user(buf, chunk); written += chunk - unwritten; if (unwritten) break; if (signal_pending(current)) return written ? written : -ERESTARTSYS; buf += chunk; count -= chunk; cond_resched(); } return written ? written : -EFAULT; } static int mmap_zero(struct file *file, struct vm_area_struct *vma) { #ifndef CONFIG_MMU return -ENOSYS; #endif if (vma->vm_flags & VM_SHARED) return shmem_zero_setup(vma); return 0; } static ssize_t write_full(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { return -ENOSPC; } /* * Special lseek() function for /dev/null and /dev/zero. Most notably, you * can fopen() both devices with "a" now. This was previously impossible. * -- SRB. */ static loff_t null_lseek(struct file *file, loff_t offset, int orig) { return file->f_pos = 0; } #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) || defined(CONFIG_DEVPORT) /* * The memory devices use the full 32/64 bits of the offset, and so we cannot * check against negative addresses: they are ok. The return value is weird, * though, in that case (0). * * also note that seeking relative to the "end of file" isn't supported: * it has no meaning, so it returns -EINVAL. */ static loff_t memory_lseek(struct file *file, loff_t offset, int orig) { loff_t ret; mutex_lock(&file->f_path.dentry->d_inode->i_mutex); switch (orig) { case SEEK_CUR: offset += file->f_pos; case SEEK_SET: /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ if ((unsigned long long)offset >= ~0xFFFULL) { ret = -EOVERFLOW; break; } file->f_pos = offset; ret = file->f_pos; force_successful_syscall_return(); break; default: ret = -EINVAL; } mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); return ret; } #endif #if defined(CONFIG_DEVMEM) || defined(CONFIG_DEVKMEM) || defined(CONFIG_DEVPORT) static int open_port(struct inode * inode, struct file * filp) { return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; } #endif #define zero_lseek null_lseek #define full_lseek null_lseek #define write_zero write_null #define read_full read_zero #define open_mem open_port #define open_kmem open_mem #define open_oldmem open_mem #ifdef CONFIG_DEVMEM static const struct file_operations mem_fops = { .llseek = memory_lseek, .read = read_mem, .write = write_mem, .mmap = mmap_mem, .open = open_mem, .get_unmapped_area = get_unmapped_area_mem, }; #endif #ifdef CONFIG_DEVKMEM static const struct file_operations kmem_fops = { .llseek = memory_lseek, .read = read_kmem, .write = write_kmem, .mmap = mmap_kmem, .open = open_kmem, .get_unmapped_area = get_unmapped_area_mem, }; #endif static const struct file_operations null_fops = { .llseek = null_lseek, .read = read_null, .write = write_null, .splice_write = splice_write_null, }; #ifdef CONFIG_DEVPORT static const struct file_operations port_fops = { .llseek = memory_lseek, .read = read_port, .write = write_port, .open = open_port, }; #endif static const struct file_operations zero_fops = { .llseek = zero_lseek, .read = read_zero, .write = write_zero, .mmap = mmap_zero, }; /* * capabilities for /dev/zero * - permits private mappings, "copies" are taken of the source of zeros * - no writeback happens */ static struct backing_dev_info zero_bdi = { .name = "char/mem", .capabilities = BDI_CAP_MAP_COPY | BDI_CAP_NO_ACCT_AND_WRITEBACK, }; static const struct file_operations full_fops = { .llseek = full_lseek, .read = read_full, .write = write_full, }; #ifdef CONFIG_CRASH_DUMP static const struct file_operations oldmem_fops = { .read = read_oldmem, .open = open_oldmem, .llseek = default_llseek, }; #endif static ssize_t kmsg_writev(struct kiocb *iocb, const struct iovec *iv, unsigned long count, loff_t pos) { char *line, *p; int i; ssize_t ret = -EFAULT; size_t len = iov_length(iv, count); //don't printk androit init log, if you want, turn it on. return 0; line = kmalloc(len + 1, GFP_KERNEL); if (line == NULL) return -ENOMEM; /* * copy all vectors into a single string, to ensure we do * not interleave our log line with other printk calls */ p = line; for (i = 0; i < count; i++) { if (copy_from_user(p, iv[i].iov_base, iv[i].iov_len)) goto out; p += iv[i].iov_len; } p[0] = '\0'; ret = printk("%s", line); /* printk can add a prefix */ if (ret > len) ret = len; out: kfree(line); return ret; } static const struct file_operations kmsg_fops = { .aio_write = kmsg_writev, .llseek = noop_llseek, }; static const struct memdev { const char *name; mode_t mode; const struct file_operations *fops; struct backing_dev_info *dev_info; } devlist[] = { #ifdef CONFIG_DEVMEM [1] = { "mem", 0, &mem_fops, &directly_mappable_cdev_bdi }, #endif #ifdef CONFIG_DEVKMEM [2] = { "kmem", 0, &kmem_fops, &directly_mappable_cdev_bdi }, #endif [3] = { "null", 0666, &null_fops, NULL }, #ifdef CONFIG_DEVPORT [4] = { "port", 0, &port_fops, NULL }, #endif [5] = { "zero", 0666, &zero_fops, &zero_bdi }, [7] = { "full", 0666, &full_fops, NULL }, [8] = { "random", 0666, &random_fops, NULL }, [9] = { "urandom", 0666, &urandom_fops, NULL }, [11] = { "kmsg", 0, &kmsg_fops, NULL }, #ifdef CONFIG_CRASH_DUMP [12] = { "oldmem", 0, &oldmem_fops, NULL }, #endif }; static int memory_open(struct inode *inode, struct file *filp) { int minor; const struct memdev *dev; minor = iminor(inode); if (minor >= ARRAY_SIZE(devlist)) return -ENXIO; dev = &devlist[minor]; if (!dev->fops) return -ENXIO; filp->f_op = dev->fops; if (dev->dev_info) filp->f_mapping->backing_dev_info = dev->dev_info; /* Is /dev/mem or /dev/kmem ? */ if (dev->dev_info == &directly_mappable_cdev_bdi) filp->f_mode |= FMODE_UNSIGNED_OFFSET; if (dev->fops->open) return dev->fops->open(inode, filp); return 0; } static const struct file_operations memory_fops = { .open = memory_open, .llseek = noop_llseek, }; static char *mem_devnode(struct device *dev, mode_t *mode) { if (mode && devlist[MINOR(dev->devt)].mode) *mode = devlist[MINOR(dev->devt)].mode; return NULL; } static struct class *mem_class; static int __init chr_dev_init(void) { int minor; int err; err = bdi_init(&zero_bdi); if (err) return err; if (register_chrdev(MEM_MAJOR, "mem", &memory_fops)) printk("unable to get major %d for memory devs\n", MEM_MAJOR); mem_class = class_create(THIS_MODULE, "mem"); if (IS_ERR(mem_class)) return PTR_ERR(mem_class); mem_class->devnode = mem_devnode; for (minor = 1; minor < ARRAY_SIZE(devlist); minor++) { if (!devlist[minor].name) continue; device_create(mem_class, NULL, MKDEV(MEM_MAJOR, minor), NULL, devlist[minor].name); } return tty_init(); } fs_initcall(chr_dev_init);
gpl-2.0
dilawar/sesc
src_without_LF/libcore/RunningProcs.cpp
7893
/* SESC: Super ESCalar simulator Copyright (C) 2003 University of Illinois. Contributed by Jose Renau Milos Prvulovic This file is part of SESC. SESC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. SESC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SESC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "RunningProcs.h" #include "GProcessor.h" #ifdef SESC_THERM #include "ReportTherm.h" #endif #ifdef TASKSCALAR #include "TaskContext.h" #endif RunningProcs::RunningProcs() { stayInLoop=true; } void RunningProcs::finishWorkNow() { stayInLoop=false; #ifdef SESC_THERM ReportTherm::stopCB(); #endif workingList.clear(); startProc =0; } void RunningProcs::workingListRemove(GProcessor *core) { ProcessorMultiSet::iterator availIt=availableProcessors.find(core); if (availIt==availableProcessors.end()) availableProcessors.insert(core); if (core->hasWork()) return; bool found=false; for(size_t i=0;i<workingList.size();i++) { if (workingList[i] == core) { found = true; continue; }else if (found) { I(i>0); workingList[i-1] = workingList[i]; } } workingList.pop_back(); startProc =0; stayInLoop=!workingList.empty(); } void RunningProcs::workingListAdd(GProcessor *core) { ProcessorMultiSet::iterator availIt=availableProcessors.find(core); if (availIt!=availableProcessors.end()) availableProcessors.erase(availIt); // TODO: Ein? I(core->hasWork()); for(size_t i=0;i<workingList.size();i++) { if (workingList[i] == core) return; } workingList.push_back(core); } void RunningProcs::run() { I(cpuVector.size() > 0 ); IS(currentCPU = 0); do{ if ( workingList.empty() ) { EventScheduler::advanceClock(); } #ifdef TASKSCALAR HVersionDomain::tryPropagateSafeTokenAll(); #endif while (hasWork()) { stayInLoop=true; startProc = 0; do{ // Loop duplicated so round-robin fetch starts on different // processor each cycle <><> for(size_t i=startProc ; i < workingList.size() ; i++) { if (workingList[i]->hasWork()) { currentCPU = workingList[i]; currentCPU->advanceClock(); }else{ workingListRemove(workingList[i]); } } for(size_t i=0 ; i < startProc ; i++) { if (workingList[i]->hasWork()) { currentCPU = workingList[i]; currentCPU->advanceClock(); }else{ workingListRemove(workingList[i]); } } startProc++; if (startProc >= workingList.size()) startProc = 0; IS(currentCPU = 0); EventScheduler::advanceClock(); }while(stayInLoop); #ifdef SESC_THERM ReportTherm::stopCB(); #endif } }while(!EventScheduler::empty()); } void RunningProcs::makeRunnable(ProcessId *proc) { // The process must be in the InvalidState I(proc->getState()==InvalidState); // Now the process is runnable (but still not running) ProcessId *victimProc=proc->becomeReady(); // Get the CPU where the process would like to run CPU_t cpu=proc->getCPU(); // If there is a preferred CPU, try to schedule there if(cpu>=0){ // Get the GProcessor of the CPU GProcessor *core=getProcessor(cpu); // Are there available flows on this CPU if(core->availableFlows()){ // There is an available flow, grab it switchIn(cpu,proc); return; } } // Could not run the process on the cpu it wanted // If the process is not pinned to that processor, try to find another cpu if(!proc->isPinned()){ // Find an available processor GProcessor *core=getAvailableProcessor(); // If available processor found, run there if(core){ switchIn(core->getId(),proc); return; } } // Could not run on an available processor // If there is a process to evict, switch it out and switch the new one in its place if(victimProc){ I(victimProc->getState()==RunningState); // get the processor where victim process is running cpu=victimProc->getCPU(); switchOut(cpu, victimProc); switchIn(cpu,proc); victimProc->becomeNonReady(); makeRunnable(victimProc); } // No free processor, no process to evict // The new process has to wait its turn } void RunningProcs::makeNonRunnable(ProcessId *proc) { // It should still be running or ready I((proc->getState()==RunningState)||(proc->getState()==ReadyState)); // If it is still running, remove it from the processor if(proc->getState()==RunningState){ // Find the CPU where it is running CPU_t cpu=proc->getCPU(); // Remove it from there switchOut(cpu, proc); // Set the state to InvalidState to make the process non-runnable proc->becomeNonReady(); // Find another process to run on this cpu ProcessId *newProc=ProcessId::queueGet(cpu); // If a process has been found, switch it in if(newProc){ switchIn(cpu,newProc); } }else{ // Just set the state to InvalidState to make it non-runnable proc->becomeNonReady(); } } void RunningProcs::setProcessor(CPU_t cpu, GProcessor *newCore) { if(cpu >= (CPU_t)size()) cpuVector.resize(cpu+1); GProcessor *oldCore=cpuVector[cpu]; cpuVector[cpu]=newCore; // Is there was an old core in this slot if(oldCore){ // Erase all instances of the old core from the available multiset size_t erased=availableProcessors.erase(oldCore); // Check whether we erased the right number of entries I(oldCore->getMaxFlows()==erased); } // If there is a new core in this slot if(newCore){ // Insert the new core into the available mulstiset // once for each of its available flows for(size_t i=0;i<newCore->getMaxFlows();i++) availableProcessors.insert(newCore); } #ifdef TRACE_DRIVEN // in trace-driven mode, all processor must have work in the beggining workingListAdd(newCore); #endif } void RunningProcs::switchIn(CPU_t id, ProcessId *proc) { GProcessor *core=getProcessor(id); workingListAdd(core); proc->switchIn(id); #ifdef TS_STALL core->setStallUntil(globalClock+5); #endif core->switchIn(proc->getPid()); // Must be the last thing because it can generate a switch } void RunningProcs::switchOut(CPU_t id, ProcessId *proc) { GProcessor *core=getProcessor(id); Pid_t pid = proc->getPid(); proc->switchOut(core->getAndClearnGradInsts(pid), core->getAndClearnWPathInsts(pid)); core->switchOut(pid); workingListRemove(core); } GProcessor *RunningProcs::getAvailableProcessor(void) { // Get the first processor in the avaialable multiset ProcessorMultiSet::iterator availIt=availableProcessors.begin(); if(availIt==availableProcessors.end()) { //UGLY UGLY fix for the bug, i'll fix it soon. --luis for(unsigned cpuId = 0; cpuId < size(); cpuId++) { if(getProcessor(cpuId)->availableFlows() > 0) return getProcessor(cpuId); } return 0; } // SMTs have multiple available processors. Give more priority to // empty cpus GProcessor *gproc = *availIt; while ((*availIt)->getMaxFlows() > (*availIt)->availableFlows()) { availIt++; if (availIt == availableProcessors.end()) return gproc; } I(availIt != availableProcessors.end()); return *availIt; }
gpl-2.0
santu47/Eramba
operations/security_incident_edit.php
6808
<? include_once("lib/security_incident_lib.php"); include_once("lib/security_incident_classification_lib.php"); include_once("lib/security_services_lib.php"); include_once("lib/security_incident_service_lib.php"); include_once("lib/general_classification_lib.php"); include_once("lib/security_incident_status_lib.php"); include_once("lib/site_lib.php"); include_once("lib/tp_lib.php"); include_once("lib/asset_lib.php"); $section = $_GET["section"]; $subsection = $_GET["subsection"]; $action = $_GET["action"]; $security_incident_id = $_GET["security_incident_id"]; $base_url_list = build_base_url($section,"security_incident_list"); if (is_numeric($security_incident_id)) { $security_incident_item = lookup_security_incident("security_incident_id",$security_incident_id); } ?> <section id="content-wrapper"> <h3>Edit or Create a Security Incidents</h3> <span class="description">Use this form to create or edit Security Incidents</span> <div class="tab-wrapper"> <ul class="tabs"> <li class="first active"> <a href="tab1">General</a> <span class="right"></span> </li> </ul> <div class="tab-content"> <div class="tab" id="tab1"> <? echo " <form name=\"edit\" method=\"GET\" action=\"$base_url_list\">"; ?> <label for="name">Security Incident Title</label> <span class="description">Give the Security Incident a title, name or code so it's easily identified on the list list menu</span> <? echo " <input type=\"text\" class=\"filter-text\" name=\"security_incident_title\" id=\"security_incident_title\" value=\"$security_incident_item[security_incident_title]\"/>";?> <label for="description">Incident Description</label> <span class="description">Describe the Security Incident in detail (when, what, where, why, whom, how).</span> <? echo "<textarea name=\"security_incident_description\" class=\"filter-text\">$security_incident_item[security_incident_description]</textarea>";?> <label for="legalType">Third Parties Affected</label> <span class="description"></span> <select name="security_incident_tp_id" id="" class="chzn-select"> <option value="-1">Select the affected Third Party (If any)</option> <? list_drop_menu_tp($security_incident_item[security_incident_tp_id],"tp_name"); ?> </select> <label for="legalType">Incident Classification</label> <span class="description"></span> <select name="security_incident_classification_id" id="" class="chzn-select"> <option value="-1">Select the Incident Classification</option> <? list_drop_menu_security_incident_classification($security_incident_item[security_incident_classification_id],"security_incident_classification_id"); ?> </select> <label for="legalType">Compromised Asset</label> <span class="description">Describe an asset from the list of registered asset that best represents the assets being affected by this incident</span> <select name="security_incident_compromised_asset_id" id="" class="chzn-select"> <option value="-1">Select an Asset</option> <? list_drop_menu_asset($security_incident_item[security_incident_compromised_asset_id],"asset_id"); ?> </select> <label for="legalType">Compensating Controls</label> <span class="description">Select those controls involved on this incident</span> <select name="security_incident_service[]" id="" class="chzn-select" multiple="multiple"> <option value="-1">Select one or more Controls...</option> <? $pre_selected_security_services_list = list_security_incident_service_join(" WHERE security_incident_service_incident_id = \"$security_incident_item[security_incident_id]\""); $pre_selected_items = array(); foreach($pre_selected_security_services_list as $pre_selected_security_services_item) { array_push($pre_selected_items,$pre_selected_security_services_item[security_incident_service_service_id]); } list_drop_menu_security_services($pre_selected_items,"security_services_name"); ?> </select> <label for="description">Security Incident Owner</label> <span class="description">Describe who is assigned on this incident and is responsible for it's treatment</span> <? echo "<input type=\"text\" class=\"filter-text\" name=\"security_incident_owner_id\" id=\"security_incident_owner\" value=\"$security_incident_item[security_incident_owner_id]\"/>";?> <label for="description">Security Incident Reporter</label> <span class="description">Describe who reported the incident</span> <? echo "<input type=\"text\" class=\"filter-text\" name=\"security_incident_reporter_id\" id=\"security_incident_owner\" value=\"$security_incident_item[security_incident_reporter_id]\"/>";?> <label for="description">Security Incident Victim</label> <span class="description">Describe who was involved on this incident</span> <? echo "<input type=\"text\" class=\"filter-text\" name=\"security_incident_victim_id\" id=\"security_incident_victim_id\" value=\"$security_incident_item[security_incident_victim_id]\"/>";?> <label for="description">Security Incident Open Date</label> <span class="description">Describe the time when the Incident has been reported</span> <? echo "<input type=\"text\" class=\"filter-date datepicker\" name=\"security_incident_open_date\" id=\"security_incident_open_date\" value=\"$security_incident_item[security_incident_open_date]\"/>";?> <label for="description">Security Incident Closure Date</label> <span class="description">Describe the time when the Incident has been closed</span> <? echo "<input type=\"text\" class=\"filter-date datepicker\" name=\"security_incident_closure_date\" id=\"security_incident_closure_date\" value=\"$security_incident_item[security_incident_closure_date]\"/>";?> <label for="legalType">Incident Status</label> <span class="description"></span> <select name="security_incident_status_id" id="" class="chzn-select"> <option value="-1">Select the Incident Status</option> <? list_drop_menu_security_incident_status($security_incident_item[security_incident_status_id],"security_incident_status_id"); ?> </select> </div> <div class="tab" id="tab2"> advanced tab </div> </div> </div> <div class="controls-wrapper"> <INPUT type="hidden" name="action" value="edit"> <INPUT type="hidden" name="section" value="operations"> <INPUT type="hidden" name="subsection" value="security_incident_list"> <? echo " <INPUT type=\"hidden\" name=\"security_incident_id\" value=\"$security_incident_item[security_incident_id]\">"; ?> <a> <INPUT type="submit" value="Submit" class="add-btn"> </a> <? echo " <a href=\"$base_url_list\" class=\"cancel-btn\">"; ?> Cancel <span class="select-icon"></span> </a> </form> </div> <br class="clear"/> </section> </body> </html>
gpl-2.0
linux-nvme/nvme-cli
Documentation/nvme-dera-stat.html
18162
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> <meta name="generator" content="AsciiDoc 8.6.8" /> <title>nvme-dera-stat(1)</title> <style type="text/css"> /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ /* Default font. */ body { font-family: Georgia,serif; } /* Title font. */ h1, h2, h3, h4, h5, h6, div.title, caption.title, thead, p.table.header, #toctitle, #author, #revnumber, #revdate, #revremark, #footer { font-family: Arial,Helvetica,sans-serif; } body { margin: 1em 5% 1em 5%; } a { color: blue; text-decoration: underline; } a:visited { color: fuchsia; } em { font-style: italic; color: navy; } strong { font-weight: bold; color: #083194; } h1, h2, h3, h4, h5, h6 { color: #527bbd; margin-top: 1.2em; margin-bottom: 0.5em; line-height: 1.3; } h1, h2, h3 { border-bottom: 2px solid silver; } h2 { padding-top: 0.5em; } h3 { float: left; } h3 + * { clear: left; } h5 { font-size: 1.0em; } div.sectionbody { margin-left: 0; } hr { border: 1px solid silver; } p { margin-top: 0.5em; margin-bottom: 0.5em; } ul, ol, li > p { margin-top: 0; } ul > li { color: #aaa; } ul > li > * { color: black; } .monospaced, code, pre { font-family: "Courier New", Courier, monospace; font-size: inherit; color: navy; padding: 0; margin: 0; } #author { color: #527bbd; font-weight: bold; font-size: 1.1em; } #email { } #revnumber, #revdate, #revremark { } #footer { font-size: small; border-top: 2px solid silver; padding-top: 0.5em; margin-top: 4.0em; } #footer-text { float: left; padding-bottom: 0.5em; } #footer-badges { float: right; padding-bottom: 0.5em; } #preamble { margin-top: 1.5em; margin-bottom: 1.5em; } div.imageblock, div.exampleblock, div.verseblock, div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, div.admonitionblock { margin-top: 1.0em; margin-bottom: 1.5em; } div.admonitionblock { margin-top: 2.0em; margin-bottom: 2.0em; margin-right: 10%; color: #606060; } div.content { /* Block element content. */ padding: 0; } /* Block element titles. */ div.title, caption.title { color: #527bbd; font-weight: bold; text-align: left; margin-top: 1.0em; margin-bottom: 0.5em; } div.title + * { margin-top: 0; } td div.title:first-child { margin-top: 0.0em; } div.content div.title:first-child { margin-top: 0.0em; } div.content + div.title { margin-top: 0.0em; } div.sidebarblock > div.content { background: #ffffee; border: 1px solid #dddddd; border-left: 4px solid #f0f0f0; padding: 0.5em; } div.listingblock > div.content { border: 1px solid #dddddd; border-left: 5px solid #f0f0f0; background: #f8f8f8; padding: 0.5em; } div.quoteblock, div.verseblock { padding-left: 1.0em; margin-left: 1.0em; margin-right: 10%; border-left: 5px solid #f0f0f0; color: #888; } div.quoteblock > div.attribution { padding-top: 0.5em; text-align: right; } div.verseblock > pre.content { font-family: inherit; font-size: inherit; } div.verseblock > div.attribution { padding-top: 0.75em; text-align: left; } /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ div.verseblock + div.attribution { text-align: left; } div.admonitionblock .icon { vertical-align: top; font-size: 1.1em; font-weight: bold; text-decoration: underline; color: #527bbd; padding-right: 0.5em; } div.admonitionblock td.content { padding-left: 0.5em; border-left: 3px solid #dddddd; } div.exampleblock > div.content { border-left: 3px solid #dddddd; padding-left: 0.5em; } div.imageblock div.content { padding-left: 0; } span.image img { border-style: none; } a.image:visited { color: white; } dl { margin-top: 0.8em; margin-bottom: 0.8em; } dt { margin-top: 0.5em; margin-bottom: 0; font-style: normal; color: navy; } dd > *:first-child { margin-top: 0.1em; } ul, ol { list-style-position: outside; } ol.arabic { list-style-type: decimal; } ol.loweralpha { list-style-type: lower-alpha; } ol.upperalpha { list-style-type: upper-alpha; } ol.lowerroman { list-style-type: lower-roman; } ol.upperroman { list-style-type: upper-roman; } div.compact ul, div.compact ol, div.compact p, div.compact p, div.compact div, div.compact div { margin-top: 0.1em; margin-bottom: 0.1em; } tfoot { font-weight: bold; } td > div.verse { white-space: pre; } div.hdlist { margin-top: 0.8em; margin-bottom: 0.8em; } div.hdlist tr { padding-bottom: 15px; } dt.hdlist1.strong, td.hdlist1.strong { font-weight: bold; } td.hdlist1 { vertical-align: top; font-style: normal; padding-right: 0.8em; color: navy; } td.hdlist2 { vertical-align: top; } div.hdlist.compact tr { margin: 0; padding-bottom: 0; } .comment { background: yellow; } .footnote, .footnoteref { font-size: 0.8em; } span.footnote, span.footnoteref { vertical-align: super; } #footnotes { margin: 20px 0 20px 0; padding: 7px 0 0 0; } #footnotes div.footnote { margin: 0 0 5px 0; } #footnotes hr { border: none; border-top: 1px solid silver; height: 1px; text-align: left; margin-left: 0; width: 20%; min-width: 100px; } div.colist td { padding-right: 0.5em; padding-bottom: 0.3em; vertical-align: top; } div.colist td img { margin-top: 0.3em; } @media print { #footer-badges { display: none; } } #toc { margin-bottom: 2.5em; } #toctitle { color: #527bbd; font-size: 1.1em; font-weight: bold; margin-top: 1.0em; margin-bottom: 0.1em; } div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } div.toclevel2 { margin-left: 2em; font-size: 0.9em; } div.toclevel3 { margin-left: 4em; font-size: 0.9em; } div.toclevel4 { margin-left: 6em; font-size: 0.9em; } span.aqua { color: aqua; } span.black { color: black; } span.blue { color: blue; } span.fuchsia { color: fuchsia; } span.gray { color: gray; } span.green { color: green; } span.lime { color: lime; } span.maroon { color: maroon; } span.navy { color: navy; } span.olive { color: olive; } span.purple { color: purple; } span.red { color: red; } span.silver { color: silver; } span.teal { color: teal; } span.white { color: white; } span.yellow { color: yellow; } span.aqua-background { background: aqua; } span.black-background { background: black; } span.blue-background { background: blue; } span.fuchsia-background { background: fuchsia; } span.gray-background { background: gray; } span.green-background { background: green; } span.lime-background { background: lime; } span.maroon-background { background: maroon; } span.navy-background { background: navy; } span.olive-background { background: olive; } span.purple-background { background: purple; } span.red-background { background: red; } span.silver-background { background: silver; } span.teal-background { background: teal; } span.white-background { background: white; } span.yellow-background { background: yellow; } span.big { font-size: 2em; } span.small { font-size: 0.6em; } span.underline { text-decoration: underline; } span.overline { text-decoration: overline; } span.line-through { text-decoration: line-through; } div.unbreakable { page-break-inside: avoid; } /* * xhtml11 specific * * */ div.tableblock { margin-top: 1.0em; margin-bottom: 1.5em; } div.tableblock > table { border: 3px solid #527bbd; } thead, p.table.header { font-weight: bold; color: #527bbd; } p.table { margin-top: 0; } /* Because the table frame attribute is overriden by CSS in most browsers. */ div.tableblock > table[frame="void"] { border-style: none; } div.tableblock > table[frame="hsides"] { border-left-style: none; border-right-style: none; } div.tableblock > table[frame="vsides"] { border-top-style: none; border-bottom-style: none; } /* * html5 specific * * */ table.tableblock { margin-top: 1.0em; margin-bottom: 1.5em; } thead, p.tableblock.header { font-weight: bold; color: #527bbd; } p.tableblock { margin-top: 0; } table.tableblock { border-width: 3px; border-spacing: 0px; border-style: solid; border-color: #527bbd; border-collapse: collapse; } th.tableblock, td.tableblock { border-width: 1px; padding: 4px; border-style: solid; border-color: #527bbd; } table.tableblock.frame-topbot { border-left-style: hidden; border-right-style: hidden; } table.tableblock.frame-sides { border-top-style: hidden; border-bottom-style: hidden; } table.tableblock.frame-none { border-style: hidden; } th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } /* * manpage specific * * */ body.manpage h1 { padding-top: 0.5em; padding-bottom: 0.5em; border-top: 2px solid silver; border-bottom: 2px solid silver; } body.manpage h2 { border-style: none; } body.manpage div.sectionbody { margin-left: 3em; } @media print { body.manpage div#toc { display: none; } } </style> <script type="text/javascript"> /*<![CDATA[*/ var asciidoc = { // Namespace. ///////////////////////////////////////////////////////////////////// // Table Of Contents generator ///////////////////////////////////////////////////////////////////// /* Author: Mihai Bazon, September 2002 * http://students.infoiasi.ro/~mishoo * * Table Of Content generator * Version: 0.4 * * Feel free to use this script under the terms of the GNU General Public * License, as long as you do not remove or alter this notice. */ /* modified by Troy D. Hanson, September 2006. License: GPL */ /* modified by Stuart Rackham, 2006, 2009. License: GPL */ // toclevels = 1..4. toc: function (toclevels) { function getText(el) { var text = ""; for (var i = el.firstChild; i != null; i = i.nextSibling) { if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. text += i.data; else if (i.firstChild != null) text += getText(i); } return text; } function TocEntry(el, text, toclevel) { this.element = el; this.text = text; this.toclevel = toclevel; } function tocEntries(el, toclevels) { var result = new Array; var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); // Function that scans the DOM tree for header elements (the DOM2 // nodeIterator API would be a better technique but not supported by all // browsers). var iterate = function (el) { for (var i = el.firstChild; i != null; i = i.nextSibling) { if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { var mo = re.exec(i.tagName); if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { result[result.length] = new TocEntry(i, getText(i), mo[1]-1); } iterate(i); } } } iterate(el); return result; } var toc = document.getElementById("toc"); if (!toc) { return; } // Delete existing TOC entries in case we're reloading the TOC. var tocEntriesToRemove = []; var i; for (i = 0; i < toc.childNodes.length; i++) { var entry = toc.childNodes[i]; if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") && entry.getAttribute("class").match(/^toclevel/)) tocEntriesToRemove.push(entry); } for (i = 0; i < tocEntriesToRemove.length; i++) { toc.removeChild(tocEntriesToRemove[i]); } // Rebuild TOC entries. var entries = tocEntries(document.getElementById("content"), toclevels); for (var i = 0; i < entries.length; ++i) { var entry = entries[i]; if (entry.element.id == "") entry.element.id = "_toc_" + i; var a = document.createElement("a"); a.href = "#" + entry.element.id; a.appendChild(document.createTextNode(entry.text)); var div = document.createElement("div"); div.appendChild(a); div.className = "toclevel" + entry.toclevel; toc.appendChild(div); } if (entries.length == 0) toc.parentNode.removeChild(toc); }, ///////////////////////////////////////////////////////////////////// // Footnotes generator ///////////////////////////////////////////////////////////////////// /* Based on footnote generation code from: * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html */ footnotes: function () { // Delete existing footnote entries in case we're reloading the footnodes. var i; var noteholder = document.getElementById("footnotes"); if (!noteholder) { return; } var entriesToRemove = []; for (i = 0; i < noteholder.childNodes.length; i++) { var entry = noteholder.childNodes[i]; if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") entriesToRemove.push(entry); } for (i = 0; i < entriesToRemove.length; i++) { noteholder.removeChild(entriesToRemove[i]); } // Rebuild footnote entries. var cont = document.getElementById("content"); var spans = cont.getElementsByTagName("span"); var refs = {}; var n = 0; for (i=0; i<spans.length; i++) { if (spans[i].className == "footnote") { n++; var note = spans[i].getAttribute("data-note"); if (!note) { // Use [\s\S] in place of . so multi-line matches work. // Because JavaScript has no s (dotall) regex flag. note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; spans[i].innerHTML = "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + "' title='View footnote' class='footnote'>" + n + "</a>]"; spans[i].setAttribute("data-note", note); } noteholder.innerHTML += "<div class='footnote' id='_footnote_" + n + "'>" + "<a href='#_footnoteref_" + n + "' title='Return to text'>" + n + "</a>. " + note + "</div>"; var id =spans[i].getAttribute("id"); if (id != null) refs["#"+id] = n; } } if (n == 0) noteholder.parentNode.removeChild(noteholder); else { // Process footnoterefs. for (i=0; i<spans.length; i++) { if (spans[i].className == "footnoteref") { var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); href = href.match(/#.*/)[0]; // Because IE return full URL. n = refs[href]; spans[i].innerHTML = "[<a href='#_footnote_" + n + "' title='View footnote' class='footnote'>" + n + "</a>]"; } } } }, install: function(toclevels) { var timerId; function reinstall() { asciidoc.footnotes(); if (toclevels) { asciidoc.toc(toclevels); } } function reinstallAndRemoveTimer() { clearInterval(timerId); reinstall(); } timerId = setInterval(reinstall, 500); if (document.addEventListener) document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); else window.onload = reinstallAndRemoveTimer; } } asciidoc.install(); /*]]>*/ </script> </head> <body class="article"> <div id="header"> <h1>nvme-dera-stat(1)</h1> </div> <div id="content"> <div class="sect1"> <h2 id="_name">NAME</h2> <div class="sectionbody"> <div class="paragraph"><p>nvme-dera-stat - Send NVMe Dera Device status and Additional SMART log page request, returns result and log</p></div> </div> </div> <div class="sect1"> <h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content"><em>nvme dera stat</em> &lt;device&gt;</pre> <div class="attribution"> </div></div> </div> </div> <div class="sect1"> <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> <div class="paragraph"><p>Retrieves the NVMe Dera Device status and Additional SMART log page from the device and provides the returned structure.</p></div> <div class="paragraph"><p>The &lt;device&gt; parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></div> <div class="paragraph"><p>On success, the returned status and smart log structure are printed in a readable format.</p></div> </div> </div> <div class="sect1"> <h2 id="_options">OPTIONS</h2> <div class="sectionbody"> <div class="paragraph"><p>none</p></div> </div> </div> <div class="sect1"> <h2 id="_examples">EXAMPLES</h2> <div class="sectionbody"> <div class="ulist"><ul> <li> <p> Print the Dera Device status and Additional SMART log page in a human readable format: </p> <div class="listingblock"> <div class="content"> <pre><code># nvme dera stat /dev/nvme0</code></pre> </div></div> </li> </ul></div> </div> </div> <div class="sect1"> <h2 id="_nvme">NVME</h2> <div class="sectionbody"> <div class="paragraph"><p>Part of the nvme-user suite</p></div> </div> </div> </div> <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> Last updated 2019-11-26 13:57:30 CST </div> </div> </body> </html>
gpl-2.0
thoaionline/vlc
src/input/stream.c
57867
/***************************************************************************** * stream.c ***************************************************************************** * Copyright (C) 1999-2004 VLC authors and VideoLAN * $Id$ * * Authors: Laurent Aimar <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <dirent.h> #include <assert.h> #include <vlc_common.h> #include <vlc_strings.h> #include <vlc_memory.h> #include <libvlc.h> #include "access.h" #include "stream.h" #include "input_internal.h" // #define STREAM_DEBUG 1 /* TODO: * - tune the 2 methods (block/stream) * - compute cost for seek * - improve stream mode seeking with closest segments * - ... */ /* Two methods: * - using pf_block * One linked list of data read * - using pf_read * More complex scheme using mutliple track to avoid seeking * - using directly the access (only indirection for peeking). * This method is known to introduce much less latency. * It should probably defaulted (instead of the stream method (2)). */ /* How many tracks we have, currently only used for stream mode */ #ifdef OPTIMIZE_MEMORY # define STREAM_CACHE_TRACK 1 /* Max size of our cache 128Ko per track */ # define STREAM_CACHE_SIZE (STREAM_CACHE_TRACK*1024*128) #else # define STREAM_CACHE_TRACK 3 /* Max size of our cache 4Mo per track */ # define STREAM_CACHE_SIZE (4*STREAM_CACHE_TRACK*1024*1024) #endif /* How many data we try to prebuffer * XXX it should be small to avoid useless latency but big enough for * efficient demux probing */ #define STREAM_CACHE_PREBUFFER_SIZE (128) /* Method1: Simple, for pf_block. * We get blocks and put them in the linked list. * We release blocks once the total size is bigger than CACHE_BLOCK_SIZE */ /* Method2: A bit more complex, for pf_read * - We use ring buffers, only one if unseekable, all if seekable * - Upon seek date current ring, then search if one ring match the pos, * yes: switch to it, seek the access to match the end of the ring * no: search the ring with i_end the closer to i_pos, * if close enough, read data and use this ring * else use the oldest ring, seek and use it. * * TODO: - with access non seekable: use all space available for only one ring, but * we have to support seekable/non-seekable switch on the fly. * - compute a good value for i_read_size * - ? */ #define STREAM_READ_ATONCE 1024 #define STREAM_CACHE_TRACK_SIZE (STREAM_CACHE_SIZE/STREAM_CACHE_TRACK) typedef struct { int64_t i_date; uint64_t i_start; uint64_t i_end; uint8_t *p_buffer; } stream_track_t; typedef struct { char *psz_path; uint64_t i_size; } access_entry_t; typedef enum { STREAM_METHOD_BLOCK, STREAM_METHOD_STREAM } stream_read_method_t; struct stream_sys_t { access_t *p_access; stream_read_method_t method; /* method to use */ uint64_t i_pos; /* Current reading offset */ /* Method 1: pf_block */ struct { uint64_t i_start; /* Offset of block for p_first */ uint64_t i_offset; /* Offset for data in p_current */ block_t *p_current; /* Current block */ uint64_t i_size; /* Total amount of data in the list */ block_t *p_first; block_t **pp_last; } block; /* Method 2: for pf_read */ struct { unsigned i_offset; /* Buffer offset in the current track */ int i_tk; /* Current track */ stream_track_t tk[STREAM_CACHE_TRACK]; /* Global buffer */ uint8_t *p_buffer; /* */ unsigned i_used; /* Used since last read */ unsigned i_read_size; } stream; /* Peek temporary buffer */ unsigned int i_peek; uint8_t *p_peek; /* Stat for both method */ struct { bool b_fastseek; /* From access */ /* Stat about reading data */ uint64_t i_read_count; uint64_t i_bytes; uint64_t i_read_time; /* Stat about seek */ unsigned i_seek_count; uint64_t i_seek_time; } stat; /* Streams list */ int i_list; access_entry_t **list; int i_list_index; access_t *p_list_access; }; /* Method 1: */ static int AStreamReadBlock( stream_t *s, void *p_read, unsigned int i_read ); static int AStreamPeekBlock( stream_t *s, const uint8_t **p_peek, unsigned int i_read ); static int AStreamSeekBlock( stream_t *s, uint64_t i_pos ); static void AStreamPrebufferBlock( stream_t *s ); static block_t *AReadBlock( stream_t *s, bool *pb_eof ); /* Method 2 */ static int AStreamReadStream( stream_t *s, void *p_read, unsigned int i_read ); static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, unsigned int i_read ); static int AStreamSeekStream( stream_t *s, uint64_t i_pos ); static void AStreamPrebufferStream( stream_t *s ); static int AReadStream( stream_t *s, void *p_read, unsigned int i_read ); /* Common */ static int AStreamControl( stream_t *s, int i_query, va_list ); static void AStreamDestroy( stream_t *s ); static void UStreamDestroy( stream_t *s ); static int ASeek( stream_t *s, uint64_t i_pos ); /**************************************************************************** * stream_CommonNew: create an empty stream structure ****************************************************************************/ stream_t *stream_CommonNew( vlc_object_t *p_obj ) { stream_t *s = (stream_t *)vlc_custom_create( p_obj, sizeof(*s), "stream" ); if( !s ) return NULL; s->p_text = malloc( sizeof(*s->p_text) ); if( !s->p_text ) { vlc_object_release( s ); return NULL; } /* UTF16 and UTF32 text file conversion */ s->p_text->conv = (vlc_iconv_t)(-1); s->p_text->i_char_width = 1; s->p_text->b_little_endian = false; return s; } void stream_CommonDelete( stream_t *s ) { if( s->p_text ) { if( s->p_text->conv != (vlc_iconv_t)(-1) ) vlc_iconv_close( s->p_text->conv ); free( s->p_text ); } free( s->psz_access ); free( s->psz_path ); vlc_object_release( s ); } #undef stream_UrlNew /**************************************************************************** * stream_UrlNew: create a stream from a access ****************************************************************************/ stream_t *stream_UrlNew( vlc_object_t *p_parent, const char *psz_url ) { const char *psz_access, *psz_demux, *psz_path, *psz_anchor; access_t *p_access; stream_t *p_res; if( !psz_url ) return NULL; char psz_dup[strlen( psz_url ) + 1]; strcpy( psz_dup, psz_url ); input_SplitMRL( &psz_access, &psz_demux, &psz_path, &psz_anchor, psz_dup ); /* Now try a real access */ p_access = access_New( p_parent, NULL, psz_access, psz_demux, psz_path ); if( p_access == NULL ) { msg_Err( p_parent, "no suitable access module for `%s'", psz_url ); return NULL; } if( !( p_res = stream_AccessNew( p_access, NULL ) ) ) { access_Delete( p_access ); return NULL; } p_res->pf_destroy = UStreamDestroy; return p_res; } stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list ) { stream_t *s = stream_CommonNew( VLC_OBJECT(p_access) ); stream_sys_t *p_sys; if( !s ) return NULL; s->p_input = p_access->p_input; s->psz_access = strdup( p_access->psz_access ); s->psz_path = strdup( p_access->psz_location ); s->p_sys = p_sys = malloc( sizeof( *p_sys ) ); if( !s->psz_access || !s->psz_path || !s->p_sys ) { stream_CommonDelete( s ); return NULL; } s->pf_read = NULL; /* Set up later */ s->pf_peek = NULL; s->pf_control = AStreamControl; s->pf_destroy = AStreamDestroy; /* Common field */ p_sys->p_access = p_access; if( p_access->pf_block ) p_sys->method = STREAM_METHOD_BLOCK; else p_sys->method = STREAM_METHOD_STREAM; p_sys->i_pos = p_access->info.i_pos; /* Stats */ access_Control( p_access, ACCESS_CAN_FASTSEEK, &p_sys->stat.b_fastseek ); p_sys->stat.i_bytes = 0; p_sys->stat.i_read_time = 0; p_sys->stat.i_read_count = 0; p_sys->stat.i_seek_count = 0; p_sys->stat.i_seek_time = 0; TAB_INIT( p_sys->i_list, p_sys->list ); p_sys->i_list_index = 0; p_sys->p_list_access = NULL; /* Get the additional list of inputs if any (for concatenation) */ if( ppsz_list && ppsz_list[0] ) { access_entry_t *p_entry = malloc( sizeof(*p_entry) ); if( !p_entry ) goto error; p_entry->i_size = p_access->info.i_size; p_entry->psz_path = strdup( p_access->psz_location ); if( !p_entry->psz_path ) { free( p_entry ); goto error; } p_sys->p_list_access = p_access; TAB_APPEND( p_sys->i_list, p_sys->list, p_entry ); msg_Dbg( p_access, "adding file `%s', (%"PRId64" bytes)", p_entry->psz_path, p_access->info.i_size ); for( int i = 0; ppsz_list[i] != NULL; i++ ) { char *psz_name = strdup( ppsz_list[i] ); if( !psz_name ) break; access_t *p_tmp = access_New( p_access, p_access->p_input, p_access->psz_access, "", psz_name ); if( !p_tmp ) continue; msg_Dbg( p_access, "adding file `%s', (%"PRId64" bytes)", psz_name, p_tmp->info.i_size ); p_entry = malloc( sizeof(*p_entry) ); if( p_entry ) { p_entry->i_size = p_tmp->info.i_size; p_entry->psz_path = psz_name; TAB_APPEND( p_sys->i_list, p_sys->list, p_entry ); } access_Delete( p_tmp ); } } /* Peek */ p_sys->i_peek = 0; p_sys->p_peek = NULL; if( p_sys->method == STREAM_METHOD_BLOCK ) { msg_Dbg( s, "Using block method for AStream*" ); s->pf_read = AStreamReadBlock; s->pf_peek = AStreamPeekBlock; /* Init all fields of p_sys->block */ p_sys->block.i_start = p_sys->i_pos; p_sys->block.i_offset = 0; p_sys->block.p_current = NULL; p_sys->block.i_size = 0; p_sys->block.p_first = NULL; p_sys->block.pp_last = &p_sys->block.p_first; /* Do the prebuffering */ AStreamPrebufferBlock( s ); if( p_sys->block.i_size <= 0 ) { msg_Err( s, "cannot pre fill buffer" ); goto error; } } else { int i; assert( p_sys->method == STREAM_METHOD_STREAM ); msg_Dbg( s, "Using stream method for AStream*" ); s->pf_read = AStreamReadStream; s->pf_peek = AStreamPeekStream; /* Allocate/Setup our tracks */ p_sys->stream.i_offset = 0; p_sys->stream.i_tk = 0; p_sys->stream.p_buffer = malloc( STREAM_CACHE_SIZE ); if( p_sys->stream.p_buffer == NULL ) goto error; p_sys->stream.i_used = 0; p_sys->stream.i_read_size = STREAM_READ_ATONCE; #if STREAM_READ_ATONCE < 256 # error "Invalid STREAM_READ_ATONCE value" #endif for( i = 0; i < STREAM_CACHE_TRACK; i++ ) { p_sys->stream.tk[i].i_date = 0; p_sys->stream.tk[i].i_start = p_sys->i_pos; p_sys->stream.tk[i].i_end = p_sys->i_pos; p_sys->stream.tk[i].p_buffer= &p_sys->stream.p_buffer[i * STREAM_CACHE_TRACK_SIZE]; } /* Do the prebuffering */ AStreamPrebufferStream( s ); if( p_sys->stream.tk[p_sys->stream.i_tk].i_end <= 0 ) { msg_Err( s, "cannot pre fill buffer" ); goto error; } } return s; error: if( p_sys->method == STREAM_METHOD_BLOCK ) { /* Nothing yet */ } else { free( p_sys->stream.p_buffer ); } while( p_sys->i_list > 0 ) free( p_sys->list[--(p_sys->i_list)] ); free( p_sys->list ); free( s->p_sys ); stream_CommonDelete( s ); return NULL; } /**************************************************************************** * AStreamDestroy: ****************************************************************************/ static void AStreamDestroy( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; if( p_sys->method == STREAM_METHOD_BLOCK ) block_ChainRelease( p_sys->block.p_first ); else free( p_sys->stream.p_buffer ); free( p_sys->p_peek ); if( p_sys->p_list_access && p_sys->p_list_access != p_sys->p_access ) access_Delete( p_sys->p_list_access ); while( p_sys->i_list-- ) { free( p_sys->list[p_sys->i_list]->psz_path ); free( p_sys->list[p_sys->i_list] ); } free( p_sys->list ); free( p_sys ); stream_CommonDelete( s ); } static void UStreamDestroy( stream_t *s ) { access_t *p_access = (access_t *)s->p_parent; AStreamDestroy( s ); access_Delete( p_access ); } /**************************************************************************** * AStreamControlReset: ****************************************************************************/ static void AStreamControlReset( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; p_sys->i_pos = p_sys->p_access->info.i_pos; if( p_sys->method == STREAM_METHOD_BLOCK ) { block_ChainRelease( p_sys->block.p_first ); /* Init all fields of p_sys->block */ p_sys->block.i_start = p_sys->i_pos; p_sys->block.i_offset = 0; p_sys->block.p_current = NULL; p_sys->block.i_size = 0; p_sys->block.p_first = NULL; p_sys->block.pp_last = &p_sys->block.p_first; /* Do the prebuffering */ AStreamPrebufferBlock( s ); } else { int i; assert( p_sys->method == STREAM_METHOD_STREAM ); /* Setup our tracks */ p_sys->stream.i_offset = 0; p_sys->stream.i_tk = 0; p_sys->stream.i_used = 0; for( i = 0; i < STREAM_CACHE_TRACK; i++ ) { p_sys->stream.tk[i].i_date = 0; p_sys->stream.tk[i].i_start = p_sys->i_pos; p_sys->stream.tk[i].i_end = p_sys->i_pos; } /* Do the prebuffering */ AStreamPrebufferStream( s ); } } /**************************************************************************** * AStreamControlUpdate: ****************************************************************************/ static void AStreamControlUpdate( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; p_sys->i_pos = p_sys->p_access->info.i_pos; if( p_sys->i_list ) { int i; for( i = 0; i < p_sys->i_list_index; i++ ) { p_sys->i_pos += p_sys->list[i]->i_size; } } } /**************************************************************************** * AStreamControl: ****************************************************************************/ static int AStreamControl( stream_t *s, int i_query, va_list args ) { stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; bool *p_bool; uint64_t *pi_64, i_64; int i_int; switch( i_query ) { case STREAM_GET_SIZE: pi_64 = va_arg( args, uint64_t * ); if( s->p_sys->i_list ) { int i; *pi_64 = 0; for( i = 0; i < s->p_sys->i_list; i++ ) *pi_64 += s->p_sys->list[i]->i_size; break; } *pi_64 = p_access->info.i_size; break; case STREAM_CAN_SEEK: p_bool = (bool*)va_arg( args, bool * ); access_Control( p_access, ACCESS_CAN_SEEK, p_bool ); break; case STREAM_CAN_FASTSEEK: p_bool = (bool*)va_arg( args, bool * ); access_Control( p_access, ACCESS_CAN_FASTSEEK, p_bool ); break; case STREAM_GET_POSITION: pi_64 = va_arg( args, uint64_t * ); *pi_64 = p_sys->i_pos; break; case STREAM_SET_POSITION: i_64 = va_arg( args, uint64_t ); switch( p_sys->method ) { case STREAM_METHOD_BLOCK: return AStreamSeekBlock( s, i_64 ); case STREAM_METHOD_STREAM: return AStreamSeekStream( s, i_64 ); default: assert(0); return VLC_EGENERIC; } case STREAM_CONTROL_ACCESS: { i_int = (int) va_arg( args, int ); if( i_int != ACCESS_SET_PRIVATE_ID_STATE && i_int != ACCESS_SET_PRIVATE_ID_CA && i_int != ACCESS_GET_PRIVATE_ID_STATE && i_int != ACCESS_SET_TITLE && i_int != ACCESS_SET_SEEKPOINT ) { msg_Err( s, "Hey, what are you thinking ?" "DON'T USE STREAM_CONTROL_ACCESS !!!" ); return VLC_EGENERIC; } int i_ret = access_vaControl( p_access, i_int, args ); if( i_int == ACCESS_SET_TITLE || i_int == ACCESS_SET_SEEKPOINT ) AStreamControlReset( s ); return i_ret; } case STREAM_UPDATE_SIZE: AStreamControlUpdate( s ); return VLC_SUCCESS; case STREAM_GET_CONTENT_TYPE: return access_Control( p_access, ACCESS_GET_CONTENT_TYPE, va_arg( args, char ** ) ); case STREAM_SET_RECORD_STATE: default: msg_Err( s, "invalid stream_vaControl query=0x%x", i_query ); return VLC_EGENERIC; } return VLC_SUCCESS; } /**************************************************************************** * Method 1: ****************************************************************************/ static void AStreamPrebufferBlock( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; int64_t i_first = 0; int64_t i_start; msg_Dbg( s, "starting pre-buffering" ); i_start = mdate(); for( ;; ) { const int64_t i_date = mdate(); bool b_eof; block_t *b; if( !vlc_object_alive(s) || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE ) { int64_t i_byterate; /* Update stat */ p_sys->stat.i_bytes = p_sys->block.i_size; p_sys->stat.i_read_time = i_date - i_start; i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) / (p_sys->stat.i_read_time + 1); msg_Dbg( s, "prebuffering done %"PRId64" bytes in %"PRId64"s - " "%"PRId64" KiB/s", p_sys->stat.i_bytes, p_sys->stat.i_read_time / INT64_C(1000000), i_byterate / 1024 ); break; } /* Fetch a block */ if( ( b = AReadBlock( s, &b_eof ) ) == NULL ) { if( b_eof ) break; continue; } while( b ) { /* Append the block */ p_sys->block.i_size += b->i_buffer; *p_sys->block.pp_last = b; p_sys->block.pp_last = &b->p_next; p_sys->stat.i_read_count++; b = b->p_next; } if( i_first == 0 ) { i_first = mdate(); msg_Dbg( s, "received first data after %d ms", (int)((i_first-i_start)/1000) ); } } p_sys->block.p_current = p_sys->block.p_first; } static int AStreamRefillBlock( stream_t *s ); static int AStreamReadBlock( stream_t *s, void *p_read, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; uint8_t *p_data = p_read; unsigned int i_data = 0; /* It means EOF */ if( p_sys->block.p_current == NULL ) return 0; if( p_data == NULL ) { /* seek within this stream if possible, else use plain old read and discard */ stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; bool b_aseek; access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek ); if( b_aseek ) return AStreamSeekBlock( s, p_sys->i_pos + i_read ) ? 0 : i_read; } while( i_data < i_read ) { int i_current = p_sys->block.p_current->i_buffer - p_sys->block.i_offset; unsigned int i_copy = VLC_CLIP( (unsigned int)i_current, 0, i_read - i_data); /* Copy data */ if( p_data ) { memcpy( p_data, &p_sys->block.p_current->p_buffer[p_sys->block.i_offset], i_copy ); p_data += i_copy; } i_data += i_copy; p_sys->block.i_offset += i_copy; if( p_sys->block.i_offset >= p_sys->block.p_current->i_buffer ) { /* Current block is now empty, switch to next */ if( p_sys->block.p_current ) { p_sys->block.i_offset = 0; p_sys->block.p_current = p_sys->block.p_current->p_next; } /*Get a new block if needed */ if( !p_sys->block.p_current && AStreamRefillBlock( s ) ) { break; } } } p_sys->i_pos += i_data; return i_data; } static int AStreamPeekBlock( stream_t *s, const uint8_t **pp_peek, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; uint8_t *p_data; unsigned int i_data = 0; block_t *b; unsigned int i_offset; if( p_sys->block.p_current == NULL ) return 0; /* EOF */ /* We can directly give a pointer over our buffer */ if( i_read <= p_sys->block.p_current->i_buffer - p_sys->block.i_offset ) { *pp_peek = &p_sys->block.p_current->p_buffer[p_sys->block.i_offset]; return i_read; } /* We need to create a local copy */ if( p_sys->i_peek < i_read ) { p_sys->p_peek = realloc_or_free( p_sys->p_peek, i_read ); if( !p_sys->p_peek ) { p_sys->i_peek = 0; return 0; } p_sys->i_peek = i_read; } /* Fill enough data */ while( p_sys->block.i_size - (p_sys->i_pos - p_sys->block.i_start) < i_read ) { block_t **pp_last = p_sys->block.pp_last; if( AStreamRefillBlock( s ) ) break; /* Our buffer are probably filled enough, don't try anymore */ if( pp_last == p_sys->block.pp_last ) break; } /* Copy what we have */ b = p_sys->block.p_current; i_offset = p_sys->block.i_offset; p_data = p_sys->p_peek; while( b && i_data < i_read ) { unsigned int i_current = __MAX(b->i_buffer - i_offset,0); int i_copy = __MIN( i_current, i_read - i_data ); memcpy( p_data, &b->p_buffer[i_offset], i_copy ); i_data += i_copy; p_data += i_copy; i_offset += i_copy; if( i_offset >= b->i_buffer ) { i_offset = 0; b = b->p_next; } } *pp_peek = p_sys->p_peek; return i_data; } static int AStreamSeekBlock( stream_t *s, uint64_t i_pos ) { stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; int64_t i_offset = i_pos - p_sys->block.i_start; bool b_seek; /* We already have thoses data, just update p_current/i_offset */ if( i_offset >= 0 && (uint64_t)i_offset < p_sys->block.i_size ) { block_t *b = p_sys->block.p_first; int i_current = 0; while( i_current + b->i_buffer < (uint64_t)i_offset ) { i_current += b->i_buffer; b = b->p_next; } p_sys->block.p_current = b; p_sys->block.i_offset = i_offset - i_current; p_sys->i_pos = i_pos; return VLC_SUCCESS; } /* We may need to seek or to read data */ if( i_offset < 0 ) { bool b_aseek; access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek ); if( !b_aseek ) { msg_Err( s, "backward seeking impossible (access not seekable)" ); return VLC_EGENERIC; } b_seek = true; } else { bool b_aseek, b_aseekfast; access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek ); access_Control( p_access, ACCESS_CAN_FASTSEEK, &b_aseekfast ); if( !b_aseek ) { b_seek = false; msg_Warn( s, "%"PRId64" bytes need to be skipped " "(access non seekable)", i_offset - p_sys->block.i_size ); } else { int64_t i_skip = i_offset - p_sys->block.i_size; /* Avg bytes per packets */ int i_avg = p_sys->stat.i_bytes / p_sys->stat.i_read_count; /* TODO compute a seek cost instead of fixed threshold */ int i_th = b_aseekfast ? 1 : 5; if( i_skip <= i_th * i_avg && i_skip < STREAM_CACHE_SIZE ) b_seek = false; else b_seek = true; msg_Dbg( s, "b_seek=%d th*avg=%d skip=%"PRId64, b_seek, i_th*i_avg, i_skip ); } } if( b_seek ) { int64_t i_start, i_end; /* Do the access seek */ i_start = mdate(); if( ASeek( s, i_pos ) ) return VLC_EGENERIC; i_end = mdate(); /* Release data */ block_ChainRelease( p_sys->block.p_first ); /* Reinit */ p_sys->block.i_start = p_sys->i_pos = i_pos; p_sys->block.i_offset = 0; p_sys->block.p_current = NULL; p_sys->block.i_size = 0; p_sys->block.p_first = NULL; p_sys->block.pp_last = &p_sys->block.p_first; /* Refill a block */ if( AStreamRefillBlock( s ) ) return VLC_EGENERIC; /* Update stat */ p_sys->stat.i_seek_time += i_end - i_start; p_sys->stat.i_seek_count++; return VLC_SUCCESS; } else { do { while( p_sys->block.p_current && p_sys->i_pos + p_sys->block.p_current->i_buffer - p_sys->block.i_offset <= i_pos ) { p_sys->i_pos += p_sys->block.p_current->i_buffer - p_sys->block.i_offset; p_sys->block.p_current = p_sys->block.p_current->p_next; p_sys->block.i_offset = 0; } if( !p_sys->block.p_current && AStreamRefillBlock( s ) ) { if( p_sys->i_pos != i_pos ) return VLC_EGENERIC; } } while( p_sys->block.i_start + p_sys->block.i_size < i_pos ); p_sys->block.i_offset += i_pos - p_sys->i_pos; p_sys->i_pos = i_pos; return VLC_SUCCESS; } return VLC_EGENERIC; } static int AStreamRefillBlock( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; block_t *b; /* Release data */ while( p_sys->block.i_size >= STREAM_CACHE_SIZE && p_sys->block.p_first != p_sys->block.p_current ) { block_t *b = p_sys->block.p_first; p_sys->block.i_start += b->i_buffer; p_sys->block.i_size -= b->i_buffer; p_sys->block.p_first = b->p_next; block_Release( b ); } if( p_sys->block.i_size >= STREAM_CACHE_SIZE && p_sys->block.p_current == p_sys->block.p_first && p_sys->block.p_current->p_next ) /* At least 2 packets */ { /* Enough data, don't read more */ return VLC_SUCCESS; } /* Now read a new block */ const int64_t i_start = mdate(); for( ;; ) { bool b_eof; if( !vlc_object_alive(s) ) return VLC_EGENERIC; /* Fetch a block */ if( ( b = AReadBlock( s, &b_eof ) ) ) break; if( b_eof ) return VLC_EGENERIC; } p_sys->stat.i_read_time += mdate() - i_start; while( b ) { /* Append the block */ p_sys->block.i_size += b->i_buffer; *p_sys->block.pp_last = b; p_sys->block.pp_last = &b->p_next; /* Fix p_current */ if( p_sys->block.p_current == NULL ) p_sys->block.p_current = b; /* Update stat */ p_sys->stat.i_bytes += b->i_buffer; p_sys->stat.i_read_count++; b = b->p_next; } return VLC_SUCCESS; } /**************************************************************************** * Method 2: ****************************************************************************/ static int AStreamRefillStream( stream_t *s ); static int AStreamReadNoSeekStream( stream_t *s, void *p_read, unsigned int i_read ); static int AStreamReadStream( stream_t *s, void *p_read, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; if( !p_read ) { const uint64_t i_pos_wanted = p_sys->i_pos + i_read; if( AStreamSeekStream( s, i_pos_wanted ) ) { if( p_sys->i_pos != i_pos_wanted ) return 0; } return i_read; } return AStreamReadNoSeekStream( s, p_read, i_read ); } static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; stream_track_t *tk = &p_sys->stream.tk[p_sys->stream.i_tk]; uint64_t i_off; if( tk->i_start >= tk->i_end ) return 0; /* EOF */ #ifdef STREAM_DEBUG msg_Dbg( s, "AStreamPeekStream: %d pos=%"PRId64" tk=%d " "start=%"PRId64" offset=%d end=%"PRId64, i_read, p_sys->i_pos, p_sys->stream.i_tk, tk->i_start, p_sys->stream.i_offset, tk->i_end ); #endif /* Avoid problem, but that should *never* happen */ if( i_read > STREAM_CACHE_TRACK_SIZE / 2 ) i_read = STREAM_CACHE_TRACK_SIZE / 2; while( tk->i_end < tk->i_start + p_sys->stream.i_offset + i_read ) { if( p_sys->stream.i_used <= 1 ) { /* Be sure we will read something */ p_sys->stream.i_used += tk->i_start + p_sys->stream.i_offset + i_read - tk->i_end; } if( AStreamRefillStream( s ) ) break; } if( tk->i_end < tk->i_start + p_sys->stream.i_offset + i_read ) { i_read = tk->i_end - tk->i_start - p_sys->stream.i_offset; } /* Now, direct pointer or a copy ? */ i_off = (tk->i_start + p_sys->stream.i_offset) % STREAM_CACHE_TRACK_SIZE; if( i_off + i_read <= STREAM_CACHE_TRACK_SIZE ) { *pp_peek = &tk->p_buffer[i_off]; return i_read; } if( p_sys->i_peek < i_read ) { p_sys->p_peek = realloc_or_free( p_sys->p_peek, i_read ); if( !p_sys->p_peek ) { p_sys->i_peek = 0; return 0; } p_sys->i_peek = i_read; } memcpy( p_sys->p_peek, &tk->p_buffer[i_off], STREAM_CACHE_TRACK_SIZE - i_off ); memcpy( &p_sys->p_peek[STREAM_CACHE_TRACK_SIZE - i_off], &tk->p_buffer[0], i_read - (STREAM_CACHE_TRACK_SIZE - i_off) ); *pp_peek = p_sys->p_peek; return i_read; } static int AStreamSeekStream( stream_t *s, uint64_t i_pos ) { stream_sys_t *p_sys = s->p_sys; stream_track_t *p_current = &p_sys->stream.tk[p_sys->stream.i_tk]; access_t *p_access = p_sys->p_access; if( p_current->i_start >= p_current->i_end && i_pos >= p_current->i_end ) return 0; /* EOF */ #ifdef STREAM_DEBUG msg_Dbg( s, "AStreamSeekStream: to %"PRId64" pos=%"PRId64 " tk=%d start=%"PRId64" offset=%d end=%"PRId64, i_pos, p_sys->i_pos, p_sys->stream.i_tk, p_current->i_start, p_sys->stream.i_offset, p_current->i_end ); #endif bool b_aseek; access_Control( p_access, ACCESS_CAN_SEEK, &b_aseek ); if( !b_aseek && i_pos < p_current->i_start ) { msg_Warn( s, "AStreamSeekStream: can't seek" ); return VLC_EGENERIC; } bool b_afastseek; access_Control( p_access, ACCESS_CAN_FASTSEEK, &b_afastseek ); /* FIXME compute seek cost (instead of static 'stupid' value) */ uint64_t i_skip_threshold; if( b_aseek ) i_skip_threshold = b_afastseek ? 128 : 3*p_sys->stream.i_read_size; else i_skip_threshold = INT64_MAX; /* Date the current track */ p_current->i_date = mdate(); /* Search a new track slot */ stream_track_t *tk = NULL; int i_tk_idx = -1; /* Prefer the current track */ if( p_current->i_start <= i_pos && i_pos <= p_current->i_end + i_skip_threshold ) { tk = p_current; i_tk_idx = p_sys->stream.i_tk; } if( !tk ) { /* Try to maximize already read data */ for( int i = 0; i < STREAM_CACHE_TRACK; i++ ) { stream_track_t *t = &p_sys->stream.tk[i]; if( t->i_start > i_pos || i_pos > t->i_end ) continue; if( !tk || tk->i_end < t->i_end ) { tk = t; i_tk_idx = i; } } } if( !tk ) { /* Use the oldest unused */ for( int i = 0; i < STREAM_CACHE_TRACK; i++ ) { stream_track_t *t = &p_sys->stream.tk[i]; if( !tk || tk->i_date > t->i_date ) { tk = t; i_tk_idx = i; } } } assert( i_tk_idx >= 0 && i_tk_idx < STREAM_CACHE_TRACK ); if( tk != p_current ) i_skip_threshold = 0; if( tk->i_start <= i_pos && i_pos <= tk->i_end + i_skip_threshold ) { #ifdef STREAM_DEBUG msg_Err( s, "AStreamSeekStream: reusing %d start=%"PRId64 " end=%"PRId64"(%s)", i_tk_idx, tk->i_start, tk->i_end, tk != p_current ? "seek" : i_pos > tk->i_end ? "skip" : "noseek" ); #endif if( tk != p_current ) { assert( b_aseek ); /* Seek at the end of the buffer * TODO it is stupid to seek now, it would be better to delay it */ if( ASeek( s, tk->i_end ) ) return VLC_EGENERIC; } else if( i_pos > tk->i_end ) { uint64_t i_skip = i_pos - tk->i_end; while( i_skip > 0 ) { const int i_read_max = __MIN( 10 * STREAM_READ_ATONCE, i_skip ); if( AStreamReadNoSeekStream( s, NULL, i_read_max ) != i_read_max ) return VLC_EGENERIC; i_skip -= i_read_max; } } } else { #ifdef STREAM_DEBUG msg_Err( s, "AStreamSeekStream: hard seek" ); #endif /* Nothing good, seek and choose oldest segment */ if( ASeek( s, i_pos ) ) return VLC_EGENERIC; tk->i_start = i_pos; tk->i_end = i_pos; } p_sys->stream.i_offset = i_pos - tk->i_start; p_sys->stream.i_tk = i_tk_idx; p_sys->i_pos = i_pos; /* If there is not enough data left in the track, refill */ /* TODO How to get a correct value for * - refilling threshold * - how much to refill */ if( tk->i_end < tk->i_start + p_sys->stream.i_offset + p_sys->stream.i_read_size ) { if( p_sys->stream.i_used < STREAM_READ_ATONCE / 2 ) p_sys->stream.i_used = STREAM_READ_ATONCE / 2; if( AStreamRefillStream( s ) && i_pos == tk->i_end ) return VLC_EGENERIC; } return VLC_SUCCESS; } static int AStreamReadNoSeekStream( stream_t *s, void *p_read, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; stream_track_t *tk = &p_sys->stream.tk[p_sys->stream.i_tk]; uint8_t *p_data = (uint8_t *)p_read; unsigned int i_data = 0; if( tk->i_start >= tk->i_end ) return 0; /* EOF */ #ifdef STREAM_DEBUG msg_Dbg( s, "AStreamReadStream: %d pos=%"PRId64" tk=%d start=%"PRId64 " offset=%d end=%"PRId64, i_read, p_sys->i_pos, p_sys->stream.i_tk, tk->i_start, p_sys->stream.i_offset, tk->i_end ); #endif while( i_data < i_read ) { unsigned i_off = (tk->i_start + p_sys->stream.i_offset) % STREAM_CACHE_TRACK_SIZE; unsigned int i_current = __MIN( tk->i_end - tk->i_start - p_sys->stream.i_offset, STREAM_CACHE_TRACK_SIZE - i_off ); int i_copy = __MIN( i_current, i_read - i_data ); if( i_copy <= 0 ) break; /* EOF */ /* Copy data */ /* msg_Dbg( s, "AStreamReadStream: copy %d", i_copy ); */ if( p_data ) { memcpy( p_data, &tk->p_buffer[i_off], i_copy ); p_data += i_copy; } i_data += i_copy; p_sys->stream.i_offset += i_copy; /* Update pos now */ p_sys->i_pos += i_copy; /* */ p_sys->stream.i_used += i_copy; if( tk->i_end + i_data <= tk->i_start + p_sys->stream.i_offset + i_read ) { const unsigned i_read_requested = VLC_CLIP( i_read - i_data, STREAM_READ_ATONCE / 2, STREAM_READ_ATONCE * 10 ); if( p_sys->stream.i_used < i_read_requested ) p_sys->stream.i_used = i_read_requested; if( AStreamRefillStream( s ) ) { /* EOF */ if( tk->i_start >= tk->i_end ) break; } } } return i_data; } static int AStreamRefillStream( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; stream_track_t *tk = &p_sys->stream.tk[p_sys->stream.i_tk]; /* We read but won't increase i_start after initial start + offset */ int i_toread = __MIN( p_sys->stream.i_used, STREAM_CACHE_TRACK_SIZE - (tk->i_end - tk->i_start - p_sys->stream.i_offset) ); bool b_read = false; int64_t i_start, i_stop; if( i_toread <= 0 ) return VLC_EGENERIC; /* EOF */ #ifdef STREAM_DEBUG msg_Dbg( s, "AStreamRefillStream: used=%d toread=%d", p_sys->stream.i_used, i_toread ); #endif i_start = mdate(); while( i_toread > 0 ) { int i_off = tk->i_end % STREAM_CACHE_TRACK_SIZE; int i_read; if( !vlc_object_alive(s) ) return VLC_EGENERIC; i_read = __MIN( i_toread, STREAM_CACHE_TRACK_SIZE - i_off ); i_read = AReadStream( s, &tk->p_buffer[i_off], i_read ); /* msg_Dbg( s, "AStreamRefillStream: read=%d", i_read ); */ if( i_read < 0 ) { continue; } else if( i_read == 0 ) { if( !b_read ) return VLC_EGENERIC; return VLC_SUCCESS; } b_read = true; /* Update end */ tk->i_end += i_read; /* Windows of STREAM_CACHE_TRACK_SIZE */ if( tk->i_start + STREAM_CACHE_TRACK_SIZE < tk->i_end ) { unsigned i_invalid = tk->i_end - tk->i_start - STREAM_CACHE_TRACK_SIZE; tk->i_start += i_invalid; p_sys->stream.i_offset -= i_invalid; } i_toread -= i_read; p_sys->stream.i_used -= i_read; p_sys->stat.i_bytes += i_read; p_sys->stat.i_read_count++; } i_stop = mdate(); p_sys->stat.i_read_time += i_stop - i_start; return VLC_SUCCESS; } static void AStreamPrebufferStream( stream_t *s ) { stream_sys_t *p_sys = s->p_sys; int64_t i_first = 0; int64_t i_start; msg_Dbg( s, "starting pre-buffering" ); i_start = mdate(); for( ;; ) { stream_track_t *tk = &p_sys->stream.tk[p_sys->stream.i_tk]; int64_t i_date = mdate(); int i_read; int i_buffered = tk->i_end - tk->i_start; if( !vlc_object_alive(s) || i_buffered >= STREAM_CACHE_PREBUFFER_SIZE ) { int64_t i_byterate; /* Update stat */ p_sys->stat.i_bytes = i_buffered; p_sys->stat.i_read_time = i_date - i_start; i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) / (p_sys->stat.i_read_time+1); msg_Dbg( s, "pre-buffering done %"PRId64" bytes in %"PRId64"s - " "%"PRId64" KiB/s", p_sys->stat.i_bytes, p_sys->stat.i_read_time / INT64_C(1000000), i_byterate / 1024 ); break; } /* */ i_read = STREAM_CACHE_TRACK_SIZE - i_buffered; i_read = __MIN( (int)p_sys->stream.i_read_size, i_read ); i_read = AReadStream( s, &tk->p_buffer[i_buffered], i_read ); if( i_read < 0 ) continue; else if( i_read == 0 ) break; /* EOF */ if( i_first == 0 ) { i_first = mdate(); msg_Dbg( s, "received first data after %d ms", (int)((i_first-i_start)/1000) ); } tk->i_end += i_read; p_sys->stat.i_read_count++; } } /**************************************************************************** * stream_ReadLine: ****************************************************************************/ /** * Read from the stream untill first newline. * \param s Stream handle to read from * \return A pointer to the allocated output string. You need to free this when you are done. */ #define STREAM_PROBE_LINE 2048 #define STREAM_LINE_MAX (2048*100) char *stream_ReadLine( stream_t *s ) { char *p_line = NULL; int i_line = 0, i_read = 0; while( i_read < STREAM_LINE_MAX ) { char *psz_eol; const uint8_t *p_data; int i_data; int64_t i_pos; /* Probe new data */ i_data = stream_Peek( s, &p_data, STREAM_PROBE_LINE ); if( i_data <= 0 ) break; /* No more data */ /* BOM detection */ i_pos = stream_Tell( s ); if( i_pos == 0 && i_data >= 2 ) { const char *psz_encoding = NULL; if( !memcmp( p_data, "\xFF\xFE", 2 ) ) { psz_encoding = "UTF-16LE"; s->p_text->b_little_endian = true; } else if( !memcmp( p_data, "\xFE\xFF", 2 ) ) { psz_encoding = "UTF-16BE"; } /* Open the converter if we need it */ if( psz_encoding != NULL ) { msg_Dbg( s, "UTF-16 BOM detected" ); s->p_text->i_char_width = 2; s->p_text->conv = vlc_iconv_open( "UTF-8", psz_encoding ); if( s->p_text->conv == (vlc_iconv_t)-1 ) msg_Err( s, "iconv_open failed" ); } } if( i_data % s->p_text->i_char_width ) { /* keep i_char_width boundary */ i_data = i_data - ( i_data % s->p_text->i_char_width ); msg_Warn( s, "the read is not i_char_width compatible"); } if( i_data == 0 ) break; /* Check if there is an EOL */ if( s->p_text->i_char_width == 1 ) { /* UTF-8: 0A <LF> */ psz_eol = memchr( p_data, '\n', i_data ); if( psz_eol == NULL ) /* UTF-8: 0D <CR> */ psz_eol = memchr( p_data, '\r', i_data ); } else { const uint8_t *p_last = p_data + i_data - s->p_text->i_char_width; uint16_t eol = s->p_text->b_little_endian ? 0x0A00 : 0x00A0; assert( s->p_text->i_char_width == 2 ); psz_eol = NULL; /* UTF-16: 000A <LF> */ for( const uint8_t *p = p_data; p <= p_last; p += 2 ) { if( U16_AT( p ) == eol ) { psz_eol = (char *)p + 1; break; } } if( psz_eol == NULL ) { /* UTF-16: 000D <CR> */ eol = s->p_text->b_little_endian ? 0x0D00 : 0x00D0; for( const uint8_t *p = p_data; p <= p_last; p += 2 ) { if( U16_AT( p ) == eol ) { psz_eol = (char *)p + 1; break; } } } } if( psz_eol ) { i_data = (psz_eol - (char *)p_data) + 1; p_line = realloc_or_free( p_line, i_line + i_data + s->p_text->i_char_width ); /* add \0 */ if( !p_line ) goto error; i_data = stream_Read( s, &p_line[i_line], i_data ); if( i_data <= 0 ) break; /* Hmmm */ i_line += i_data - s->p_text->i_char_width; /* skip \n */; i_read += i_data; /* We have our line */ break; } /* Read data (+1 for easy \0 append) */ p_line = realloc_or_free( p_line, i_line + STREAM_PROBE_LINE + s->p_text->i_char_width ); if( !p_line ) goto error; i_data = stream_Read( s, &p_line[i_line], STREAM_PROBE_LINE ); if( i_data <= 0 ) break; /* Hmmm */ i_line += i_data; i_read += i_data; } if( i_read > 0 ) { int j; for( j = 0; j < s->p_text->i_char_width; j++ ) { p_line[i_line + j] = '\0'; } i_line += s->p_text->i_char_width; /* the added \0 */ if( s->p_text->i_char_width > 1 ) { int i_new_line = 0; size_t i_in = 0, i_out = 0; const char * p_in = NULL; char * p_out = NULL; char * psz_new_line = NULL; /* iconv */ /* UTF-8 needs at most 150% of the buffer as many as UTF-16 */ i_new_line = i_line * 3 / 2; psz_new_line = malloc( i_new_line ); if( psz_new_line == NULL ) goto error; i_in = (size_t)i_line; i_out = (size_t)i_new_line; p_in = p_line; p_out = psz_new_line; if( vlc_iconv( s->p_text->conv, &p_in, &i_in, &p_out, &i_out ) == (size_t)-1 ) { msg_Err( s, "iconv failed" ); msg_Dbg( s, "original: %d, in %d, out %d", i_line, (int)i_in, (int)i_out ); } free( p_line ); p_line = psz_new_line; i_line = (size_t)i_new_line - i_out; /* does not include \0 */ } /* Remove trailing LF/CR */ while( i_line >= 2 && ( p_line[i_line-2] == '\r' || p_line[i_line-2] == '\n') ) i_line--; /* Make sure the \0 is there */ p_line[i_line-1] = '\0'; return p_line; } error: /* We failed to read any data, probably EOF */ free( p_line ); /* */ if( s->p_text->conv != (vlc_iconv_t)(-1) ) vlc_iconv_close( s->p_text->conv ); s->p_text->conv = (vlc_iconv_t)(-1); return NULL; } /**************************************************************************** * Access reading/seeking wrappers to handle concatenated streams. ****************************************************************************/ static int AReadStream( stream_t *s, void *p_read, unsigned int i_read ) { stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; input_thread_t *p_input = s->p_input; int i_read_orig = i_read; if( !p_sys->i_list ) { i_read = p_access->pf_read( p_access, p_read, i_read ); if( p_input ) { uint64_t total; vlc_mutex_lock( &p_input->p->counters.counters_lock ); stats_Update( p_input->p->counters.p_read_bytes, i_read, &total ); stats_Update( p_input->p->counters.p_input_bitrate, total, NULL ); stats_Update( p_input->p->counters.p_read_packets, 1, NULL ); vlc_mutex_unlock( &p_input->p->counters.counters_lock ); } return i_read; } i_read = p_sys->p_list_access->pf_read( p_sys->p_list_access, p_read, i_read ); /* If we reached an EOF then switch to the next stream in the list */ if( i_read == 0 && p_sys->i_list_index + 1 < p_sys->i_list ) { char *psz_name = p_sys->list[++p_sys->i_list_index]->psz_path; access_t *p_list_access; msg_Dbg( s, "opening input `%s'", psz_name ); p_list_access = access_New( s, s->p_input, p_access->psz_access, "", psz_name ); if( !p_list_access ) return 0; if( p_sys->p_list_access != p_access ) access_Delete( p_sys->p_list_access ); p_sys->p_list_access = p_list_access; /* We have to read some data */ return AReadStream( s, p_read, i_read_orig ); } /* Update read bytes in input */ if( p_input ) { uint64_t total; vlc_mutex_lock( &p_input->p->counters.counters_lock ); stats_Update( p_input->p->counters.p_read_bytes, i_read, &total ); stats_Update( p_input->p->counters.p_input_bitrate, total, NULL ); stats_Update( p_input->p->counters.p_read_packets, 1, NULL ); vlc_mutex_unlock( &p_input->p->counters.counters_lock ); } return i_read; } static block_t *AReadBlock( stream_t *s, bool *pb_eof ) { stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; input_thread_t *p_input = s->p_input; block_t *p_block; bool b_eof; if( !p_sys->i_list ) { p_block = p_access->pf_block( p_access ); if( pb_eof ) *pb_eof = p_access->info.b_eof; if( p_input && p_block && libvlc_stats (p_access) ) { uint64_t total; vlc_mutex_lock( &p_input->p->counters.counters_lock ); stats_Update( p_input->p->counters.p_read_bytes, p_block->i_buffer, &total ); stats_Update( p_input->p->counters.p_input_bitrate, total, NULL ); stats_Update( p_input->p->counters.p_read_packets, 1, NULL ); vlc_mutex_unlock( &p_input->p->counters.counters_lock ); } return p_block; } p_block = p_sys->p_list_access->pf_block( p_sys->p_list_access ); b_eof = p_sys->p_list_access->info.b_eof; if( pb_eof ) *pb_eof = b_eof; /* If we reached an EOF then switch to the next stream in the list */ if( !p_block && b_eof && p_sys->i_list_index + 1 < p_sys->i_list ) { char *psz_name = p_sys->list[++p_sys->i_list_index]->psz_path; access_t *p_list_access; msg_Dbg( s, "opening input `%s'", psz_name ); p_list_access = access_New( s, s->p_input, p_access->psz_access, "", psz_name ); if( !p_list_access ) return 0; if( p_sys->p_list_access != p_access ) access_Delete( p_sys->p_list_access ); p_sys->p_list_access = p_list_access; /* We have to read some data */ return AReadBlock( s, pb_eof ); } if( p_block ) { if( p_input ) { uint64_t total; vlc_mutex_lock( &p_input->p->counters.counters_lock ); stats_Update( p_input->p->counters.p_read_bytes, p_block->i_buffer, &total ); stats_Update( p_input->p->counters.p_input_bitrate, total, NULL ); stats_Update( p_input->p->counters.p_read_packets, 1 , NULL); vlc_mutex_unlock( &p_input->p->counters.counters_lock ); } } return p_block; } static int ASeek( stream_t *s, uint64_t i_pos ) { stream_sys_t *p_sys = s->p_sys; access_t *p_access = p_sys->p_access; /* Check which stream we need to access */ if( p_sys->i_list ) { int i; char *psz_name; int64_t i_size = 0; access_t *p_list_access = 0; for( i = 0; i < p_sys->i_list - 1; i++ ) { if( i_pos < p_sys->list[i]->i_size + i_size ) break; i_size += p_sys->list[i]->i_size; } psz_name = p_sys->list[i]->psz_path; if( i != p_sys->i_list_index ) msg_Dbg( s, "opening input `%s'", psz_name ); if( i != p_sys->i_list_index && i != 0 ) { p_list_access = access_New( s, s->p_input, p_access->psz_access, "", psz_name ); } else if( i != p_sys->i_list_index ) { p_list_access = p_access; } if( p_list_access ) { if( p_sys->p_list_access != p_access ) access_Delete( p_sys->p_list_access ); p_sys->p_list_access = p_list_access; } p_sys->i_list_index = i; return p_sys->p_list_access->pf_seek( p_sys->p_list_access, i_pos - i_size ); } return p_access->pf_seek( p_access, i_pos ); } /** * Try to read "i_read" bytes into a buffer pointed by "p_read". If * "p_read" is NULL then data are skipped instead of read. * \return The real number of bytes read/skip. If this value is less * than i_read that means that it's the end of the stream. * \note stream_Read increments the stream position, and when p_read is NULL, * this is its only task. */ int stream_Read( stream_t *s, void *p_read, int i_read ) { return s->pf_read( s, p_read, i_read ); } /** * Store in pp_peek a pointer to the next "i_peek" bytes in the stream * \return The real number of valid bytes. If it's less * or equal to 0, *pp_peek is invalid. * \note pp_peek is a pointer to internal buffer and it will be invalid as * soons as other stream_* functions are called. * \note Contrary to stream_Read, stream_Peek doesn't modify the stream * position, and doesn't necessarily involve copying of data. It's mainly * used by the modules to quickly probe the (head of the) stream. * \note Due to input limitation, the return value could be less than i_peek * without meaning the end of the stream (but only when you have i_peek >= * p_input->i_bufsize) */ int stream_Peek( stream_t *s, const uint8_t **pp_peek, int i_peek ) { return s->pf_peek( s, pp_peek, i_peek ); } /** * Use to control the "stream_t *". Look at #stream_query_e for * possible "i_query" value and format arguments. Return VLC_SUCCESS * if ... succeed ;) and VLC_EGENERIC if failed or unimplemented */ int stream_vaControl( stream_t *s, int i_query, va_list args ) { return s->pf_control( s, i_query, args ); } /** * Destroy a stream */ void stream_Delete( stream_t *s ) { s->pf_destroy( s ); } int stream_Control( stream_t *s, int i_query, ... ) { va_list args; int i_result; if( s == NULL ) return VLC_EGENERIC; va_start( args, i_query ); i_result = s->pf_control( s, i_query, args ); va_end( args ); return i_result; } /** * Read "i_size" bytes and store them in a block_t. * It always read i_size bytes unless you are at the end of the stream * where it return what is available. */ block_t *stream_Block( stream_t *s, int i_size ) { if( i_size <= 0 ) return NULL; /* emulate block read */ block_t *p_bk = block_Alloc( i_size ); if( p_bk ) { int i_read = stream_Read( s, p_bk->p_buffer, i_size ); if( i_read > 0 ) { p_bk->i_buffer = i_read; return p_bk; } block_Release( p_bk ); } return NULL; } /** * Read the remaining of the data if there is less than i_max_size bytes, otherwise * return NULL. * * The stream position is unknown after the call. */ block_t *stream_BlockRemaining( stream_t *s, int i_max_size ) { int i_allocate = __MIN(1000000, i_max_size); int64_t i_size = stream_Size( s ); if( i_size > 0 ) { int64_t i_position = stream_Tell( s ); if( i_position + i_max_size < i_size ) { msg_Err( s, "Remaining stream size is greater than %d bytes", i_max_size ); return NULL; } i_allocate = i_size - i_position; } if( i_allocate <= 0 ) return NULL; block_t *p_block = block_Alloc( i_allocate ); int i_index = 0; while( p_block ) { int i_read = stream_Read( s, &p_block->p_buffer[i_index], p_block->i_buffer - i_index); if( i_read <= 0 ) break; i_index += i_read; i_max_size -= i_read; if( i_max_size <= 0 ) break; p_block = block_Realloc( p_block, 0, p_block->i_buffer + __MIN(1000000, i_max_size) ); } if( p_block ) p_block->i_buffer = i_index; return p_block; }
gpl-2.0
EuroPlusFinance/Software
Quantum Trading Platforms/QuantLib-1.4/ql/math/matrixutilities/tapcorrelations.cpp
5800
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2007 François du Vignaud This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <[email protected]>. The license is also available online at <http://quantlib.org/license.shtml>. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #include <ql/math/matrixutilities/tapcorrelations.hpp> #include <cmath> namespace QuantLib { Disposable<Matrix> triangularAnglesParametrization(const Array& angles, Size matrixSize, Size rank) { // what if rank == 1? QL_REQUIRE((rank-1) * (2*matrixSize - rank) == 2*angles.size(), "rank-1) * (matrixSize - rank/2) == angles.size()"); Matrix m(matrixSize, matrixSize); // first row filling m[0][0] = 1.0; for (Size j=1; j<matrixSize; ++j) m[0][j] = 0.0; // next ones... Size k = 0; //angles index for (Size i=1; i<m.rows(); ++i) { Real sinProduct = 1.0; Size bound = std::min(i,rank-1); for (Size j=0; j<bound; ++j) { m[i][j] = std::cos(angles[k]); m[i][j] *= sinProduct; sinProduct *= std::sin(angles[k]); ++k; } m[i][bound] = sinProduct; for (Size j=bound+1; j<m.rows(); ++j) m[i][j] = 0; } return m; } Disposable<Matrix> lmmTriangularAnglesParametrization(const Array& angles, Size matrixSize, Size) { Matrix m(matrixSize, matrixSize); for (Size i=0; i<m.rows(); ++i) { Real cosPhi, sinPhi; if (i>0) { cosPhi = std::cos(angles[i-1]); sinPhi = std::sin(angles[i-1]); } else { cosPhi = 1.0; sinPhi = 0.0; } for (Size j=0; j<i; ++j) m[i][j] = sinPhi * m[i-1][j]; m[i][i] = cosPhi; for (Size j=i+1; j<m.rows(); ++j) m[i][j] = 0.0; } return m; } Disposable<Matrix> triangularAnglesParametrizationUnconstrained( const Array& x, Size matrixSize, Size rank) { Array angles(x.size()); //we convert the unconstrained parameters in angles for (Size i = 0; i < x.size(); ++i) angles[i] = M_PI*.5 - std::atan(x[i]); return triangularAnglesParametrization(angles, matrixSize, rank); } Disposable<Matrix> lmmTriangularAnglesParametrizationUnconstrained( const Array& x, Size matrixSize, Size rank) { Array angles(x.size()); //we convert the unconstrained parameters in angles for (Size i = 0; i < x.size(); ++i) angles[i] = M_PI*.5 - std::atan(x[i]); return lmmTriangularAnglesParametrization(angles, matrixSize, rank); } Disposable<Matrix> triangularAnglesParametrizationRankThree( Real alpha, Real t0, Real epsilon, Size matrixSize) { Matrix m(matrixSize, 3); for (Size i=0; i<m.rows(); ++i) { Real t = t0 * (1 - std::exp(epsilon*Real(i))); Real phi = std::atan(alpha * t); m[i][0] = std::cos(t)*std::cos(phi); m[i][1] = std::sin(t)*std::cos(phi); m[i][2] = -std::sin(phi); } return m; } Disposable<Matrix> triangularAnglesParametrizationRankThreeVectorial( const Array& parameters, Size nbRows) { QL_REQUIRE(parameters.size() == 3, "the parameter array must contain exactly 3 values" ); return triangularAnglesParametrizationRankThree(parameters[0], parameters[1], parameters[2], nbRows); } Real FrobeniusCostFunction::value(const Array& x) const { Array temp = values(x); return DotProduct(temp, temp); } Disposable<Array> FrobeniusCostFunction::values(const Array& x) const { Array result((target_.rows()*(target_.columns()-1))/2); Matrix pseudoRoot = f_(x, matrixSize_, rank_); Matrix differences = pseudoRoot * transpose(pseudoRoot) - target_; Size k = 0; // then we store the elementwise differences in a vector. for (Size i=0; i<target_.rows(); ++i) { for (Size j=0; j<i; ++j){ result[k] = differences[i][j]; ++k; } } return result; } }
gpl-2.0
davvid/git-cola
qtpy/QtWidgets.py
6411
# -*- coding: utf-8 -*- # # Copyright © 2014-2015 Colin Duquesnoy # Copyright © 2009- The Spyder Developmet Team # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) """ Provides widget classes and functions. .. warning:: Only PyQt4/PySide QtGui classes compatible with PyQt5.QtWidgets are exposed here. Therefore, you need to treat/use this package as if it were the ``PyQt5.QtWidgets`` module. """ from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError from ._patch.qcombobox import patch_qcombobox from ._patch.qheaderview import introduce_renamed_methods_qheaderview if PYQT5: from PyQt5.QtWidgets import * elif PYSIDE2: from PySide2.QtWidgets import * elif PYQT4: from PyQt4.QtGui import * QStyleOptionViewItem = QStyleOptionViewItemV4 del QStyleOptionViewItemV4 QStyleOptionFrame = QStyleOptionFrameV3 del QStyleOptionFrameV3 # These objects belong to QtGui try: # Older versions of PyQt4 do not provide these del (QGlyphRun, QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2, QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3, QMatrix4x4, QQuaternion, QRadialGradient, QRawFont, QRegExpValidator, QStaticText, QTouchEvent, QVector2D, QVector3D, QVector4D, qFuzzyCompare) except NameError: pass del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard, QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor, QDesktopServices, QDoubleValidator, QDrag, QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDropEvent, QFileOpenEvent, QFocusEvent, QFont, QFontDatabase, QFontInfo, QFontMetrics, QFontMetricsF, QGradient, QHelpEvent, QHideEvent, QHoverEvent, QIcon, QIconDragEvent, QIconEngine, QImage, QImageIOHandler, QImageReader, QImageWriter, QInputEvent, QInputMethodEvent, QKeyEvent, QKeySequence, QLinearGradient, QMouseEvent, QMoveEvent, QMovie, QPaintDevice, QPaintEngine, QPaintEngineState, QPaintEvent, QPainter, QPainterPath, QPainterPathStroker, QPalette, QPen, QPicture, QPictureIO, QPixmap, QPixmapCache, QPolygon, QPolygonF, QRegion, QResizeEvent, QSessionManager, QShortcutEvent, QShowEvent, QStandardItem, QStandardItemModel, QStatusTipEvent, QSyntaxHighlighter, QTabletEvent, QTextBlock, QTextBlockFormat, QTextBlockGroup, QTextBlockUserData, QTextCharFormat, QTextCursor, QTextDocument, QTextDocumentFragment, QTextDocumentWriter, QTextFormat, QTextFragment, QTextFrame, QTextFrameFormat, QTextImageFormat, QTextInlineObject, QTextItem, QTextLayout, QTextLength, QTextLine, QTextList, QTextListFormat, QTextObject, QTextObjectInterface, QTextOption, QTextTable, QTextTableCell, QTextTableCellFormat, QTextTableFormat, QTransform, QValidator, QWhatsThisClickedEvent, QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qGray, qGreen, qIsGray, qRed, qRgb, qRgba, QIntValidator, QStringListModel) # These objects belong to QtPrintSupport del (QAbstractPrintDialog, QPageSetupDialog, QPrintDialog, QPrintEngine, QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo) # These objects belong to QtCore del (QItemSelection, QItemSelectionModel, QItemSelectionRange, QSortFilterProxyModel) # Patch QComboBox to allow Python objects to be passed to userData patch_qcombobox(QComboBox) # QHeaderView: renamed methods introduce_renamed_methods_qheaderview(QHeaderView) elif PYSIDE: from PySide.QtGui import * QStyleOptionViewItem = QStyleOptionViewItemV4 del QStyleOptionViewItemV4 # These objects belong to QtGui del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard, QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor, QDesktopServices, QDoubleValidator, QDrag, QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDropEvent, QFileOpenEvent, QFocusEvent, QFont, QFontDatabase, QFontInfo, QFontMetrics, QFontMetricsF, QGradient, QHelpEvent, QHideEvent, QHoverEvent, QIcon, QIconDragEvent, QIconEngine, QImage, QImageIOHandler, QImageReader, QImageWriter, QInputEvent, QInputMethodEvent, QKeyEvent, QKeySequence, QLinearGradient, QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2, QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3, QMatrix4x4, QMouseEvent, QMoveEvent, QMovie, QPaintDevice, QPaintEngine, QPaintEngineState, QPaintEvent, QPainter, QPainterPath, QPainterPathStroker, QPalette, QPen, QPicture, QPictureIO, QPixmap, QPixmapCache, QPolygon, QPolygonF, QQuaternion, QRadialGradient, QRegExpValidator, QRegion, QResizeEvent, QSessionManager, QShortcutEvent, QShowEvent, QStandardItem, QStandardItemModel, QStatusTipEvent, QSyntaxHighlighter, QTabletEvent, QTextBlock, QTextBlockFormat, QTextBlockGroup, QTextBlockUserData, QTextCharFormat, QTextCursor, QTextDocument, QTextDocumentFragment, QTextFormat, QTextFragment, QTextFrame, QTextFrameFormat, QTextImageFormat, QTextInlineObject, QTextItem, QTextLayout, QTextLength, QTextLine, QTextList, QTextListFormat, QTextObject, QTextObjectInterface, QTextOption, QTextTable, QTextTableCell, QTextTableCellFormat, QTextTableFormat, QTouchEvent, QTransform, QValidator, QVector2D, QVector3D, QVector4D, QWhatsThisClickedEvent, QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qGray, qGreen, qIsGray, qRed, qRgb, qRgba, QIntValidator, QStringListModel) # These objects belong to QtPrintSupport del (QAbstractPrintDialog, QPageSetupDialog, QPrintDialog, QPrintEngine, QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo) # These objects belong to QtCore del (QItemSelection, QItemSelectionModel, QItemSelectionRange, QSortFilterProxyModel) # Patch QComboBox to allow Python objects to be passed to userData patch_qcombobox(QComboBox) # QHeaderView: renamed methods introduce_renamed_methods_qheaderview(QHeaderView) else: raise PythonQtError('No Qt bindings could be found')
gpl-2.0
jcstrang-edu/eas_bbb_version1
source/bmp180.cpp
7277
/* BMP180 Pressure & Temp Sensor Library bmp180.cpp EAS Brian Davis */ #include <errno.h> #include <unistd.h> #include <fcntl.h> #include <linux/i2c.h> #include <linux/i2c-dev.h> #include <sys/ioctl.h> #include <iostream> #include <cstring> #include "bmp180_bosch.h" #include "bmp180.h" // #ifndef BMP180_EAS_H_ // #define BMP180_EAS_H_ #define BMP_180_ADDR 0x77 // //Default Constructor // Example from Bosch datasheet // AC1 = 408; AC2 = -72; AC3 = -14383; AC4 = 32741; AC5 = 32757; AC6 = 23153; // B1 = 6190; B2 = 4; MB = -32768; MC = -8711; MD = 2868; // Example from http://wmrx00.sourceforge.net/Arduino/BMP180-Calcs.pdf // AC1 = 7911; AC2 = -934; AC3 = -14306; AC4 = 31567; AC5 = 25671; AC6 = 18974; // VB1 = 5498; VB2 = 46; MB = -32768; MC = -11075; MD = 2432; bmp180::bmp180(int bus, uint8_t UniqueID_in){ UniqueID = UniqueID_in; // // Default Cal values // ac1 = 408; ac2 = -72; ac3 = -14383; ac4 = 32741; ac5 = 32757; ac6 = 23153; b1 = 6190; b2 = 4; mb = -32768; mc = -8711; mc = 2868; readCalValues(); oss = bmp_mode; rawTemp = 0; rawPress = 0; // // Open I2C Bus // #define MAX_BUS 24 char i2cnamebuf[MAX_BUS]; snprintf(i2cnamebuf, sizeof(i2cnamebuf), "/dev/i2c-%d", bus); if ((i2cBusPtr = open(i2cnamebuf, O_RDWR)) < 0) { /* ERROR HANDLING: you can check errno to see what went wrong */ perror("BMP180 : Failed to open the i2c bus"); return; } // // Associate BMP I2C Addr w/ Bus Ptr // if (ioctl(i2cBusPtr, I2C_SLAVE, BMP_180_ADDR) < 0) { printf("BMP180 : Failed to acquire bus access and/or talk to slave.\n"); /* ERROR HANDLING; you can check errno to see what went wrong */ return; } } /* mode set to 0 All calibration values read out */ //bool bmp180::begin(){ // @@@ Add a Read of the Calibration Values // readCalValues(); // Required for further operations // Wire.begin(); // Calibration value read //ac1 = read16(bmp_ac1); //ac2 = read16(bmp_ac2); //ac3 = read16(bmp_ac3); //ac4 = read16(bmp_ac4); //ac5 = read16(bmp_ac5); //ac6 = read16(bmp_ac6); //b1 = read16(bmp_b1); //b2 = read16(bmp_b2); //mb = read16(bmp_mb); ///mc = read16(bmp_mc); //md = read16(bmp_md); //return true; //} int bmp180::readCalValues(){ return 0; } /* Calculates temperature from selected raw values. Raw values must be floating-point in order for the calculation of floating-point temperatures. */ float bmp180::readTemp(){ int32_t ut,b5; float temperatur; //ut = uncompensated temperature ut = rawTemp; //(); /* Calculation rate of temperatures in Celsius. Data sheet read out. */ int32_t x1 = ((ut - (int32_t)ac6) * (int32_t)ac5) >> 15; int32_t x2 = ((int32_t)mc << 11) / (x1 + (int32_t)md); b5 = x1 + x2; temperatur = (b5 +8) >> 4; temperatur /= 10.0; return temperatur; } /* Uses selected values to calculate pressure. Pressure can be returned as int32_t. Pressure could be calculated here in Pascal units if a new return type was created. */ int32_t bmp180::readPressure(){ int32_t ut,up,b3,b5,b6,x1,x2,x3,p; uint32_t b4,b7; //ut = uncompensated temperature //up = uncompensated pressure //up = readRawPres(); //ut = readRawTemp(); up = rawPress; ut = rawTemp; /* Calculation of real pressure in Pascals. Read out to data sheet. */ int32_t x11 = ((ut - (int32_t)ac6) * (int32_t)ac5) >> 15; int32_t x22 = ((int32_t)mc << 11) / (x11 + (int32_t)md); b5 = x11 + x22; b6 = b5 - 4000; x1 = ((int32_t)b2 * ((b6 * b6) >> 12)) >> 11; x2 = ((int32_t)ac2 * b6) >> 11; x3 = x1 + x2; b3 = (((((int32_t)ac1*4) + x3) << oss) + 2) / 4; x1 = ((int32_t)ac3 * b6) >> 13; x2 = (((int32_t)b1 * (b6 * b6) >> 12)) >> 16; x3 = ((x1 + x2) + 2) >> 2; b4 = ((int32_t)ac4 * (uint32_t)(x3 + 32768)) >> 15; b7 = ((uint32_t)up - b3) * (uint32_t)(50000 >> oss); if (b7 < 0x80000000){ p = (b7 * 2) / b4; } else{ p = (b7 / b4) * 2; } x1 = (p >> 8) * (p >> 8); x1 = (x1 * 3038) >> 16; x2 = (-7357 * p) >> 16; p = p + ((x1 + x2 + (int32_t)3791) >> 4); return p; } //------------------------------------------------------------------- // readRawTemp ( ) // // Primary function - read temperature data from BMP180 device // uint16_t bmp180::updateRawTemp(){ char buf[20] = {0}; // // Start Temperature // buf[0] = BMP180_CTRL_MEAS_REG;; buf[1] = BMP180_T_MEASURE; write(i2cBusPtr, buf, 2); // pause // Temperature Conversion 4.5 mS // Page 21 of datasheet Rev 2.5 usleep(5E3); // // Begin Read from ADC MSB // buf[0] = BMP180_ADC_OUT_MSB_REG; write(i2cBusPtr, buf, 1); // Using I2C Read if (read(i2cBusPtr,buf,2) != 2) { /* ERROR HANDLING: i2c transaction failed */ std::cout << "bmp180_rrT Failed to read from i2c bus: " << strerror(errno) << std::endl << std::endl; return 0; } else { // Correct Read of (2) bytes rawTemp = (buf[0] << 8) | buf[1]; // // Display Temp Value // std::cout << "raw Temp value = 0x"<< std::hex << rawTemp << std::endl; } return rawTemp; } //------------------------------------------------------------------- // readRawPress ( ) // // Primary function - read pressure data from BMP180 device // uint32_t bmp180::updateRawPress(){ char buf[20] = {0}; // // Start Pressure // buf[0] = BMP180_CTRL_MEAS_REG; buf[1] = BMP180_P_MEASURE; write(i2cBusPtr, buf, 2); // pause // Pressure Conversion 4.5 - 25.5 mS // Page 21 of datasheet Rev 2.5 usleep(26E3); // // Begin Read from ADC MSB // buf[0] = BMP180_ADC_OUT_MSB_REG; write(i2cBusPtr, buf, 1); // Using I2C Read if (read(i2cBusPtr,buf,2) != 2) { /* ERROR HANDLING: i2c transaction failed */ std::cout << "bmp180_rrP Failed to read from i2c bus: " << strerror(errno) << std::endl; return 0; } else { rawPress = (buf[0] << 8) | buf[1]; // // Display Press Value //std::cout << "raw Pressure value = 0x" << std::hex << rawPress << std::endl; } return rawPress; } //------------------------------------------------------------ // // uint32_t bmp180::updateRawPressTemp(){ // // Initiating Communication with BMP180 // /* if (ioctl(i2cBusPtr, I2C_SLAVE, BMP_180_ADDR) < 0) { printf("Failed to acquire bus access and/or talk to slave.\n"); // ERROR HANDLING; you can check errno to see what went wrong exit(1); } */ updateRawTemp(); updateRawPress(); return rawPress; } //------------------------------------------------------------ // // EasDAQpack* bmp180::fillEASpack(EasDAQpack &fillPack) { fillPack.setID(EasDAQpack::BAROTEMP); fillPack.u.barotemp.temp = rawTemp; fillPack.u.barotemp.press = rawPress; // fillPack.u.threeAxis_ss16.z = rawData_Z; return &fillPack; } // #endif
gpl-2.0
buildproto/SignalServiceKit
src/Network/API/Requests/TSUpdateAttributesRequest.h
294
// // TSUpdateAttributesRequest.h // Signal // // Created by Frederic Jacobs on 22/08/15. // Copyright (c) 2015 Open Whisper Systems. All rights reserved. // #import "TSRequest.h" @interface TSUpdateAttributesRequest : TSRequest - (instancetype)initWithUpdatedAttributesWithVoice; @end
gpl-2.0
MerryMage/dynarmic
externals/vixl/vixl/test/aarch32/traces/simulator-cond-rd-rn-rm-shasx-a32.h
688838
// Copyright 2015, VIXL authors // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of ARM Limited nor the names of its contributors may be // used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // --------------------------------------------------------------------- // This file is auto generated using tools/generate_simulator_traces.py. // // PLEASE DO NOT EDIT. // --------------------------------------------------------------------- #ifndef VIXL_SIMULATOR_COND_RD_RN_RM_SHASX_A32_H_ #define VIXL_SIMULATOR_COND_RD_RN_RM_SHASX_A32_H_ const Inputs kOutputs_Shasx_Condition_eq_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_ne_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_cs_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_cc_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_mi_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_pl_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_vs_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_vc_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_hi_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_ls_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_ge_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_lt_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_gt_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs kOutputs_Shasx_Condition_le_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_Condition_al_r0_r0_r0[] = { { 0x80000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x40000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x20000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x10000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xc0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xa0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x90000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x60000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x50000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x30000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xe0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xd0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xb0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0x70000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, { 0xf0000000, 0x00000000, 0x00000000, 0xabab0000, 0xabab0000, 0xabab0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r0_r0_r0[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r1_r1_r1[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r2_r2_r2[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r3_r3_r3[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r4_r4_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r5_r5_r5[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r6_r6_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r7_r7_r7[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r8_r8_r8[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r9_r9_r9[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r10_r10_r10[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r11_r11_r11[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r12_r12_r12[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRnIsRm_al_r14_r14_r14[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00010001, 0x00010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00100010, 0x00100010 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x003e003e, 0x003e003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x003f003f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x3ffe3ffe, 0x3ffe3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33330000 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55550000, 0x55550000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x3ffebfff, 0x3ffebfff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x3fffc000, 0x3fffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaa0000, 0xaaaa0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccc0000, 0xcccc0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xbfffc000, 0xbfffc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xc000c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xc001c002, 0xc001c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffbfffc0, 0xffbfffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffc0ffc1, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffc1ffc2, 0xffc1ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffeffff0, 0xffeffff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0xffff0000 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r14_r14_r3[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r1_r1_r2[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r12_r12_r7[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r10_r10_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r4_r4_r9[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r5_r5_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r2_r2_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r7_r7_r11[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r7_r7_r12[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRn_al_r2_r2_r10[] = { { 0x00000000, 0x00000000, 0x00000000, 0x003fc001, 0x003fc001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0x003ec001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fff, 0xffff3fff, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0x9555d555, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3fff, 0x003e3fff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0xffc10010, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x403fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffbfffc1, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc010, 0xffffc010, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffc1, 0xffefffc1, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003e, 0x3ffe003e, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xd5542a6c, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffefff0, 0xfffefff0, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aa92aaa, 0x6aa92aaa, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a666, 0x1999a666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0010, 0x003e0010, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0xbffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000010, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x3fbfffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00004010, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc002, 0xffbfc002, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xd5549555, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00003ffe, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0xc0004000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffff3fc0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0xc0000001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c002, 0xc000c002, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0xffc14000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0x00003fc1, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0xbffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0xffc10040, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xc000fff0, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaaad556, 0xeaaad556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc0, 0x3ffeffc0, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0001, 0x003f0001, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0x1553d555, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc1, 0x3fffffc1, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x3fff3ffe, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0x3fffffc0, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6b, 0xd5542a6b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd565d555, 0xd565d555, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0xffffc040, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x59981999, 0x59981999, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd593d555, 0xd593d555, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffbfc000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xc000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00103ffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003ffe, 0x40003ffe, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0xbfc00000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999199a, 0x1999199a, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffbf0000, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff5555, 0xffff5555, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xfffe0000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0xfff00010, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x403effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc1, 0xc001ffc1, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffffc0, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xe6651998, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe66619d8, 0xe66619d8, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab2aaa, 0x2aab2aaa, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0xd5552aea, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x3ffe0000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xc000c001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x7ffeffff, 0x7ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0x3ffeffc1, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x3fff3fff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1998199a, 0x1998199a, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000403f, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6662666, 0xe6662666, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x2aaa6aaa, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec040, 0xfffec040, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x26651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffff, 0x003fffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x199a1999, 0x199a1999, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0xffc10001, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0003f, 0xffc0003f, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffc0c000, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fffe, 0x0000fffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xfffec000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xffc0ffff, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ff0, 0x00003ff0, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665999, 0xe6665999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc1, 0xffc1ffc1, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0x003effff, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xe666e666, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xe6651999, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x4000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x5999e666, 0x5999e666, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xc001c001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffffc1, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0xffffc000, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x15542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0xc0010000, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xc000ffc1, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0xbfff0001, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x400fffff, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0x0000ffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00001, 0xbff00001, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0x2aaad515, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x403ffffe, 0x403ffffe, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0xbfffc001, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec001, 0xbffec001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0xffff003f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x1999e6a6, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0x0000c000, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc001, 0xffbfc001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x3ffeffff, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00003fff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9556, 0x2aaa9556, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010010, 0x00010010, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0x3ffec000, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x15542aa9, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff0000, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x2ae92aaa, 0x2ae92aaa, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc03f0000, 0xc03f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0x2aaad516, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0x1999e626, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffc00000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00100001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0x2665e666, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xfffec001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xc000c000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0xffffc001, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffff3ff0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffeffff, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x19992665, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe003f, 0x3ffe003f, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xd5542aaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33330000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0x0000fff0, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffff, 0xc001ffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0x1999e656, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc2, 0xc000ffc2, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0xeaab2aab, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0x2aaad554, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0x1999e627, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0xbfff0000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000010, 0xc0000010, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x2aaad594, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00013fff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0xc0000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00013ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc0, 0xffc1ffc0, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0xc000003f, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0x0000ffc1, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0xffc13fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xfffeffc1, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x195a199a, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe003f, 0xfffe003f, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00001, 0xbfc00001, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xd516d555, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xfffe8002, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xd5542a9b, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xbff00000, 0xbff00000, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0xffffc03f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x003f0000, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffc0c001, 0xffffff81 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r1_r12_r1[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r4_r3_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r0_r2_r0[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r10_r4_r10[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r4_r8_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r4_r1_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r8_r11_r8[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r1_r10_r1[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r2_r0_r2[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RdIsRm_al_r6_r7_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x0010003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x3ffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aa9, 0x7ffffffd, 0x15542aa9 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8000, 0x3ffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x003ffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xbfff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc1, 0xffffff82, 0xffffbfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xfffffffe, 0x0000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aba2aaa, 0x55555555, 0x2aba2aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e665, 0xfffffffe, 0x1999e665 }, { 0x00000000, 0x00000000, 0x00000000, 0xbffe0000, 0x80000000, 0xbffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffc0c002 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00010, 0x00000020, 0xffc00010 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8002, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff80, 0x003effc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004010, 0x00000020, 0x00004010 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x0000ffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc1, 0xffffff82, 0x003effc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc2, 0xffffff83, 0xffc0ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aab6aaa, 0x55555555, 0x2aab6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0x7ffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a667, 0xffff8001, 0x1999a667 }, { 0x00000000, 0x00000000, 0x00000000, 0x00004001, 0x00000002, 0x00004001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0xd5551555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0010, 0x00000020, 0xffff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xfffffffe, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0x00007ffe, 0xfffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xa667e666, 0xcccccccc, 0xa667e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec000, 0xffffffff, 0xfffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0xd594d555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x0000003e }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5539555, 0xaaaaaaaa, 0xd5539555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a9a2aab, 0x55555555, 0x2a9a2aab }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007e, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0x19995999, 0x33333333, 0x19995999 }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195a, 0xffffff80, 0xe665195a }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fff, 0x00007ffe, 0x00003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa6aaa, 0x55555555, 0x2aaa6aaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc001, 0xffff8001, 0xffefc001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aac, 0x00000002, 0xd5552aac }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0xd5549555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc00000, 0x7fffffff, 0x3fc00000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffc0c001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0001, 0xffff8003, 0xffff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0xeeeebbbb, 0xaaaaaaaa, 0xeeeebbbb }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x1554d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffeffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefffff, 0xfffffffe, 0xffefffff }, { 0x00000000, 0x00000000, 0x00000000, 0x2665e666, 0xcccccccc, 0x2665e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffe, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552ae9, 0x0000007d, 0xd5552ae9 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffe, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbbeeef, 0xaaaaaaaa, 0xbbbbeeef }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e6a6, 0x0000007f, 0x1999e6a6 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x00000001, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffff8000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xffffffff, 0xd5542aaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc1, 0xffffff83, 0x0000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff, 0x000fffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c000, 0xffff8000, 0xc000c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebff0, 0xffffffe0, 0xfffebff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffe, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfff, 0xfffffffe, 0xffffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f0000, 0x00000000, 0x003f0000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc1ffff, 0x7ffffffd, 0x3fc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00003ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc1, 0xffffff82, 0xffbfffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x9555d555, 0xaaaaaaaa, 0x9555d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfc000, 0xffff8000, 0xffbfc000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a9b, 0xffffffe0, 0xd5542a9b }, { 0x00000000, 0x00000000, 0x00000000, 0x19992665, 0x00007ffd, 0x19992665 }, { 0x00000000, 0x00000000, 0x00000000, 0x19992666, 0x00007fff, 0x19992666 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffd, 0xffc0ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x403efffe, 0x7ffffffd, 0x403efffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffff, 0xfffffffe, 0xffc1ffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xc0004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0010, 0x00000020, 0xfffe0010 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003e, 0x0000007d, 0x3fff003e }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x003ec001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xc0000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10040, 0x0000007f, 0xffc10040 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffe, 0xffc13fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1c002, 0xffff8003, 0xffc1c002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x80000001, 0xffff0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffd, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0013fff, 0x00007ffe, 0xc0013fff }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0001, 0x80000001, 0xbfff0001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00013fff }, { 0x00000000, 0x00000000, 0x00000000, 0x4000fffe, 0x7ffffffd, 0x4000fffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffff, 0xfffffffd, 0xc000ffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffbfff, 0x7ffffffd, 0x3fffbfff }, { 0x00000000, 0x00000000, 0x00000000, 0xe665195b, 0xffffff82, 0xe665195b }, { 0x00000000, 0x00000000, 0x00000000, 0xbffec000, 0x80000000, 0xbffec000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xffffffff, 0xe6651999 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff81, 0xffffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0010, 0x00000020, 0x3fff0010 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000002, 0xc0000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001fff0, 0xffffffe0, 0xc001fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x2aaad517 }, { 0x00000000, 0x00000000, 0x00000000, 0x4444eeef, 0x33333333, 0x4444eeef }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc1, 0xffffff82, 0xbfffffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xeaab2aab, 0x55555555, 0xeaab2aab }, { 0x00000000, 0x00000000, 0x00000000, 0x00013ffe, 0x00007ffd, 0x00013ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffc03fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffc0, 0xffffff80, 0x3fffffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103fff, 0x00007ffe, 0x00103fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0xffffffff, 0xfffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000002, 0xffc00001 }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x403effff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x3fff3ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0x80010001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc1, 0xffffff82, 0x000fffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad565, 0x00000020, 0x2aaad565 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad516, 0xffffff81, 0x2aaad516 }, { 0x00000000, 0x00000000, 0x00000000, 0x7fffffff, 0x7ffffffe, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x1553d555, 0xaaaaaaaa, 0x1553d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000001, 0xe666199a }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651998, 0xfffffffd, 0xe6651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaac, 0xffff8002, 0xd554eaac }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0xfffec010 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad595, 0x0000007f, 0x2aaad595 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0xffffc040 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001ffc2, 0xffffff83, 0xc001ffc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xe664e666, 0xcccccccc, 0xe664e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x3fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xbbbb1111, 0xcccccccc, 0xbbbb1111 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc2, 0xffffff83, 0xffffbfc2 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0003fff, 0x00007ffe, 0xc0003fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00007ffe, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x0000403f }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00103ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0x00004000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffefc002, 0xffff8003, 0xffefc002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8002, 0xffff8003, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc1, 0xffffff82, 0x00003fc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x40003fff, 0x7ffffffe, 0x40003fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fbfffff, 0x7ffffffd, 0x3fbfffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffec001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd999e667, 0x80000001, 0xd999e667 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x3ffeffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfff0003f, 0x0000007e, 0xfff0003f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffeffc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x26651998, 0x7ffffffd, 0x26651998 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0fff0, 0xffffffe0, 0xffc0fff0 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xd515d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1003f, 0x0000007e, 0xffc1003f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00040, 0x0000007f, 0xffc00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x003f003f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010000, 0x80000000, 0xc0010000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000000, 0x003e0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc0, 0xffffff80, 0xfffebfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0x195a199a, 0x33333333, 0x195a199a }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffc0ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xd516d555 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xfff00040 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0x7ffffffd, 0x3ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19d81999, 0x33333333, 0x19d81999 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad554, 0xfffffffe, 0x2aaad554 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001003f, 0x0000007d, 0xc001003f }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xa666199a }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x7ffffffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffbfc0, 0xffffff80, 0xffffbfc0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc001, 0x00000001, 0xffffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xc000ffc1 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8001, 0x003ec000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x3fff3fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffe4000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0xfffe8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc001, 0x80000001, 0xbfffc001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0000, 0x7fffffff, 0x3ffe0000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c000, 0xffff8000, 0xffc0c000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff82, 0xfffebfc1 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xa666e666 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc10000, 0x7fffffff, 0x3fc10000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0014000, 0x00007fff, 0xc0014000 }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r1_r12_r12[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r6_r9_r9[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r12_r7_r7[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r11_r8_r8[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r14_r0_r0[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r8_r4_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r0_r8_r8[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r5_r3_r3[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r8_r5_r5[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RnIsRm_al_r5_r10_r10[] = { { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffeffff0, 0xffffffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffebfff, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x55550000, 0x55555555, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003e, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffc1ffc2, 0xffffff83, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe3ffe, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffc000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff81, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffc000, 0x7fffffff, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x00010001, 0x00000002, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffd, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x80000000, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100010, 0x00000020, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000c001, 0xffff8002, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f003f, 0x0000007e, 0x0000007e }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r3_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r3_r11_r1[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r2_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r0_r5[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r6_r12[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r10_r8_r4[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r4_r3_r1[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r12_r11_r14[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r9_r4_r11[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const Inputs kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r4_r6[] = { { 0x00000000, 0x00000000, 0x00000000, 0x3ffec000, 0xffff8001, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8002, 0xffff8003, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc0004000, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc0, 0xffffff80, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff0040, 0x0000007f, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552aea, 0x0000007e, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007e, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff81, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3ffe, 0x00007ffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe676e666, 0xcccccccc, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5552abb, 0x00000020, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e667, 0x00000002, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00040, 0x0000007f, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xe6665998, 0x00007ffd, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe4000, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xa666199a, 0x80000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0000, 0x00000001, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa2aab, 0x55555555, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542a6c, 0xffffff82, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10001, 0x00000002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc0, 0xffffff80, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffc13fff, 0x00007ffd, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8002, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199a, 0x00000000, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x26651999, 0x7ffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x80000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x19a91999, 0x33333333, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000fff0, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad554, 0x7ffffffe, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xe627e666, 0xcccccccc, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x1989199a, 0x33333333, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffff, 0x7ffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00003fc0, 0xffffff80, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007e, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec010, 0x00000020, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0x00000001, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xcccc0000, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0x1554d555, 0xaaaaaaaa, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0x0000403f, 0x0000007f, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbf0000, 0xffffffff, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc0, 0xffffff81, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007d, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5549555, 0xaaaaaaaa, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff0001, 0x00000002, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad555, 0x00000000, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad515, 0xffffff80, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xd594d555, 0xaaaaaaaa, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc00000, 0x80000000, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x00003ffe, 0x00007ffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fc000, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xaaaa0000, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0x3fc0ffff, 0x7ffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00100001, 0x00000002, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffffffe, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad517, 0xffffff83, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff3fff, 0x00007fff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffff, 0xfffffffe, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xffffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfff, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7fffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003efff0, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00001, 0x00000001, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999a668, 0xffff8003, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x1998d99a, 0x33333333, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003f, 0x0000007f, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa9557, 0xffff8003, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffff, 0xfffffffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000fff0, 0xffffffe0, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc000ffc1, 0xffffff82, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe, 0x00007ffd, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e0001, 0x00000002, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x003e3ffe, 0x00007ffd, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x15542aaa, 0x7fffffff, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xd5542aaa, 0xfffffffe, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c002, 0xffff8003, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd553d555, 0xaaaaaaaa, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0xfff00010, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x80010001, 0x80000001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e666, 0x00000000, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x80000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xc0100000, 0x80000001, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003fffc1, 0xffffff82, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec03f, 0x0000007e, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xd5551555, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e626, 0xffffff80, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000000, 0x00000000, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xd515d555, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0000, 0x80000000, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aa92aab, 0x55555555, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e627, 0xffffff81, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3ff0, 0xffffffe0, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0000001, 0x00000001, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x000fffc0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666e666, 0xcccccccc, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe8001, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd554eaab, 0xffff8001, 0xaaaaaaaa }, { 0x00000000, 0x00000000, 0x00000000, 0xe6651999, 0xfffffffe, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xa666e666, 0xcccccccc, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00103ffe, 0x00007ffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffffffe, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffe0001, 0x00000001, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x400ffffe, 0x7ffffffd, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8001, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0x00013fff, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x33330000, 0x33333333, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c001, 0xffff8002, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc1, 0xffffff82, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x003e003f, 0x0000007f, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3fff, 0x00007fff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec000, 0xffff8000, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xfffebfc1, 0xffffff81, 0x7ffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8003, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403fffff, 0x7fffffff, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0xbfc10000, 0x80000000, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x400fffff, 0x7ffffffe, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc10010, 0x00000020, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff3fc0, 0xffffff81, 0x80000000 }, { 0x00000000, 0x00000000, 0x00000000, 0xc001c001, 0xffff8001, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfff0000, 0x80000000, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xd516d555, 0xaaaaaaaa, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc00000, 0xffffffff, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0xfffec001, 0xffff8001, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc040, 0x0000007f, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0x3fff003f, 0x0000007f, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000, 0xffff8000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffff, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x003ffffe, 0xfffffffd, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3fffffff, 0xffffffff, 0x00007fff }, { 0x00000000, 0x00000000, 0x00000000, 0xe667e666, 0xcccccccc, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffbfffc0, 0xffffff80, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad594, 0x0000007e, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0xbfffffc0, 0xffffff80, 0xffff8000 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff003f, 0x0000007d, 0xfffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffc1, 0xffffff82, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2a6b2aab, 0x55555555, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000c000, 0xffff8001, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0x1999e656, 0xffffffe0, 0x33333333 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaad556, 0x00000001, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc000, 0x00000000, 0x7fffffff }, { 0x00000000, 0x00000000, 0x00000000, 0xffffc03f, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0xc000003f, 0x0000007e, 0xffff8001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc14000, 0x00007fff, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0x0010003e, 0x0000007d, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffec001, 0xffff8002, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x2aea2aaa, 0x55555555, 0x0000007f }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffe0010, 0x00000020, 0x00007ffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffc0, 0xffffff80, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003f3ffe, 0x00007ffd, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x4000ffff, 0x7ffffffe, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff8001, 0x80000001 }, { 0x00000000, 0x00000000, 0x00000000, 0x003ec001, 0xffff8003, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0c002, 0xffff8003, 0xffffff81 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010040, 0x0000007f, 0xffff8003 }, { 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0x00000000, 0x2aaa1555, 0x00007fff, 0x55555555 }, { 0x00000000, 0x00000000, 0x00000000, 0x3ffeffc1, 0xffffff82, 0x00007ffe }, { 0x00000000, 0x00000000, 0x00000000, 0x403effff, 0x7ffffffe, 0x0000007e }, { 0x00000000, 0x00000000, 0x00000000, 0x0000ffff, 0xffffffff, 0x00000002 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc03fff, 0x00007ffd, 0xffffff80 }, { 0x00000000, 0x00000000, 0x00000000, 0xe666199b, 0x00000002, 0xcccccccc }, { 0x00000000, 0x00000000, 0x00000000, 0xfffeffc1, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x00000000, 0x00000000, 0x0000003e, 0x0000007d, 0x00000001 }, { 0x00000000, 0x00000000, 0x00000000, 0xffc0ffc1, 0xffffff82, 0xffffff82 }, { 0x00000000, 0x00000000, 0x00000000, 0xc0010010, 0x00000020, 0xffff8002 }, { 0x00000000, 0x00000000, 0x00000000, 0x003effc0, 0xffffff81, 0x0000007d }, { 0x00000000, 0x00000000, 0x00000000, 0x6aaad555, 0x7fffffff, 0x55555555 }, }; const TestResult kReferenceShasx[] = { { ARRAY_SIZE(kOutputs_Shasx_Condition_eq_r0_r0_r0), kOutputs_Shasx_Condition_eq_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_ne_r0_r0_r0), kOutputs_Shasx_Condition_ne_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_cs_r0_r0_r0), kOutputs_Shasx_Condition_cs_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_cc_r0_r0_r0), kOutputs_Shasx_Condition_cc_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_mi_r0_r0_r0), kOutputs_Shasx_Condition_mi_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_pl_r0_r0_r0), kOutputs_Shasx_Condition_pl_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_vs_r0_r0_r0), kOutputs_Shasx_Condition_vs_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_vc_r0_r0_r0), kOutputs_Shasx_Condition_vc_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_hi_r0_r0_r0), kOutputs_Shasx_Condition_hi_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_ls_r0_r0_r0), kOutputs_Shasx_Condition_ls_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_ge_r0_r0_r0), kOutputs_Shasx_Condition_ge_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_lt_r0_r0_r0), kOutputs_Shasx_Condition_lt_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_gt_r0_r0_r0), kOutputs_Shasx_Condition_gt_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_le_r0_r0_r0), kOutputs_Shasx_Condition_le_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_Condition_al_r0_r0_r0), kOutputs_Shasx_Condition_al_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r0_r0_r0), kOutputs_Shasx_RdIsRnIsRm_al_r0_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r1_r1_r1), kOutputs_Shasx_RdIsRnIsRm_al_r1_r1_r1, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r2_r2_r2), kOutputs_Shasx_RdIsRnIsRm_al_r2_r2_r2, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r3_r3_r3), kOutputs_Shasx_RdIsRnIsRm_al_r3_r3_r3, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r4_r4_r4), kOutputs_Shasx_RdIsRnIsRm_al_r4_r4_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r5_r5_r5), kOutputs_Shasx_RdIsRnIsRm_al_r5_r5_r5, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r6_r6_r6), kOutputs_Shasx_RdIsRnIsRm_al_r6_r6_r6, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r7_r7_r7), kOutputs_Shasx_RdIsRnIsRm_al_r7_r7_r7, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r8_r8_r8), kOutputs_Shasx_RdIsRnIsRm_al_r8_r8_r8, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r9_r9_r9), kOutputs_Shasx_RdIsRnIsRm_al_r9_r9_r9, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r10_r10_r10), kOutputs_Shasx_RdIsRnIsRm_al_r10_r10_r10, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r11_r11_r11), kOutputs_Shasx_RdIsRnIsRm_al_r11_r11_r11, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r12_r12_r12), kOutputs_Shasx_RdIsRnIsRm_al_r12_r12_r12, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRnIsRm_al_r14_r14_r14), kOutputs_Shasx_RdIsRnIsRm_al_r14_r14_r14, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r14_r14_r3), kOutputs_Shasx_RdIsRn_al_r14_r14_r3, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r1_r1_r2), kOutputs_Shasx_RdIsRn_al_r1_r1_r2, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r12_r12_r7), kOutputs_Shasx_RdIsRn_al_r12_r12_r7, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r10_r10_r6), kOutputs_Shasx_RdIsRn_al_r10_r10_r6, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r4_r4_r9), kOutputs_Shasx_RdIsRn_al_r4_r4_r9, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r5_r5_r6), kOutputs_Shasx_RdIsRn_al_r5_r5_r6, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r2_r2_r4), kOutputs_Shasx_RdIsRn_al_r2_r2_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r7_r7_r11), kOutputs_Shasx_RdIsRn_al_r7_r7_r11, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r7_r7_r12), kOutputs_Shasx_RdIsRn_al_r7_r7_r12, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRn_al_r2_r2_r10), kOutputs_Shasx_RdIsRn_al_r2_r2_r10, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r1_r12_r1), kOutputs_Shasx_RdIsRm_al_r1_r12_r1, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r4_r3_r4), kOutputs_Shasx_RdIsRm_al_r4_r3_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r0_r2_r0), kOutputs_Shasx_RdIsRm_al_r0_r2_r0, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r10_r4_r10), kOutputs_Shasx_RdIsRm_al_r10_r4_r10, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r4_r8_r4), kOutputs_Shasx_RdIsRm_al_r4_r8_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r4_r1_r4), kOutputs_Shasx_RdIsRm_al_r4_r1_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r8_r11_r8), kOutputs_Shasx_RdIsRm_al_r8_r11_r8, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r1_r10_r1), kOutputs_Shasx_RdIsRm_al_r1_r10_r1, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r2_r0_r2), kOutputs_Shasx_RdIsRm_al_r2_r0_r2, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsRm_al_r6_r7_r6), kOutputs_Shasx_RdIsRm_al_r6_r7_r6, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r1_r12_r12), kOutputs_Shasx_RnIsRm_al_r1_r12_r12, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r6_r9_r9), kOutputs_Shasx_RnIsRm_al_r6_r9_r9, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r12_r7_r7), kOutputs_Shasx_RnIsRm_al_r12_r7_r7, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r11_r8_r8), kOutputs_Shasx_RnIsRm_al_r11_r8_r8, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r14_r0_r0), kOutputs_Shasx_RnIsRm_al_r14_r0_r0, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r8_r4_r4), kOutputs_Shasx_RnIsRm_al_r8_r4_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r0_r8_r8), kOutputs_Shasx_RnIsRm_al_r0_r8_r8, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r5_r3_r3), kOutputs_Shasx_RnIsRm_al_r5_r3_r3, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r8_r5_r5), kOutputs_Shasx_RnIsRm_al_r8_r5_r5, }, { ARRAY_SIZE(kOutputs_Shasx_RnIsRm_al_r5_r10_r10), kOutputs_Shasx_RnIsRm_al_r5_r10_r10, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r3_r4), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r3_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r3_r11_r1), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r3_r11_r1, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r2_r6), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r2_r6, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r0_r5), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r0_r5, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r6_r12), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r11_r6_r12, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r10_r8_r4), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r10_r8_r4, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r4_r3_r1), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r4_r3_r1, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r12_r11_r14), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r12_r11_r14, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r9_r4_r11), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r9_r4_r11, }, { ARRAY_SIZE(kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r4_r6), kOutputs_Shasx_RdIsNotRnIsNotRm_al_r14_r4_r6, }, }; #endif // VIXL_SIMULATOR_COND_RD_RN_RM_SHASX_A32_H_
gpl-2.0
draskolnikova/icinga2
lib/notification/notificationcomponent.hpp
2276
/****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software Foundation * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ #ifndef NOTIFICATIONCOMPONENT_H #define NOTIFICATIONCOMPONENT_H #include "notification/notificationcomponent.thpp" #include "icinga/service.hpp" #include "base/configobject.hpp" #include "base/timer.hpp" namespace icinga { /** * @ingroup notification */ class NotificationComponent : public ObjectImpl<NotificationComponent> { public: DECLARE_OBJECT(NotificationComponent); DECLARE_OBJECTNAME(NotificationComponent); static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata); virtual void Start(void) override; private: Timer::Ptr m_NotificationTimer; void NotificationTimerHandler(void); void SendNotificationsHandler(const Checkable::Ptr& checkable, NotificationType type, const CheckResult::Ptr& cr, const String& author, const String& text); }; } #endif /* NOTIFICATIONCOMPONENT_H */
gpl-2.0
kratuna/kipi-plugins
metadataedit/xmp/xmpcategories.cpp
10674
/* ============================================================ * * This file is a part of kipi-plugins project * http://www.digikam.org * * Date : 2007-10-16 * Description : XMP categories settings page. * * Copyright (C) 2007-2012 by Gilles Caulier <caulier dot gilles at gmail dot com> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #include "xmpcategories.moc" // Qt includes #include <QCheckBox> #include <QPushButton> #include <QGridLayout> // KDE includes #include <kdialog.h> #include <kiconloader.h> #include <klineedit.h> #include <klistwidget.h> #include <klocale.h> // Local includes #include "kpmetadata.h" using namespace KIPIPlugins; namespace KIPIMetadataEditPlugin { class XMPCategories::XMPCategoriesPriv { public: XMPCategoriesPriv() { addSubCategoryButton = 0; delSubCategoryButton = 0; repSubCategoryButton = 0; subCategoriesBox = 0; subCategoriesCheck = 0; categoryCheck = 0; categoryEdit = 0; subCategoryEdit = 0; } QStringList oldSubCategories; QPushButton* addSubCategoryButton; QPushButton* delSubCategoryButton; QPushButton* repSubCategoryButton; QCheckBox* subCategoriesCheck; QCheckBox* categoryCheck; KLineEdit* categoryEdit; KLineEdit* subCategoryEdit; KListWidget* subCategoriesBox; }; XMPCategories::XMPCategories(QWidget* const parent) : QWidget(parent), d(new XMPCategoriesPriv) { QGridLayout* grid = new QGridLayout(this); // -------------------------------------------------------- d->categoryCheck = new QCheckBox(i18n("Identify subject of content (3 chars max):"), this); d->categoryEdit = new KLineEdit(this); d->categoryEdit->setClearButtonShown(true); d->categoryEdit->setMaxLength(3); d->categoryEdit->setWhatsThis(i18n("Set here the category of content. This field is limited " "to 3 characters.")); d->subCategoriesCheck = new QCheckBox(i18n("Supplemental categories:"), this); d->subCategoryEdit = new KLineEdit(this); d->subCategoryEdit->setClearButtonShown(true); d->subCategoryEdit->setWhatsThis(i18n("Enter here a new supplemental category of content.")); d->subCategoriesBox = new KListWidget(this); d->subCategoriesBox->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); d->addSubCategoryButton = new QPushButton( i18n("&Add"), this); d->delSubCategoryButton = new QPushButton( i18n("&Delete"), this); d->repSubCategoryButton = new QPushButton( i18n("&Replace"), this); d->addSubCategoryButton->setIcon(SmallIcon("list-add")); d->delSubCategoryButton->setIcon(SmallIcon("edit-delete")); d->repSubCategoryButton->setIcon(SmallIcon("view-refresh")); d->delSubCategoryButton->setEnabled(false); d->repSubCategoryButton->setEnabled(false); // -------------------------------------------------------- grid->setAlignment( Qt::AlignTop ); grid->addWidget(d->categoryCheck, 0, 0, 1, 2); grid->addWidget(d->categoryEdit, 0, 2, 1, 1); grid->addWidget(d->subCategoriesCheck, 1, 0, 1, 3); grid->addWidget(d->subCategoryEdit, 2, 0, 1, 3); grid->addWidget(d->subCategoriesBox, 3, 0, 5, 3); grid->addWidget(d->addSubCategoryButton, 3, 3, 1, 1); grid->addWidget(d->delSubCategoryButton, 4, 3, 1, 1); grid->addWidget(d->repSubCategoryButton, 5, 3, 1, 1); grid->setColumnStretch(1, 10); grid->setRowStretch(6, 10); grid->setMargin(0); grid->setSpacing(KDialog::spacingHint()); // -------------------------------------------------------- connect(d->categoryCheck, SIGNAL(toggled(bool)), d->categoryEdit, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->subCategoriesBox, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->subCategoriesCheck, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->subCategoryEdit, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->addSubCategoryButton, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->delSubCategoryButton, SLOT(setEnabled(bool))); connect(d->categoryCheck, SIGNAL(toggled(bool)), d->repSubCategoryButton, SLOT(setEnabled(bool))); // -------------------------------------------------------- connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), d->subCategoryEdit, SLOT(setEnabled(bool))); connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), d->subCategoriesBox, SLOT(setEnabled(bool))); connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), d->addSubCategoryButton, SLOT(setEnabled(bool))); connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), d->delSubCategoryButton, SLOT(setEnabled(bool))); connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), d->repSubCategoryButton, SLOT(setEnabled(bool))); // -------------------------------------------------------- connect(d->subCategoriesBox, SIGNAL(itemSelectionChanged()), this, SLOT(slotCategorySelectionChanged())); connect(d->addSubCategoryButton, SIGNAL(clicked()), this, SLOT(slotAddCategory())); connect(d->delSubCategoryButton, SIGNAL(clicked()), this, SLOT(slotDelCategory())); connect(d->repSubCategoryButton, SIGNAL(clicked()), this, SLOT(slotRepCategory())); // -------------------------------------------------------- connect(d->categoryCheck, SIGNAL(toggled(bool)), this, SIGNAL(signalModified())); connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), this, SIGNAL(signalModified())); connect(d->addSubCategoryButton, SIGNAL(clicked()), this, SIGNAL(signalModified())); connect(d->delSubCategoryButton, SIGNAL(clicked()), this, SIGNAL(signalModified())); connect(d->repSubCategoryButton, SIGNAL(clicked()), this, SIGNAL(signalModified())); connect(d->categoryEdit, SIGNAL(textChanged(QString)), this, SIGNAL(signalModified())); } XMPCategories::~XMPCategories() { delete d; } void XMPCategories::slotDelCategory() { QListWidgetItem *item = d->subCategoriesBox->currentItem(); if (!item) return; d->subCategoriesBox->takeItem(d->subCategoriesBox->row(item)); delete item; } void XMPCategories::slotRepCategory() { QString newCategory = d->subCategoryEdit->text(); if (newCategory.isEmpty()) return; if (!d->subCategoriesBox->selectedItems().isEmpty()) { d->subCategoriesBox->selectedItems()[0]->setText(newCategory); d->subCategoryEdit->clear(); } } void XMPCategories::slotCategorySelectionChanged() { if (!d->subCategoriesBox->selectedItems().isEmpty()) { d->subCategoryEdit->setText(d->subCategoriesBox->selectedItems()[0]->text()); d->delSubCategoryButton->setEnabled(true); d->repSubCategoryButton->setEnabled(true); } else { d->delSubCategoryButton->setEnabled(false); d->repSubCategoryButton->setEnabled(false); } } void XMPCategories::slotAddCategory() { QString newCategory = d->subCategoryEdit->text(); if (newCategory.isEmpty()) return; bool found = false; for (int i = 0 ; i < d->subCategoriesBox->count(); ++i) { QListWidgetItem *item = d->subCategoriesBox->item(i); if (newCategory == item->text()) { found = true; break; } } if (!found) { d->subCategoriesBox->insertItem(d->subCategoriesBox->count(), newCategory); d->subCategoryEdit->clear(); } } void XMPCategories::readMetadata(QByteArray& xmpData) { blockSignals(true); KPMetadata meta; meta.setXmp(xmpData); QString data; // In first we handle all sub-categories. d->subCategoriesBox->clear(); d->subCategoriesCheck->setChecked(false); d->oldSubCategories = meta.getXmpSubCategories(); if (!d->oldSubCategories.isEmpty()) { d->subCategoriesBox->insertItems(0, d->oldSubCategories); d->subCategoriesCheck->setChecked(true); } // And in second, the main category because all sub-categories status depend of this one. d->categoryEdit->clear(); d->categoryCheck->setChecked(false); data = meta.getXmpTagString("Xmp.photoshop.Category", false); if (!data.isNull()) { d->categoryEdit->setText(data); d->categoryCheck->setChecked(true); } d->categoryEdit->setEnabled(d->categoryCheck->isChecked()); d->subCategoriesCheck->setEnabled(d->categoryCheck->isChecked()); d->subCategoryEdit->setEnabled(d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()); d->subCategoriesBox->setEnabled(d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()); d->addSubCategoryButton->setEnabled(d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()); d->delSubCategoryButton->setEnabled(d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()); blockSignals(false); } void XMPCategories::applyMetadata(QByteArray& xmpData) { QStringList newCategories; KPMetadata meta; meta.setXmp(xmpData); if (d->categoryCheck->isChecked()) meta.setXmpTagString("Xmp.photoshop.Category", d->categoryEdit->text()); else meta.removeXmpTag("Xmp.photoshop.Category"); for (int i = 0 ; i < d->subCategoriesBox->count(); ++i) { QListWidgetItem *item = d->subCategoriesBox->item(i); newCategories.append(item->text()); } // We remove in first all existing sub-categories. meta.removeXmpTag("Xmp.photoshop.SupplementalCategories"); // And add new list if necessary. if (d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()) meta.setXmpSubCategories(newCategories); xmpData = meta.getXmp(); } } // namespace KIPIMetadataEditPlugin
gpl-2.0
bloyl/fieldtrip
realtime/src/acquisition/emotiv/emotiv2ft.cc
4844
#include <iostream> #include <fstream> #include <conio.h> #include <sstream> #include <windows.h> #include <map> #include <OnlineDataManager.h> #include <ConsoleInput.h> #include <StringServer.h> #include "edk.h" #include "edkErrorCode.h" #define TOTAL_CHANNELS 22 EE_DataChannel_t targetChannelList[TOTAL_CHANNELS] = { ED_COUNTER, ED_AF3, ED_F7, ED_F3, ED_FC5, ED_T7, ED_P7, ED_O1, ED_O2, ED_P8, ED_T8, ED_FC6, ED_F4, ED_F8, ED_AF4, ED_GYROX, ED_GYROY, ED_TIMESTAMP, ED_FUNC_ID, ED_FUNC_VALUE, ED_MARKER, ED_SYNC_SIGNAL }; /* const char *labels[TOTAL_CHANNELS] = { "COUNTER", "AF3", "F7", "F3", "FC5", "T7", "P7", "O1", "O2", "P8", "T8", "FC6", "F4", "F8", "AF4", "GYROX", "GYROY", "TIMESTAMP", "FUNC_ID", "FUNC_VALUE", "MARKER", "SYNC_SIGNAL" }; */ EmoEngineEventHandle eEvent; EmoStateHandle eState; unsigned int userID = 0; int port, ctrlPort; char hostname[256]; StringServer ctrlServ; ConsoleInput conIn; void acquisition(const char *configFile, unsigned int fSample) { int sampleCounter = 0; OnlineDataManager<double, double> ODM(0, TOTAL_CHANNELS, (float) fSample); if (ODM.configureFromFile(configFile) != 0) { fprintf(stderr, "Configuration %s file is invalid\n", configFile); return; } else { printf("Streaming %i out of %i channels\n", ODM.getSignalConfiguration().getStreamingSelection().getSize(), TOTAL_CHANNELS); } if (!strcmp(hostname, "-")) { if (!ODM.useOwnServer(port)) { fprintf(stderr, "Could not spawn buffer server on port %d.\n",port); return; } } else { if (!ODM.connectToServer(hostname, port)) { fprintf(stderr, "Could not connect to buffer server at %s:%d.\n",hostname, port); return; } } ODM.enableStreaming(); DataHandle hData = EE_DataCreate(); EE_DataSetBufferSizeInSec(1.0); printf("Starting to transfer data - press [Escape] to quit\n"); while (1) { if (conIn.checkKey() && conIn.getKey()==27) break; ctrlServ.checkRequests(ODM); EE_DataUpdateHandle(0, hData); unsigned int nSamplesTaken=0; EE_DataGetNumberOfSample(hData,&nSamplesTaken); if (nSamplesTaken != 0) { double* data = new double[nSamplesTaken]; double* dest = ODM.provideBlock(nSamplesTaken); for (int i=0;i<TOTAL_CHANNELS;i++) { EE_DataGet(hData, targetChannelList[i], data, nSamplesTaken); for (unsigned int j=0;j<nSamplesTaken;j++) { dest[i + j*TOTAL_CHANNELS] = data[j]; } } delete[] data; if (!ODM.handleBlock()) break; sampleCounter += nSamplesTaken; printf("Wrote %2i samples (%i total)\n", nSamplesTaken, sampleCounter); } Sleep(10); } EE_DataFree(hData); } int main(int argc, char** argv) { //const unsigned short composerPort = 1726; unsigned int samplingRate = 0; if (argc<2) { fprintf(stderr, "Usage: emotiv2ft <config-file> [hostname=localhost [port=1972 [ctrlPort=8000]]]\n"); fprintf(stderr, "Passing a minus (-) for the hostname tells this application to spawn its own buffer server\n"); return 1; } if (argc>2) { strncpy(hostname, argv[2], sizeof(hostname)); } else { strcpy(hostname, "localhost"); } if (argc>3) { port = atoi(argv[3]); } else { port = 1972; } if (argc>4) { ctrlPort = atoi(argv[4]); } else { ctrlPort = 8000; } if (!ctrlServ.startListening(ctrlPort)) { fprintf(stderr, "Cannot listen on port %d for configuration commands\n", ctrlPort); return 1; } eEvent = EE_EmoEngineEventCreate(); eState = EE_EmoStateCreate(); if (EE_EngineConnect() != EDK_OK) { fprintf(stderr, "Emotiv Engine start up failed."); exit(1); } // TODO: provide alternative connection // ... if (EE_EngineRemoteConnect(input.c_str(), composerPort) != EDK_OK) { // Loop here until acquisition can start and sampling rate is known printf("Waiting for the device to become ready - press [Escape] to quit\n"); while (1) { int state = EE_EngineGetNextEvent(eEvent); if (state == EDK_OK) { EE_Event_t eventType = EE_EmoEngineEventGetType(eEvent); EE_EmoEngineEventGetUserId(eEvent, &userID); // Log the EmoState if it has been updated if (eventType == EE_UserAdded) { if (EE_DataGetSamplingRate(userID, &samplingRate) != EDK_OK) { fprintf(stderr, "Cannot retrieve sampling rate\n"); break; } else { EE_DataAcquisitionEnable(userID,true); printf("EDK: User added, will now start acquisition.\n"); } break; } } if (conIn.checkKey() && conIn.getKey()==27) break; } if (samplingRate!=0) { acquisition(argv[1], samplingRate); } EE_EngineDisconnect(); EE_EmoStateFree(eState); EE_EmoEngineEventFree(eEvent); return 0; }
gpl-2.0
atodorov/pykickstart
tests/commands/install.py
2107
# # Alexander Todorov <[email protected]> # # Copyright 2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat # trademarks that are incorporated in the source code or documentation are not # subject to the GNU General Public License and may only be used or replicated # with the express permission of Red Hat, Inc. # import unittest from pykickstart.base import DeprecatedCommand from tests.baseclass import CommandTest class F20_TestCase(CommandTest): command = "install" def runTest(self): # pass self.assert_parse("install", "install\n") self.assert_parse("install", "install\n") self.assert_parse("install --root-device=/dev/sda", "install\n") # upgrade is always false cmd = self.handler().commands[self.command] cmd.parse([]) self.assertFalse(cmd.upgrade) # fail self.assert_parse_error("install --bad-flag") # --root-device requires argument self.assert_parse_error("install --root-device") self.assert_parse_error("install --root-device=\"\"") class F29_TestCase(F20_TestCase): def runTest(self): # make sure we've been deprecated parser = self.getParser("install") self.assertTrue(issubclass(parser.__class__, DeprecatedCommand)) # make sure we are still able to parse it self.assert_parse("install") class RHEL8_TestCase(F29_TestCase): pass if __name__ == "__main__": unittest.main()
gpl-2.0
prisciou/android_kernel_wiko_s9321
drivers/mmc/host/sdhci.c
94250
/* * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface driver * * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved. * Copyright (c) 2013-2014, NVIDIA CORPORATION. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * Thanks to the following companies for their support: * * - JMicron (hardware and technical support) */ #include <linux/delay.h> #include <linux/highmem.h> #include <linux/io.h> #include <linux/module.h> #include <linux/dma-mapping.h> #include <linux/slab.h> #include <linux/scatterlist.h> #include <linux/regulator/consumer.h> #include <linux/pm_runtime.h> #include <linux/platform_device.h> #include <linux/leds.h> #include <linux/mmc/mmc.h> #include <linux/mmc/host.h> #include <linux/mmc/card.h> #include <linux/edp.h> #include "sdhci.h" #ifdef CONFIG_TEGRA_PRE_SILICON_SUPPORT #include <mach/hardware.h> #endif #define DRIVER_NAME "sdhci" #define DBG(f, x...) \ pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) #if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ defined(CONFIG_MMC_SDHCI_MODULE)) #define SDHCI_USE_LEDS_CLASS #endif #define MAX_TUNING_LOOP 40 #define CLK_GATING_TICK_TMOUT (HZ / 50) #define IS_SDIO_CARD_OR_EMMC(host) \ (host->mmc->card && \ ((host->mmc->card->type == MMC_TYPE_SDIO) || \ (host->mmc->card->type == MMC_TYPE_MMC))) #define IS_DELAYED_CLK_GATE(host) \ ((host->quirks2 & SDHCI_QUIRK2_DELAYED_CLK_GATE) && \ (IS_SDIO_CARD_OR_EMMC(host)) && \ (host->mmc->caps2 & MMC_CAP2_CLOCK_GATING)) static unsigned int debug_quirks = 0; static unsigned int debug_quirks2; static void sdhci_finish_data(struct sdhci_host *); static void sdhci_send_command(struct sdhci_host *, struct mmc_command *); static void sdhci_finish_command(struct sdhci_host *); static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode); static void sdhci_tuning_timer(unsigned long data); #ifdef CONFIG_PM_RUNTIME static int sdhci_runtime_pm_get(struct sdhci_host *host); static int sdhci_runtime_pm_put(struct sdhci_host *host); #else static inline int sdhci_runtime_pm_get(struct sdhci_host *host) { return 0; } static inline int sdhci_runtime_pm_put(struct sdhci_host *host) { return 0; } #endif static void sdhci_dumpregs(struct sdhci_host *host) { pr_err(DRIVER_NAME ": =========== REGISTER DUMP (%s)===========\n", mmc_hostname(host->mmc)); pr_err(DRIVER_NAME ": Sys addr: 0x%08x | Version: 0x%08x\n", sdhci_readl(host, SDHCI_DMA_ADDRESS), sdhci_readw(host, SDHCI_HOST_VERSION)); pr_err(DRIVER_NAME ": Blk size: 0x%08x | Blk cnt: 0x%08x\n", sdhci_readw(host, SDHCI_BLOCK_SIZE), sdhci_readw(host, SDHCI_BLOCK_COUNT)); pr_err(DRIVER_NAME ": Argument: 0x%08x | Trn mode: 0x%08x\n", sdhci_readl(host, SDHCI_ARGUMENT), sdhci_readw(host, SDHCI_TRANSFER_MODE)); pr_err(DRIVER_NAME ": Present: 0x%08x | Host ctl: 0x%08x\n", sdhci_readl(host, SDHCI_PRESENT_STATE), sdhci_readb(host, SDHCI_HOST_CONTROL)); pr_err(DRIVER_NAME ": Power: 0x%08x | Blk gap: 0x%08x\n", sdhci_readb(host, SDHCI_POWER_CONTROL), sdhci_readb(host, SDHCI_BLOCK_GAP_CONTROL)); pr_err(DRIVER_NAME ": Wake-up: 0x%08x | Clock: 0x%08x\n", sdhci_readb(host, SDHCI_WAKE_UP_CONTROL), sdhci_readw(host, SDHCI_CLOCK_CONTROL)); pr_err(DRIVER_NAME ": Timeout: 0x%08x | Int stat: 0x%08x\n", sdhci_readb(host, SDHCI_TIMEOUT_CONTROL), sdhci_readl(host, SDHCI_INT_STATUS)); pr_err(DRIVER_NAME ": Int enab: 0x%08x | Sig enab: 0x%08x\n", sdhci_readl(host, SDHCI_INT_ENABLE), sdhci_readl(host, SDHCI_SIGNAL_ENABLE)); pr_err(DRIVER_NAME ": AC12 err: 0x%08x | Slot int: 0x%08x\n", sdhci_readw(host, SDHCI_ACMD12_ERR), sdhci_readw(host, SDHCI_SLOT_INT_STATUS)); pr_err(DRIVER_NAME ": Caps: 0x%08x | Caps_1: 0x%08x\n", sdhci_readl(host, SDHCI_CAPABILITIES), sdhci_readl(host, SDHCI_CAPABILITIES_1)); pr_err(DRIVER_NAME ": Cmd: 0x%08x | Max curr: 0x%08x\n", sdhci_readw(host, SDHCI_COMMAND), sdhci_readl(host, SDHCI_MAX_CURRENT)); pr_err(DRIVER_NAME ": Host ctl2: 0x%08x\n", sdhci_readw(host, SDHCI_HOST_CONTROL2)); if (host->flags & SDHCI_USE_ADMA) pr_err(DRIVER_NAME ": ADMA Err: 0x%08x | ADMA Ptr: 0x%08x\n", readl(host->ioaddr + SDHCI_ADMA_ERROR), readl(host->ioaddr + SDHCI_ADMA_ADDRESS)); pr_err(DRIVER_NAME ": ===========================================\n"); } /*****************************************************************************\ * * * Low level functions * * * \*****************************************************************************/ static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) { u32 ier; ier = sdhci_readl(host, SDHCI_INT_ENABLE); ier &= ~clear; ier |= set; sdhci_writel(host, ier, SDHCI_INT_ENABLE); sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE); } static void sdhci_unmask_irqs(struct sdhci_host *host, u32 irqs) { sdhci_clear_set_irqs(host, 0, irqs); } static void sdhci_mask_irqs(struct sdhci_host *host, u32 irqs) { sdhci_clear_set_irqs(host, irqs, 0); } static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) { u32 present, irqs; if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || (host->mmc->caps & MMC_CAP_NONREMOVABLE)) return; present = sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT; irqs = present ? SDHCI_INT_CARD_REMOVE : SDHCI_INT_CARD_INSERT; if (enable) sdhci_unmask_irqs(host, irqs); else sdhci_mask_irqs(host, irqs); } static void sdhci_enable_card_detection(struct sdhci_host *host) { sdhci_set_card_detection(host, true); } static void sdhci_disable_card_detection(struct sdhci_host *host) { sdhci_set_card_detection(host, false); } static void sdhci_reset(struct sdhci_host *host, u8 mask) { unsigned long timeout; u32 uninitialized_var(ier); if (host->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) return; } if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET) ier = sdhci_readl(host, SDHCI_INT_ENABLE); if (host->ops->platform_reset_enter) host->ops->platform_reset_enter(host, mask); sdhci_writeb(host, mask, SDHCI_SOFTWARE_RESET); if (mask & SDHCI_RESET_ALL) host->clock = 0; /* Wait max 100 ms */ timeout = 100; /* hw clears the bit when it's done */ while (sdhci_readb(host, SDHCI_SOFTWARE_RESET) & mask) { if (timeout == 0) { pr_err("%s: Reset 0x%x never completed.\n", mmc_hostname(host->mmc), (int)mask); sdhci_dumpregs(host); return; } timeout--; mdelay(1); } if (host->ops->platform_reset_exit) host->ops->platform_reset_exit(host, mask); if (host->quirks & SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET) sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier); if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { if ((host->ops->enable_dma) && (mask & SDHCI_RESET_ALL)) host->ops->enable_dma(host); } } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); static void sdhci_init(struct sdhci_host *host, int soft) { if (soft) sdhci_reset(host, SDHCI_RESET_CMD|SDHCI_RESET_DATA); else sdhci_reset(host, SDHCI_RESET_ALL); sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE); if (soft) { /* force clock reconfiguration */ host->clock = 0; sdhci_set_ios(host->mmc, &host->mmc->ios); } } static void sdhci_reinit(struct sdhci_host *host) { sdhci_init(host, 0); sdhci_enable_card_detection(host); } static void sdhci_activate_led(struct sdhci_host *host) { u8 ctrl; ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl |= SDHCI_CTRL_LED; sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } static void sdhci_deactivate_led(struct sdhci_host *host) { u8 ctrl; ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl &= ~SDHCI_CTRL_LED; sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } #ifdef SDHCI_USE_LEDS_CLASS static void sdhci_led_control(struct led_classdev *led, enum led_brightness brightness) { struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; spin_lock_irqsave(&host->lock, flags); if (host->runtime_suspended) goto out; if (brightness == LED_OFF) sdhci_deactivate_led(host); else sdhci_activate_led(host); out: spin_unlock_irqrestore(&host->lock, flags); } #endif /*****************************************************************************\ * * * Core functions * * * \*****************************************************************************/ static void sdhci_read_block_pio(struct sdhci_host *host) { unsigned long flags; size_t blksize, len, chunk; u32 uninitialized_var(scratch); u8 *buf; DBG("PIO reading\n"); blksize = host->data->blksz; chunk = 0; local_irq_save(flags); while (blksize) { if (!sg_miter_next(&host->sg_miter)) BUG(); len = min(host->sg_miter.length, blksize); blksize -= len; host->sg_miter.consumed = len; buf = host->sg_miter.addr; while (len) { if (chunk == 0) { scratch = sdhci_readl(host, SDHCI_BUFFER); chunk = 4; } *buf = scratch & 0xFF; buf++; scratch >>= 8; chunk--; len--; } } sg_miter_stop(&host->sg_miter); local_irq_restore(flags); } static void sdhci_write_block_pio(struct sdhci_host *host) { unsigned long flags; size_t blksize, len, chunk; u32 scratch; u8 *buf; DBG("PIO writing\n"); blksize = host->data->blksz; chunk = 0; scratch = 0; local_irq_save(flags); while (blksize) { if (!sg_miter_next(&host->sg_miter)) BUG(); len = min(host->sg_miter.length, blksize); blksize -= len; host->sg_miter.consumed = len; buf = host->sg_miter.addr; while (len) { scratch |= (u32)*buf << (chunk * 8); buf++; chunk++; len--; if ((chunk == 4) || ((len == 0) && (blksize == 0))) { sdhci_writel(host, scratch, SDHCI_BUFFER); chunk = 0; scratch = 0; } } } sg_miter_stop(&host->sg_miter); local_irq_restore(flags); } static void sdhci_transfer_pio(struct sdhci_host *host) { u32 mask; BUG_ON(!host->data); if (host->blocks == 0) return; if (host->data->flags & MMC_DATA_READ) mask = SDHCI_DATA_AVAILABLE; else mask = SDHCI_SPACE_AVAILABLE; /* * Some controllers (JMicron JMB38x) mess up the buffer bits * for transfers < 4 bytes. As long as it is just one block, * we can ignore the bits. */ if ((host->quirks & SDHCI_QUIRK_BROKEN_SMALL_PIO) && (host->data->blocks == 1)) mask = ~0; while (sdhci_readl(host, SDHCI_PRESENT_STATE) & mask) { if (host->quirks & SDHCI_QUIRK_PIO_NEEDS_DELAY) udelay(100); if (host->data->flags & MMC_DATA_READ) sdhci_read_block_pio(host); else sdhci_write_block_pio(host); host->blocks--; if (host->blocks == 0) break; } DBG("PIO transfer complete.\n"); } static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags) { local_irq_save(*flags); return kmap_atomic(sg_page(sg)) + sg->offset; } static void sdhci_kunmap_atomic(void *buffer, unsigned long *flags) { kunmap_atomic(buffer); local_irq_restore(*flags); } static void sdhci_set_adma_desc(u8 *desc, u32 addr, int len, unsigned cmd) { __le32 *dataddr = (__le32 __force *)(desc + 4); __le16 *cmdlen = (__le16 __force *)desc; /* SDHCI specification says ADMA descriptors should be 4 byte * aligned, so using 16 or 32bit operations should be safe. */ cmdlen[0] = cpu_to_le16(cmd); cmdlen[1] = cpu_to_le16(len); dataddr[0] = cpu_to_le32(addr); } static int sdhci_adma_table_pre(struct sdhci_host *host, struct mmc_data *data) { int direction; u8 *desc; u8 *align; dma_addr_t addr; dma_addr_t align_addr; int len, offset; struct scatterlist *sg; int i; char *buffer; unsigned long flags; /* * The spec does not specify endianness of descriptor table. * We currently guess that it is LE. */ if (data->flags & MMC_DATA_READ) direction = DMA_FROM_DEVICE; else direction = DMA_TO_DEVICE; /* * The ADMA descriptor table is mapped further down as we * need to fill it with data first. */ if (!host->use_dma_alloc) { host->align_addr = dma_map_single(mmc_dev(host->mmc), host->align_buffer, 128 * 4, direction); if (dma_mapping_error(mmc_dev(host->mmc), host->align_addr)) goto fail; BUG_ON(host->align_addr & 0x3); } host->sg_count = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, direction); if (host->sg_count == 0) goto unmap_align; desc = host->adma_desc; align = host->align_buffer; align_addr = host->align_addr; for_each_sg(data->sg, sg, host->sg_count, i) { addr = sg_dma_address(sg); len = sg_dma_len(sg); /* * The SDHCI specification states that ADMA * addresses must be 32-bit aligned. If they * aren't, then we use a bounce buffer for * the (up to three) bytes that screw up the * alignment. */ offset = (4 - (addr & 0x3)) & 0x3; if (offset) { if (data->flags & MMC_DATA_WRITE) { buffer = sdhci_kmap_atomic(sg, &flags); WARN_ON(((long)buffer & PAGE_MASK) > (PAGE_SIZE - 3)); memcpy(align, buffer, offset); sdhci_kunmap_atomic(buffer, &flags); } /* tran, valid */ sdhci_set_adma_desc(desc, align_addr, offset, 0x21); BUG_ON(offset > 65536); align += 4; align_addr += 4; desc += 8; addr += offset; len -= offset; } BUG_ON(len > 65536); /* tran, valid */ sdhci_set_adma_desc(desc, addr, len, 0x21); desc += 8; /* * If this triggers then we have a calculation bug * somewhere. :/ */ WARN_ON((desc - host->adma_desc) > (128 * 2 + 1) * 4); } if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) { /* * Mark the last descriptor as the terminating descriptor */ if (desc != host->adma_desc) { desc -= 8; desc[0] |= 0x2; /* end */ } } else { /* * Add a terminating entry. */ /* nop, end, valid */ sdhci_set_adma_desc(desc, 0, 0, 0x3); } /* * Resync align buffer as we might have changed it. */ if (data->flags & MMC_DATA_WRITE) { dma_sync_single_for_device(mmc_dev(host->mmc), host->align_addr, 128 * 4, direction); } if (!host->use_dma_alloc) { host->adma_addr = dma_map_single(mmc_dev(host->mmc), host->adma_desc, (128 * 2 + 1) * 4, DMA_TO_DEVICE); if (dma_mapping_error(mmc_dev(host->mmc), host->adma_addr)) goto unmap_entries; BUG_ON(host->adma_addr & 0x3); } return 0; unmap_entries: dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, direction); unmap_align: if (!host->use_dma_alloc) dma_unmap_single(mmc_dev(host->mmc), host->align_addr, 128 * 4, direction); fail: return -EINVAL; } static void sdhci_adma_table_post(struct sdhci_host *host, struct mmc_data *data) { int direction; struct scatterlist *sg; int i, size; u8 *align; char *buffer; unsigned long flags; if (data->flags & MMC_DATA_READ) direction = DMA_FROM_DEVICE; else direction = DMA_TO_DEVICE; if (!host->use_dma_alloc) { dma_unmap_single(mmc_dev(host->mmc), host->adma_addr, (128 * 2 + 1) * 4, DMA_TO_DEVICE); dma_unmap_single(mmc_dev(host->mmc), host->align_addr, 128 * 4, direction); } if (data->flags & MMC_DATA_READ) { dma_sync_sg_for_cpu(mmc_dev(host->mmc), data->sg, data->sg_len, direction); align = host->align_buffer; for_each_sg(data->sg, sg, host->sg_count, i) { if (sg_dma_address(sg) & 0x3) { size = 4 - (sg_dma_address(sg) & 0x3); buffer = sdhci_kmap_atomic(sg, &flags); WARN_ON(((long)buffer & PAGE_MASK) > (PAGE_SIZE - 3)); memcpy(buffer, align, size); sdhci_kunmap_atomic(buffer, &flags); align += 4; } } } dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, direction); } static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) { u8 count; struct mmc_data *data = cmd->data; unsigned target_timeout, current_timeout; /* * If the host controller provides us with an incorrect timeout * value, just skip the check and use 0xE. The hardware may take * longer to time out, but that's much better than having a too-short * timeout value. */ if (host->quirks & SDHCI_QUIRK_BROKEN_TIMEOUT_VAL) return 0xE; /* Unspecified timeout, assume max */ if (!data && !cmd->cmd_timeout_ms) return 0xE; /* timeout in us */ if (!data) target_timeout = cmd->cmd_timeout_ms * 1000; else { target_timeout = data->timeout_ns / 1000; if (host->clock) target_timeout += data->timeout_clks / host->clock; } /* * Figure out needed cycles. * We do this in steps in order to fit inside a 32 bit int. * The first step is the minimum timeout, which will have a * minimum resolution of 6 bits: * (1) 2^13*1000 > 2^22, * (2) host->timeout_clk < 2^16 * => * (1) / (2) > 2^6 */ count = 0; current_timeout = (1 << 13) * 1000 / host->timeout_clk; while (current_timeout < target_timeout) { count++; current_timeout <<= 1; if (count >= 0xF) break; } if (count >= 0xF) count = 0xE; return count; } static void sdhci_set_transfer_irqs(struct sdhci_host *host) { u32 pio_irqs = SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL; u32 dma_irqs = SDHCI_INT_DMA_END | SDHCI_INT_ADMA_ERROR; if (host->flags & SDHCI_REQ_USE_DMA) sdhci_clear_set_irqs(host, pio_irqs, dma_irqs); else sdhci_clear_set_irqs(host, dma_irqs, pio_irqs); } static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) { u8 count; u8 ctrl; struct mmc_data *data = cmd->data; int ret; WARN_ON(host->data); if (data || (cmd->flags & MMC_RSP_BUSY)) { count = sdhci_calc_timeout(host, cmd); sdhci_writeb(host, count, SDHCI_TIMEOUT_CONTROL); } if (!data) return; /* Sanity checks */ BUG_ON(data->blksz * data->blocks > 524288); BUG_ON(data->blksz > host->mmc->max_blk_size); BUG_ON(data->blocks > 65535); host->data = data; host->data_early = 0; host->data->bytes_xfered = 0; if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) host->flags |= SDHCI_REQ_USE_DMA; /* * FIXME: This doesn't account for merging when mapping the * scatterlist. */ if (host->flags & SDHCI_REQ_USE_DMA) { int broken, i; struct scatterlist *sg; broken = 0; if (host->flags & SDHCI_USE_ADMA) { if (host->quirks & SDHCI_QUIRK_32BIT_ADMA_SIZE) broken = 1; } else { if (host->quirks & SDHCI_QUIRK_32BIT_DMA_SIZE) broken = 1; } if (unlikely(broken)) { for_each_sg(data->sg, sg, data->sg_len, i) { if (sg->length & 0x3) { DBG("Reverting to PIO because of " "transfer size (%d)\n", sg->length); host->flags &= ~SDHCI_REQ_USE_DMA; break; } } } } /* * The assumption here being that alignment is the same after * translation to device address space. */ if (host->flags & SDHCI_REQ_USE_DMA) { int broken, i; struct scatterlist *sg; broken = 0; if (host->flags & SDHCI_USE_ADMA) { /* * As we use 3 byte chunks to work around * alignment problems, we need to check this * quirk. */ if (host->quirks & SDHCI_QUIRK_32BIT_ADMA_SIZE) broken = 1; } else { if (host->quirks & SDHCI_QUIRK_32BIT_DMA_ADDR) broken = 1; } if (unlikely(broken)) { for_each_sg(data->sg, sg, data->sg_len, i) { if (sg->offset & 0x3) { DBG("Reverting to PIO because of " "bad alignment\n"); host->flags &= ~SDHCI_REQ_USE_DMA; break; } } } } if (host->flags & SDHCI_REQ_USE_DMA) { if (host->flags & SDHCI_USE_ADMA) { ret = sdhci_adma_table_pre(host, data); if (ret) { /* * This only happens when someone fed * us an invalid request. */ WARN_ON(1); host->flags &= ~SDHCI_REQ_USE_DMA; } else { sdhci_writel(host, host->adma_addr, SDHCI_ADMA_ADDRESS); } } else { int sg_cnt; sg_cnt = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, (data->flags & MMC_DATA_READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); if (sg_cnt == 0) { /* * This only happens when someone fed * us an invalid request. */ WARN_ON(1); host->flags &= ~SDHCI_REQ_USE_DMA; } else { WARN_ON(sg_cnt != 1); sdhci_writel(host, sg_dma_address(data->sg), SDHCI_DMA_ADDRESS); } } } /* * Always adjust the DMA selection as some controllers * (e.g. JMicron) can't do PIO properly when the selection * is ADMA. */ if (host->version >= SDHCI_SPEC_200) { ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl &= ~SDHCI_CTRL_DMA_MASK; if ((host->flags & SDHCI_REQ_USE_DMA) && (host->flags & SDHCI_USE_ADMA)) ctrl |= SDHCI_CTRL_ADMA32; else ctrl |= SDHCI_CTRL_SDMA; sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } if (!(host->flags & SDHCI_REQ_USE_DMA)) { int flags; flags = SG_MITER_ATOMIC; if (host->data->flags & MMC_DATA_READ) flags |= SG_MITER_TO_SG; else flags |= SG_MITER_FROM_SG; sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags); host->blocks = data->blocks; } sdhci_set_transfer_irqs(host); /* Set the DMA boundary value and block size */ sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG, data->blksz), SDHCI_BLOCK_SIZE); sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT); } static void sdhci_set_transfer_mode(struct sdhci_host *host, struct mmc_command *cmd) { u16 mode; struct mmc_data *data = cmd->data; if (data == NULL) return; WARN_ON(!host->data); mode = SDHCI_TRNS_BLK_CNT_EN; if (mmc_op_multi(cmd->opcode) || data->blocks > 1) { mode |= SDHCI_TRNS_MULTI; /* * If we are sending CMD23, CMD12 never gets sent * on successful completion (so no Auto-CMD12). */ if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12) && mmc_op_multi(cmd->opcode)) mode |= SDHCI_TRNS_AUTO_CMD12; else if (host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD23)) { mode |= SDHCI_TRNS_AUTO_CMD23; sdhci_writel(host, host->mrq->sbc->arg, SDHCI_ARGUMENT2); } } if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; if (host->flags & SDHCI_REQ_USE_DMA) mode |= SDHCI_TRNS_DMA; sdhci_writew(host, mode, SDHCI_TRANSFER_MODE); } static void sdhci_finish_data(struct sdhci_host *host) { struct mmc_data *data; BUG_ON(!host->data); data = host->data; host->data = NULL; if (host->flags & SDHCI_REQ_USE_DMA) { if (host->flags & SDHCI_USE_ADMA) sdhci_adma_table_post(host, data); else { dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, (data->flags & MMC_DATA_READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); } } /* * The specification states that the block count register must * be updated, but it does not specify at what point in the * data flow. That makes the register entirely useless to read * back so we have to assume that nothing made it to the card * in the event of an error. */ if (data->error) data->bytes_xfered = 0; else data->bytes_xfered = data->blksz * data->blocks; /* * Need to send CMD12 if - * a) open-ended multiblock transfer (no CMD23) * b) error in multiblock transfer */ if (data->stop && (data->error || !host->mrq->sbc)) { /* * The controller needs a reset of internal state machines * upon error conditions. */ if (data->error) { sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); } sdhci_send_command(host, data->stop); } else tasklet_schedule(&host->finish_tasklet); } static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) { int flags; u32 mask; unsigned long timeout; WARN_ON(host->cmd); /* Wait max 10 ms */ timeout = 10; mask = SDHCI_CMD_INHIBIT; if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) mask |= SDHCI_DATA_INHIBIT; /* We shouldn't wait for data inihibit for stop commands, even though they might use busy signaling */ if (host->mrq->data && (cmd == host->mrq->data->stop)) mask &= ~SDHCI_DATA_INHIBIT; while (sdhci_readl(host, SDHCI_PRESENT_STATE) & mask) { if (timeout == 0) { pr_err("%s: Controller never released " "inhibit bit(s).\n", mmc_hostname(host->mmc)); sdhci_dumpregs(host); cmd->error = -EIO; tasklet_schedule(&host->finish_tasklet); return; } timeout--; mdelay(1); } if ((cmd->opcode == MMC_SWITCH) && (((cmd->arg >> 16) & EXT_CSD_SANITIZE_START) == EXT_CSD_SANITIZE_START)) timeout = 100; else timeout = 10; mod_timer(&host->timer, jiffies + timeout * HZ); host->cmd = cmd; sdhci_prepare_data(host, cmd); sdhci_writel(host, cmd->arg, SDHCI_ARGUMENT); sdhci_set_transfer_mode(host, cmd); if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { pr_err("%s: Unsupported response type!\n", mmc_hostname(host->mmc)); cmd->error = -EINVAL; tasklet_schedule(&host->finish_tasklet); return; } if (!(cmd->flags & MMC_RSP_PRESENT)) flags = SDHCI_CMD_RESP_NONE; else if (cmd->flags & MMC_RSP_136) flags = SDHCI_CMD_RESP_LONG; else if (cmd->flags & MMC_RSP_BUSY) flags = SDHCI_CMD_RESP_SHORT_BUSY; else flags = SDHCI_CMD_RESP_SHORT; if (cmd->flags & MMC_RSP_CRC) flags |= SDHCI_CMD_CRC; if (cmd->flags & MMC_RSP_OPCODE) flags |= SDHCI_CMD_INDEX; /* CMD19, CMD21 is special in that the Data Present Select should be set */ if (cmd->data || cmd->opcode == MMC_SEND_TUNING_BLOCK || cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200) flags |= SDHCI_CMD_DATA; sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND); } static void sdhci_finish_command(struct sdhci_host *host) { int i; BUG_ON(host->cmd == NULL); if (host->cmd->flags & MMC_RSP_PRESENT) { if (host->cmd->flags & MMC_RSP_136) { /* CRC is stripped so we need to do some shifting. */ for (i = 0;i < 4;i++) { host->cmd->resp[i] = sdhci_readl(host, SDHCI_RESPONSE + (3-i)*4) << 8; if (i != 3) host->cmd->resp[i] |= sdhci_readb(host, SDHCI_RESPONSE + (3-i)*4-1); } } else { host->cmd->resp[0] = sdhci_readl(host, SDHCI_RESPONSE); } } host->cmd->error = 0; /* Finished CMD23, now send actual command. */ if (host->cmd == host->mrq->sbc) { host->cmd = NULL; sdhci_send_command(host, host->mrq->cmd); } else { /* Processed actual command. */ if (host->data && host->data_early) sdhci_finish_data(host); if (!host->cmd->data) tasklet_schedule(&host->finish_tasklet); host->cmd = NULL; } } static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) { int div = 0; /* Initialized for compiler warning */ int real_div = div, clk_mul = 1; u16 clk = 0; unsigned long timeout; u32 caps; if (clock && clock == host->clock) return; host->mmc->actual_clock = 0; if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) return; /* * If the entire clock control register is updated with zero, some * controllers might first update clock divisor fields and then update * the INT_CLK_EN and CARD_CLK_EN fields. Disable card clock first * to ensure there is no abnormal clock behavior. */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk &= ~SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); clk = 0; sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); if (clock == 0) goto out; if (host->version >= SDHCI_SPEC_300) { /* * Check if the Host Controller supports Programmable Clock * Mode. */ if (host->clk_mul) { u16 ctrl; /* * We need to figure out whether the Host Driver needs * to select Programmable Clock Mode, or the value can * be set automatically by the Host Controller based on * the Preset Value registers. */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (!(ctrl & SDHCI_CTRL_PRESET_VAL_ENABLE)) { for (div = 1; div <= 1024; div++) { if (((host->max_clk * host->clk_mul) / div) <= clock) break; } /* * Set Programmable Clock Mode in the Clock * Control register. */ clk = SDHCI_PROG_CLOCK_MODE; real_div = div; clk_mul = host->clk_mul; div--; } } else { /* Version 3.00 divisors must be a multiple of 2. */ if (host->max_clk <= clock) { if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50) div = 2; else div = 1; } else { for (div = 2; div < SDHCI_MAX_DIV_SPEC_300; div += 2) { if ((host->max_clk / div) <= clock) break; } } real_div = div; div >>= 1; } } else { /* Version 2.00 divisors must be a power of 2. */ for (div = 1; div < SDHCI_MAX_DIV_SPEC_200; div *= 2) { if ((host->max_clk / div) <= clock) break; } real_div = div; div >>= 1; } if (real_div) host->mmc->actual_clock = (host->max_clk * clk_mul) / real_div; #ifdef CONFIG_TEGRA_PRE_SILICON_SUPPORT if (tegra_platform_is_fpga() && clock > 400000) div = 1; #endif clk |= (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT; clk |= ((div & SDHCI_DIV_HI_MASK) >> SDHCI_DIV_MASK_LEN) << SDHCI_DIVIDER_HI_SHIFT; clk |= SDHCI_CLOCK_INT_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); /* * For Tegra3 sdmmc controller, internal clock will not be stable bit * will get set only after some other register write is done. To * handle, do a dummy reg write to the caps reg if * SDHCI_QUIRK2_INT_CLK_STABLE_REQ_DUMMY_REG_WRITE is set. */ if (host->quirks2 & SDHCI_QUIRK2_INT_CLK_STABLE_REQ_DUMMY_REG_WRITE) { udelay(5); caps = sdhci_readl(host, SDHCI_CAPABILITIES); caps |= 1; sdhci_writel(host, caps, SDHCI_CAPABILITIES); } /* Wait max 20 ms */ timeout = 20; while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) & SDHCI_CLOCK_INT_STABLE)) { if (timeout == 0) { pr_err("%s: Internal clock never " "stabilised.\n", mmc_hostname(host->mmc)); sdhci_dumpregs(host); return; } timeout--; mdelay(1); } clk |= SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); out: host->clock = clock; } static int sdhci_set_power(struct sdhci_host *host, unsigned short power) { u8 pwr = 0; if (power != (unsigned short)-1) { switch (1 << power) { case MMC_VDD_165_195: pwr = SDHCI_POWER_180; break; case MMC_VDD_29_30: case MMC_VDD_30_31: pwr = SDHCI_POWER_300; break; case MMC_VDD_32_33: case MMC_VDD_33_34: pwr = SDHCI_POWER_330; break; default: BUG(); } } if (host->pwr == pwr) return -1; host->pwr = pwr; if (pwr == 0) { sdhci_writeb(host, 0, SDHCI_POWER_CONTROL); return 0; } /* * Spec says that we should clear the power reg before setting * a new value. Some controllers don't seem to like this though. */ if (!(host->quirks & SDHCI_QUIRK_SINGLE_POWER_WRITE)) sdhci_writeb(host, 0, SDHCI_POWER_CONTROL); /* * At least the Marvell CaFe chip gets confused if we set the voltage * and set turn on power at the same time, so set the voltage first. */ if (host->quirks & SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER) sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); pwr |= SDHCI_POWER_ON; sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); /* * Some controllers need an extra 10ms delay of 10ms before they * can apply clock after applying power */ if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER) mdelay(10); return power; } /*****************************************************************************\ * * * MMC callbacks * * * \*****************************************************************************/ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) { struct sdhci_host *host; bool present; unsigned long flags; u32 tuning_opcode; host = mmc_priv(mmc); sdhci_runtime_pm_get(host); spin_lock_irqsave(&host->lock, flags); WARN_ON(host->mrq != NULL); #ifndef SDHCI_USE_LEDS_CLASS sdhci_activate_led(host); #endif /* * Ensure we don't send the STOP for non-SET_BLOCK_COUNTED * requests if Auto-CMD12 is enabled. */ if (!mrq->sbc && (host->flags & SDHCI_AUTO_CMD12)) { if (mrq->stop) { mrq->data->stop = NULL; mrq->stop = NULL; } } host->mrq = mrq; /* If polling, assume that the card is always present. */ if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) { if (host->ops->get_cd) present = host->ops->get_cd(host); else present = true; } else { present = sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT; } if (!present || host->flags & SDHCI_DEVICE_DEAD) { host->mrq->cmd->error = -ENOMEDIUM; tasklet_schedule(&host->finish_tasklet); } else { u32 present_state; present_state = sdhci_readl(host, SDHCI_PRESENT_STATE); /* * Check if the re-tuning timer has already expired and there * is no on-going data transfer. If so, we need to execute * tuning procedure before sending command. */ if ((host->flags & SDHCI_NEEDS_RETUNING) && !(present_state & (SDHCI_DOING_WRITE | SDHCI_DOING_READ))) { if (mmc->card) { /* eMMC uses cmd21 but sd and sdio use cmd19 */ tuning_opcode = mmc->card->type == MMC_TYPE_MMC ? MMC_SEND_TUNING_BLOCK_HS200 : MMC_SEND_TUNING_BLOCK; spin_unlock_irqrestore(&host->lock, flags); sdhci_execute_tuning(mmc, tuning_opcode); spin_lock_irqsave(&host->lock, flags); /* Restore original mmc_request structure */ host->mrq = mrq; } } /* For a data cmd, check for plat specific preparation */ if (mrq->data) { spin_unlock_irqrestore(&host->lock, flags); host->ops->platform_get_bus(host); spin_lock_irqsave(&host->lock, flags); } if (mrq->sbc && !(host->flags & SDHCI_AUTO_CMD23)) sdhci_send_command(host, mrq->sbc); else sdhci_send_command(host, mrq->cmd); } mmiowb(); spin_unlock_irqrestore(&host->lock, flags); } static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) { unsigned long flags; int vdd_bit = -1; u8 ctrl; /* * Controller registers should not be updated without the * controller clock enabled. Set the minimum controller * clock if there is no clock. */ if (host->ops->set_clock) { if (!host->clock && !ios->clock) { host->ops->set_clock(host, host->mmc->f_min); host->clock = host->mmc->f_min; } else if (ios->clock && (ios->clock != host->clock)) { host->ops->set_clock(host, ios->clock); } } spin_lock_irqsave(&host->lock, flags); if (host->flags & SDHCI_DEVICE_DEAD) { spin_unlock_irqrestore(&host->lock, flags); if (host->vmmc && ios->power_mode == MMC_POWER_OFF) mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); return; } /* * Reset the chip on each power off. * Should clear out any weird states. */ if (ios->power_mode == MMC_POWER_OFF) { sdhci_writel(host, 0, SDHCI_SIGNAL_ENABLE); sdhci_reinit(host); } if (ios->power_mode == MMC_POWER_OFF) vdd_bit = sdhci_set_power(host, -1); else vdd_bit = sdhci_set_power(host, ios->vdd); if (host->vmmc && vdd_bit != -1) { spin_unlock_irqrestore(&host->lock, flags); mmc_regulator_set_ocr(host->mmc, host->vmmc, vdd_bit); spin_lock_irqsave(&host->lock, flags); } sdhci_set_clock(host, ios->clock); if (host->ops->platform_send_init_74_clocks) host->ops->platform_send_init_74_clocks(host, ios->power_mode); /* * If your platform has 8-bit width support but is not a v3 controller, * or if it requires special setup code, you should implement that in * platform_8bit_width(). */ if (host->ops->platform_8bit_width) host->ops->platform_8bit_width(host, ios->bus_width); else { ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); if (ios->bus_width == MMC_BUS_WIDTH_8) { ctrl &= ~SDHCI_CTRL_4BITBUS; if (host->version >= SDHCI_SPEC_300) ctrl |= SDHCI_CTRL_8BITBUS; } else { if (host->version >= SDHCI_SPEC_300) ctrl &= ~SDHCI_CTRL_8BITBUS; if (ios->bus_width == MMC_BUS_WIDTH_4) ctrl |= SDHCI_CTRL_4BITBUS; else ctrl &= ~SDHCI_CTRL_4BITBUS; } sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); if ((ios->timing == MMC_TIMING_SD_HS || ios->timing == MMC_TIMING_MMC_HS) && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD; else ctrl &= ~SDHCI_CTRL_HISPD; if (host->version >= SDHCI_SPEC_300) { u16 clk, ctrl_2; /* In case of UHS-I modes, set High Speed Enable */ if (((ios->timing == MMC_TIMING_MMC_HS200) || (ios->timing == MMC_TIMING_UHS_SDR50) || (ios->timing == MMC_TIMING_UHS_SDR104) || (ios->timing == MMC_TIMING_UHS_DDR50) || (ios->timing == MMC_TIMING_UHS_SDR25)) && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD; ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (!(ctrl_2 & SDHCI_CTRL_PRESET_VAL_ENABLE)) { sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* * We only need to set Driver Strength if the * preset value enable is not set. */ ctrl_2 &= ~SDHCI_CTRL_DRV_TYPE_MASK; if (ios->drv_type == MMC_SET_DRIVER_TYPE_A) ctrl_2 |= SDHCI_CTRL_DRV_TYPE_A; else if (ios->drv_type == MMC_SET_DRIVER_TYPE_C) ctrl_2 |= SDHCI_CTRL_DRV_TYPE_C; sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); } else { /* * According to SDHC Spec v3.00, if the Preset Value * Enable in the Host Control 2 register is set, we * need to reset SD Clock Enable before changing High * Speed Enable to avoid generating clock gliches. */ /* Reset SD Clock Enable */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk &= ~SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* Re-enable SD Clock */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk |= SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); } /* Reset SD Clock Enable */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk &= ~SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); if (host->ops->set_uhs_signaling) host->ops->set_uhs_signaling(host, ios->timing); else { ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); /* Select Bus Speed Mode for host */ ctrl_2 &= ~SDHCI_CTRL_UHS_MASK; if (ios->timing == MMC_TIMING_MMC_HS200) ctrl_2 |= SDHCI_CTRL_HS_SDR200; else if (ios->timing == MMC_TIMING_UHS_SDR12) ctrl_2 |= SDHCI_CTRL_UHS_SDR12; else if (ios->timing == MMC_TIMING_UHS_SDR25) ctrl_2 |= SDHCI_CTRL_UHS_SDR25; else if (ios->timing == MMC_TIMING_UHS_SDR50) ctrl_2 |= SDHCI_CTRL_UHS_SDR50; else if (ios->timing == MMC_TIMING_UHS_SDR104) ctrl_2 |= SDHCI_CTRL_UHS_SDR104; else if (ios->timing == MMC_TIMING_UHS_DDR50) ctrl_2 |= SDHCI_CTRL_UHS_DDR50; sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); } /* Re-enable SD Clock */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk |= SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); } else sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* * Some (ENE) controllers go apeshit on some ios operation, * signalling timeout and CRC errors even on CMD0. Resetting * it on each ios seems to solve the problem. */ if(host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS) sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); mmiowb(); spin_unlock_irqrestore(&host->lock, flags); /* * Controller clock should only be disabled after all the register * writes are done. */ if (!ios->clock && host->ops->set_clock) host->ops->set_clock(host, ios->clock); if ((ios->power_mode == MMC_POWER_OFF) && host->ops->platform_power_off) host->ops->platform_power_off(host, ios->power_mode); } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct sdhci_host *host = mmc_priv(mmc); sdhci_runtime_pm_get(host); sdhci_do_set_ios(host, ios); sdhci_runtime_pm_put(host); } static void sdhci_dumpcmds(struct sdhci_host *host) { struct mmc_command *cmd = host->cmd; pr_err(DRIVER_NAME ": =========== COMMAND DUMP (%s)===========\n", mmc_hostname(host->mmc)); pr_err(DRIVER_NAME ": opcode: 0x%08x | arg: 0x%08x\n", cmd->opcode, cmd->arg); pr_err(DRIVER_NAME ": resp[0]: 0x%08x | resp[1]: 0x%08x\n", cmd->resp[0], cmd->resp[1]); pr_err(DRIVER_NAME ": resp[2]: 0x%08x | resp[3]: 0x%08x\n", cmd->resp[2], cmd->resp[3]); pr_err(DRIVER_NAME ": flags: 0x%08x | retries: 0x%08x\n", cmd->flags, cmd->retries); pr_err(DRIVER_NAME ": error: 0x%08x | data: 0x%08x\n", cmd->error, cmd->data); pr_err(DRIVER_NAME ": cmd_timeout_ms: 0x%08x\n", cmd->cmd_timeout_ms); pr_err(DRIVER_NAME ": mrq: 0x%08x\n", cmd->mrq); pr_err(DRIVER_NAME ": ===========================================\n"); } static int sdhci_check_ro(struct sdhci_host *host) { unsigned long flags; int is_readonly; spin_lock_irqsave(&host->lock, flags); if (host->flags & SDHCI_DEVICE_DEAD) is_readonly = 0; else if (host->ops->get_ro) is_readonly = host->ops->get_ro(host); else is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT); spin_unlock_irqrestore(&host->lock, flags); /* This quirk needs to be replaced by a callback-function later */ return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ? !is_readonly : is_readonly; } #define SAMPLE_COUNT 5 static int sdhci_do_get_ro(struct sdhci_host *host) { int i, ro_count; if (!(host->quirks & SDHCI_QUIRK_UNSTABLE_RO_DETECT)) return sdhci_check_ro(host); ro_count = 0; for (i = 0; i < SAMPLE_COUNT; i++) { if (sdhci_check_ro(host)) { if (++ro_count > SAMPLE_COUNT / 2) return 1; } msleep(30); } return 0; } static void sdhci_hw_reset(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); if (host->ops && host->ops->hw_reset) host->ops->hw_reset(host); } static int sdhci_get_ro(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); int ret; sdhci_runtime_pm_get(host); ret = sdhci_do_get_ro(host); sdhci_runtime_pm_put(host); return ret; } static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) { if (host->flags & SDHCI_DEVICE_DEAD) goto out; if (enable) host->flags |= SDHCI_SDIO_IRQ_ENABLED; else host->flags &= ~SDHCI_SDIO_IRQ_ENABLED; /* SDIO IRQ will be enabled as appropriate in runtime resume */ if (host->runtime_suspended) goto out; if (enable) sdhci_unmask_irqs(host, SDHCI_INT_CARD_INT); else sdhci_mask_irqs(host, SDHCI_INT_CARD_INT); out: mmiowb(); } static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) { struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; spin_lock_irqsave(&host->lock, flags); sdhci_enable_sdio_irq_nolock(host, enable); spin_unlock_irqrestore(&host->lock, flags); } static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, struct mmc_ios *ios) { u8 pwr; u16 clk, ctrl; u32 present_state; /* * Signal Voltage Switching is only applicable for Host Controllers * v3.00 and above. */ if (host->version < SDHCI_SPEC_300) return 0; if (host->quirks2 & SDHCI_QUIRK2_NON_STD_VOLTAGE_SWITCHING) { if (host->ops->switch_signal_voltage) return host->ops->switch_signal_voltage( host, ios->signal_voltage); } /* * We first check whether the request is to set signalling voltage * to 3.3V. If so, we change the voltage to 3.3V and return quickly. */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_330) { /* Set 1.8V Signal Enable in the Host Control2 register to 0 */ ctrl &= ~SDHCI_CTRL_VDD_180; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); /* Wait for 5ms */ usleep_range(5000, 5500); /* 3.3V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (!(ctrl & SDHCI_CTRL_VDD_180)) return 0; else { pr_info(DRIVER_NAME ": Switching to 3.3V " "signalling voltage failed\n"); return -EIO; } } else if (!(ctrl & SDHCI_CTRL_VDD_180) && (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_180)) { /* Stop SDCLK */ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk &= ~SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); /* Check whether DAT[3:0] is 0000 */ present_state = sdhci_readl(host, SDHCI_PRESENT_STATE); if (!((present_state & SDHCI_DATA_LVL_MASK) >> SDHCI_DATA_LVL_SHIFT)) { /* * Enable 1.8V Signal Enable in the Host Control2 * register */ ctrl |= SDHCI_CTRL_VDD_180; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); /* Wait for 5ms */ usleep_range(5000, 5500); ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (ctrl & SDHCI_CTRL_VDD_180) { /* Provide SDCLK again and wait for 1ms*/ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); clk |= SDHCI_CLOCK_CARD_EN; sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); usleep_range(1000, 1500); /* * If DAT[3:0] level is 1111b, then the card * was successfully switched to 1.8V signaling. */ present_state = sdhci_readl(host, SDHCI_PRESENT_STATE); if ((present_state & SDHCI_DATA_LVL_MASK) == SDHCI_DATA_LVL_MASK) return 0; } } /* * If we are here, that means the switch to 1.8V signaling * failed. We power cycle the card, and retry initialization * sequence by setting S18R to 0. */ pwr = sdhci_readb(host, SDHCI_POWER_CONTROL); pwr &= ~SDHCI_POWER_ON; sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); /* Wait for 1ms as per the spec */ usleep_range(1000, 1500); pwr |= SDHCI_POWER_ON; sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL); pr_info(DRIVER_NAME ": Switching to 1.8V signalling " "voltage failed, retrying with S18R set to 0\n"); return -EAGAIN; } else /* No signal voltage switch required */ return 0; } static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios) { struct sdhci_host *host = mmc_priv(mmc); int err; if (host->version < SDHCI_SPEC_300) return 0; sdhci_runtime_pm_get(host); err = sdhci_do_start_signal_voltage_switch(host, ios); /* Do any post voltage switch platform specific configuration */ if (host->ops->switch_signal_voltage_exit) host->ops->switch_signal_voltage_exit(host); sdhci_runtime_pm_put(host); return err; } static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) { struct sdhci_host *host; u16 ctrl; u32 ier; int tuning_loop_counter = MAX_TUNING_LOOP; unsigned long timeout; int err = 0; bool requires_tuning_nonuhs = false; host = mmc_priv(mmc); sdhci_runtime_pm_get(host); disable_irq(host->irq); if ((host->quirks2 & SDHCI_QUIRK2_NON_STANDARD_TUNING) && host->ops->execute_freq_tuning) { err = host->ops->execute_freq_tuning(host, opcode); enable_irq(host->irq); sdhci_runtime_pm_put(host); return err; } spin_lock(&host->lock); ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); /* * The Host Controller needs tuning only in case of SDR104 mode * and for SDR50 mode when Use Tuning for SDR50 is set in the * Capabilities register. * If the Host Controller supports the HS200 mode then the * tuning function has to be executed. */ if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR50) && (host->flags & SDHCI_SDR50_NEEDS_TUNING || host->flags & SDHCI_HS200_NEEDS_TUNING)) requires_tuning_nonuhs = true; if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR104) || requires_tuning_nonuhs) ctrl |= SDHCI_CTRL_EXEC_TUNING; else { spin_unlock(&host->lock); enable_irq(host->irq); sdhci_runtime_pm_put(host); return 0; } sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); /* * As per the Host Controller spec v3.00, tuning command * generates Buffer Read Ready interrupt, so enable that. * * Note: The spec clearly says that when tuning sequence * is being performed, the controller does not generate * interrupts other than Buffer Read Ready interrupt. But * to make sure we don't hit a controller bug, we _only_ * enable Buffer Read Ready interrupt here. */ ier = sdhci_readl(host, SDHCI_INT_ENABLE); sdhci_clear_set_irqs(host, ier, SDHCI_INT_DATA_AVAIL); /* * Issue CMD19 repeatedly till Execute Tuning is set to 0 or the number * of loops reaches 40 times or a timeout of 150ms occurs. */ timeout = 150; do { struct mmc_command cmd = {0}; struct mmc_request mrq = {NULL}; if (!tuning_loop_counter && !timeout) break; cmd.opcode = opcode; cmd.arg = 0; cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.retries = 0; cmd.data = NULL; cmd.error = 0; mrq.cmd = &cmd; host->mrq = &mrq; /* * In response to CMD19, the card sends 64 bytes of tuning * block to the Host Controller. So we set the block size * to 64 here. * In response to CMD21, the card sends 128 bytes of tuning * block for MMC_BUS_WIDTH_8 and 64 bytes for MMC_BUS_WIDTH_4 * to the Host Controller. So we set the block size to 64 here. */ if (cmd.opcode == MMC_SEND_TUNING_BLOCK_HS200) { if (mmc->ios.bus_width == MMC_BUS_WIDTH_8) sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, 128), SDHCI_BLOCK_SIZE); else if (mmc->ios.bus_width == MMC_BUS_WIDTH_4) sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, 64), SDHCI_BLOCK_SIZE); } else { sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, 64), SDHCI_BLOCK_SIZE); } /* * The tuning block is sent by the card to the host controller. * So we set the TRNS_READ bit in the Transfer Mode register. * This also takes care of setting DMA Enable and Multi Block * Select in the same register to 0. */ sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE); sdhci_send_command(host, &cmd); host->cmd = NULL; host->mrq = NULL; spin_unlock(&host->lock); enable_irq(host->irq); /* Wait for Buffer Read Ready interrupt */ wait_event_interruptible_timeout(host->buf_ready_int, (host->tuning_done == 1), msecs_to_jiffies(50)); disable_irq(host->irq); spin_lock(&host->lock); if (!host->tuning_done) { pr_info(DRIVER_NAME ": Timeout waiting for " "Buffer Read Ready interrupt during tuning " "procedure, falling back to fixed sampling " "clock\n"); ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl &= ~SDHCI_CTRL_TUNED_CLK; ctrl &= ~SDHCI_CTRL_EXEC_TUNING; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); err = -EIO; goto out; } host->tuning_done = 0; ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); tuning_loop_counter--; timeout--; mdelay(1); } while (ctrl & SDHCI_CTRL_EXEC_TUNING); /* * The Host Driver has exhausted the maximum number of loops allowed, * so use fixed sampling frequency. */ if (!tuning_loop_counter || !timeout) { ctrl &= ~SDHCI_CTRL_TUNED_CLK; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); } else { if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) { pr_info(DRIVER_NAME ": Tuning procedure" " failed, falling back to fixed sampling" " clock\n"); err = -EIO; } } out: /* * If this is the very first time we are here, we start the retuning * timer. Since only during the first time, SDHCI_NEEDS_RETUNING * flag won't be set, we check this condition before actually starting * the timer. */ if (!(host->flags & SDHCI_NEEDS_RETUNING) && host->tuning_count && (host->tuning_mode == SDHCI_TUNING_MODE_1)) { mod_timer(&host->tuning_timer, jiffies + host->tuning_count * HZ); /* Tuning mode 1 limits the maximum data length to 4MB */ mmc->max_blk_count = (4 * 1024 * 1024) / mmc->max_blk_size; } else { host->flags &= ~SDHCI_NEEDS_RETUNING; /* Reload the new initial value for timer */ if (host->tuning_mode == SDHCI_TUNING_MODE_1) mod_timer(&host->tuning_timer, jiffies + host->tuning_count * HZ); } /* * In case tuning fails, host controllers which support re-tuning can * try tuning again at a later time, when the re-tuning timer expires. * So for these controllers, we return 0. Since there might be other * controllers who do not have this capability, we return error for * them. */ if (err && host->tuning_count && host->tuning_mode == SDHCI_TUNING_MODE_1) err = 0; sdhci_clear_set_irqs(host, SDHCI_INT_DATA_AVAIL, ier); spin_unlock(&host->lock); enable_irq(host->irq); sdhci_runtime_pm_put(host); return err; } static void sdhci_do_enable_preset_value(struct sdhci_host *host, bool enable) { u16 ctrl; unsigned long flags; /* Host Controller v3.00 defines preset value registers */ if (host->version < SDHCI_SPEC_300) return; /* * Do not enable preset if the host preset registers have * incorrect values. */ if (host->quirks2 & SDHCI_QUIRK2_BROKEN_PRESET_VALUES) return; spin_lock_irqsave(&host->lock, flags); ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); /* * We only enable or disable Preset Value if they are not already * enabled or disabled respectively. Otherwise, we bail out. */ if (enable && !(ctrl & SDHCI_CTRL_PRESET_VAL_ENABLE)) { ctrl |= SDHCI_CTRL_PRESET_VAL_ENABLE; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); host->flags |= SDHCI_PV_ENABLED; } else if (!enable && (ctrl & SDHCI_CTRL_PRESET_VAL_ENABLE)) { ctrl &= ~SDHCI_CTRL_PRESET_VAL_ENABLE; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); host->flags &= ~SDHCI_PV_ENABLED; } spin_unlock_irqrestore(&host->lock, flags); } static void sdhci_enable_preset_value(struct mmc_host *mmc, bool enable) { struct sdhci_host *host = mmc_priv(mmc); sdhci_runtime_pm_get(host); sdhci_do_enable_preset_value(host, enable); sdhci_runtime_pm_put(host); } int sdhci_enable(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); unsigned int approved; int ret; struct platform_device *pdev = to_platform_device(mmc_dev(mmc)); if (!mmc->card || !(mmc->caps2 & MMC_CAP2_CLOCK_GATING)) return 0; if (IS_DELAYED_CLK_GATE(host)) { /* cancel clk gate work */ cancel_delayed_work_sync(&host->delayed_clk_gate_wrk); } if (mmc->ios.clock) { if (host->ops->set_clock) host->ops->set_clock(host, mmc->ios.clock); sdhci_set_clock(host, mmc->ios.clock); } if (host->sd_edp_client) { ret = edp_update_client_request(host->sd_edp_client, SD_EDP_HIGH, &approved); if (ret) dev_err(&pdev->dev, "Unable to set SD_EDP_HIGH state\n"); } #ifdef CONFIG_MMC_FREQ_SCALING if (mmc->df) { mmc->dev_stats->busy_time = 0; schedule_delayed_work(&mmc->dfs_work, msecs_to_jiffies(10)); } #endif return 0; } static void mmc_host_clk_gate(struct sdhci_host *host) { int ret; struct platform_device *pdev = to_platform_device(mmc_dev(host->mmc)); sdhci_set_clock(host, 0); if (host->ops->set_clock) host->ops->set_clock(host, 0); if (host->sd_edp_client) { ret = edp_update_client_request(host->sd_edp_client, SD_EDP_LOW, NULL); if (ret) dev_err(&pdev->dev, "Unable to set SD_EDP_LOW state\n"); } return; } void delayed_clk_gate_cb(struct work_struct *work) { struct sdhci_host *host = container_of(work, struct sdhci_host, delayed_clk_gate_wrk.work); /* power off check */ if (host->mmc->ios.power_mode == MMC_POWER_OFF) goto end; mmc_host_clk_gate(host); end: return; } EXPORT_SYMBOL_GPL(delayed_clk_gate_cb); int sdhci_disable(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); if (!mmc->card || !(mmc->caps2 & MMC_CAP2_CLOCK_GATING)) return 0; if (IS_DELAYED_CLK_GATE(host)) { schedule_delayed_work(&host->delayed_clk_gate_wrk, CLK_GATING_TICK_TMOUT); return 0; } mmc_host_clk_gate(host); /* * Cancel any pending DFS work if clocks are turned off. */ #ifdef CONFIG_MMC_FREQ_SCALING if (mmc->df) { cancel_delayed_work_sync(&mmc->dfs_work); mutex_lock(&mmc->df->lock); mmc->df->previous_freq = mmc->actual_clock; mutex_unlock(&mmc->df->lock); } #endif return 0; } #ifdef CONFIG_MMC_FREQ_SCALING /* * Wrapper functions to call any platform specific implementation for * supporting dynamic frequency scaling for SD/MMC devices. */ static int sdhci_gov_get_target(struct mmc_host *mmc, unsigned long *freq) { struct sdhci_host *host = mmc_priv(mmc); if (host->ops->dfs_gov_get_target_freq) *freq = host->ops->dfs_gov_get_target_freq(host, mmc->devfreq_stats); return 0; } static int sdhci_gov_init(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); if (host->ops->dfs_gov_init) return host->ops->dfs_gov_init(host); return 0; } static void sdhci_gov_exit(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); if (host->ops->dfs_gov_exit) host->ops->dfs_gov_exit(host); } #endif static const struct mmc_host_ops sdhci_ops = { .request = sdhci_request, .set_ios = sdhci_set_ios, .get_ro = sdhci_get_ro, .hw_reset = sdhci_hw_reset, .enable = sdhci_enable, .disable = sdhci_disable, .enable_sdio_irq = sdhci_enable_sdio_irq, .start_signal_voltage_switch = sdhci_start_signal_voltage_switch, .execute_tuning = sdhci_execute_tuning, .enable_preset_value = sdhci_enable_preset_value, #ifdef CONFIG_MMC_FREQ_SCALING .dfs_governor_init = sdhci_gov_init, .dfs_governor_exit = sdhci_gov_exit, .dfs_governor_get_target = sdhci_gov_get_target, #endif }; /*****************************************************************************\ * * * Tasklets * * * \*****************************************************************************/ static void sdhci_tasklet_card(unsigned long param) { struct sdhci_host *host; unsigned long flags; host = (struct sdhci_host*)param; spin_lock_irqsave(&host->lock, flags); /* Check host->mrq first in case we are runtime suspended */ if (host->mrq && !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) { pr_err("%s: Card removed during transfer!\n", mmc_hostname(host->mmc)); pr_err("%s: Resetting controller.\n", mmc_hostname(host->mmc)); sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); host->mrq->cmd->error = -ENOMEDIUM; tasklet_schedule(&host->finish_tasklet); } spin_unlock_irqrestore(&host->lock, flags); mmc_detect_change(host->mmc, msecs_to_jiffies(200)); } static void sdhci_tasklet_finish(unsigned long param) { struct sdhci_host *host; unsigned long flags; struct mmc_request *mrq; host = (struct sdhci_host*)param; spin_lock_irqsave(&host->lock, flags); /* * If this tasklet gets rescheduled while running, it will * be run again afterwards but without any active request. */ if (!host->mrq) { spin_unlock_irqrestore(&host->lock, flags); return; } del_timer(&host->timer); mrq = host->mrq; /* * The controller needs a reset of internal state machines * upon error conditions. */ if (!(host->flags & SDHCI_DEVICE_DEAD) && ((mrq->cmd && mrq->cmd->error) || (mrq->data && (mrq->data->error || (mrq->data->stop && mrq->data->stop->error))) || (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { /* Some controllers need this kick or reset won't work here */ if (host->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) { unsigned int clock; /* This is to force an update */ clock = host->clock; host->clock = 0; if (host->ops->set_clock) host->ops->set_clock(host, clock); sdhci_set_clock(host, clock); } /* Spec says we should do both at the same time, but Ricoh controllers do not like that. */ sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); } host->mrq = NULL; host->cmd = NULL; host->data = NULL; #ifndef SDHCI_USE_LEDS_CLASS sdhci_deactivate_led(host); #endif mmiowb(); spin_unlock_irqrestore(&host->lock, flags); mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); } static void sdhci_timeout_timer(unsigned long data) { struct sdhci_host *host; unsigned long flags; host = (struct sdhci_host*)data; spin_lock_irqsave(&host->lock, flags); if (host->mrq) { pr_err("%s: Timeout waiting for hardware " "interrupt.\n", mmc_hostname(host->mmc)); sdhci_dumpcmds(host); //Ivan NV added sdhci_dumpregs(host); if (host->data) { host->data->error = -ETIMEDOUT; sdhci_finish_data(host); } else { if (host->cmd) host->cmd->error = -ETIMEDOUT; else host->mrq->cmd->error = -ETIMEDOUT; tasklet_schedule(&host->finish_tasklet); } } mmiowb(); spin_unlock_irqrestore(&host->lock, flags); } static void sdhci_tuning_timer(unsigned long data) { struct sdhci_host *host; unsigned long flags; host = (struct sdhci_host *)data; spin_lock_irqsave(&host->lock, flags); host->flags |= SDHCI_NEEDS_RETUNING; spin_unlock_irqrestore(&host->lock, flags); } /*****************************************************************************\ * * * Interrupt handling * * * \*****************************************************************************/ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) { BUG_ON(intmask == 0); if (!host->cmd) { pr_err("%s: Got command interrupt 0x%08x even " "though no command operation was in progress.\n", mmc_hostname(host->mmc), (unsigned)intmask); sdhci_dumpregs(host); return; } if (intmask & SDHCI_INT_TIMEOUT) { host->cmd->error = -ETIMEDOUT; } else if (intmask & (SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX)) { host->cmd->error = -EILSEQ; sdhci_dumpregs(host); pr_err("%s: Command CRC or END bit error, intmask: %x\n", mmc_hostname(host->mmc), intmask); } if (host->cmd->error) { tasklet_schedule(&host->finish_tasklet); return; } /* * The host can send and interrupt when the busy state has * ended, allowing us to wait without wasting CPU cycles. * Unfortunately this is overloaded on the "data complete" * interrupt, so we need to take some care when handling * it. * * Note: The 1.0 specification is a bit ambiguous about this * feature so there might be some problems with older * controllers. */ if (host->cmd->flags & MMC_RSP_BUSY) { if (host->cmd->data) DBG("Cannot wait for busy signal when also " "doing a data transfer"); else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ)) return; /* The controller does not support the end-of-busy IRQ, * fall through and take the SDHCI_INT_RESPONSE */ } if (intmask & SDHCI_INT_RESPONSE) sdhci_finish_command(host); } #ifdef CONFIG_MMC_DEBUG static void sdhci_show_adma_error(struct sdhci_host *host) { const char *name = mmc_hostname(host->mmc); u8 *desc = host->adma_desc; __le32 *dma; __le16 *len; u8 attr; sdhci_dumpregs(host); while (true) { dma = (__le32 *)(desc + 4); len = (__le16 *)(desc + 2); attr = *desc; DBG("%s: %p: DMA 0x%08x, LEN 0x%04x, Attr=0x%02x\n", name, desc, le32_to_cpu(*dma), le16_to_cpu(*len), attr); desc += 8; if (attr & 2) break; } } #else static void sdhci_show_adma_error(struct sdhci_host *host) { } #endif static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) { u32 command; BUG_ON(intmask == 0); /* CMD19, CMD21 generates _only_ Buffer Read Ready interrupt */ if (intmask & SDHCI_INT_DATA_AVAIL) { command = SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)); if (command == MMC_SEND_TUNING_BLOCK || command == MMC_SEND_TUNING_BLOCK_HS200) { host->tuning_done = 1; wake_up(&host->buf_ready_int); return; } } if (!host->data) { /* * The "data complete" interrupt is also used to * indicate that a busy state has ended. See comment * above in sdhci_cmd_irq(). */ if (host->cmd && (host->cmd->flags & MMC_RSP_BUSY)) { if (intmask & SDHCI_INT_DATA_END) { sdhci_finish_command(host); return; } } pr_err("%s: Got data interrupt 0x%08x even " "though no data operation was in progress.\n", mmc_hostname(host->mmc), (unsigned)intmask); sdhci_dumpregs(host); return; } if (intmask & SDHCI_INT_DATA_TIMEOUT) { host->data->error = -ETIMEDOUT; pr_err("%s: Data Timeout error, intmask: %x\n", mmc_hostname(host->mmc), intmask); sdhci_dumpregs(host); } else if (intmask & SDHCI_INT_DATA_END_BIT) { host->data->error = -EILSEQ; pr_err("%s: Data END Bit error, intmask: %x\n", mmc_hostname(host->mmc), intmask); } else if ((intmask & SDHCI_INT_DATA_CRC) && SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)) != MMC_BUS_TEST_R) { host->data->error = -EILSEQ; pr_err("%s: Data CRC error, intmask: %x\n", mmc_hostname(host->mmc), intmask); sdhci_dumpregs(host); } else if (intmask & SDHCI_INT_ADMA_ERROR) { pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); sdhci_dumpregs(host); sdhci_show_adma_error(host); host->data->error = -EIO; } if (host->data->error) sdhci_finish_data(host); else { if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL)) sdhci_transfer_pio(host); /* * We currently don't do anything fancy with DMA * boundaries, but as we can't disable the feature * we need to at least restart the transfer. * * According to the spec sdhci_readl(host, SDHCI_DMA_ADDRESS) * should return a valid address to continue from, but as * some controllers are faulty, don't trust them. */ if (intmask & SDHCI_INT_DMA_END) { u32 dmastart, dmanow; dmastart = sg_dma_address(host->data->sg); dmanow = dmastart + host->data->bytes_xfered; /* * Force update to the next DMA block boundary. */ dmanow = (dmanow & ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1)) + SDHCI_DEFAULT_BOUNDARY_SIZE; host->data->bytes_xfered = dmanow - dmastart; DBG("%s: DMA base 0x%08x, transferred 0x%06x bytes," " next 0x%08x\n", mmc_hostname(host->mmc), dmastart, host->data->bytes_xfered, dmanow); sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS); } if (intmask & SDHCI_INT_DATA_END) { if (host->cmd) { /* * Data managed to finish before the * command completed. Make sure we do * things in the proper order. */ host->data_early = 1; } else { sdhci_finish_data(host); } } } } static irqreturn_t sdhci_irq(int irq, void *dev_id) { irqreturn_t result; struct sdhci_host *host = dev_id; u32 intmask, unexpected = 0; int cardint = 0, max_loops = 16; spin_lock(&host->lock); if (host->runtime_suspended) { spin_unlock(&host->lock); pr_warning("%s: got irq while runtime suspended\n", mmc_hostname(host->mmc)); return IRQ_HANDLED; } intmask = sdhci_readl(host, SDHCI_INT_STATUS); if (!intmask || intmask == 0xffffffff) { result = IRQ_NONE; goto out; } again: DBG("*** %s got interrupt: 0x%08x\n", mmc_hostname(host->mmc), intmask); if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { u32 present = sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT; /* * There is a observation on i.mx esdhc. INSERT bit will be * immediately set again when it gets cleared, if a card is * inserted. We have to mask the irq to prevent interrupt * storm which will freeze the system. And the REMOVE gets * the same situation. * * More testing are needed here to ensure it works for other * platforms though. */ sdhci_mask_irqs(host, present ? SDHCI_INT_CARD_INSERT : SDHCI_INT_CARD_REMOVE); sdhci_unmask_irqs(host, present ? SDHCI_INT_CARD_REMOVE : SDHCI_INT_CARD_INSERT); sdhci_writel(host, intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE), SDHCI_INT_STATUS); intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); tasklet_schedule(&host->card_tasklet); } if (intmask & SDHCI_INT_CMD_MASK) { sdhci_writel(host, intmask & SDHCI_INT_CMD_MASK, SDHCI_INT_STATUS); sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK); } if (intmask & SDHCI_INT_DATA_MASK) { sdhci_writel(host, intmask & SDHCI_INT_DATA_MASK, SDHCI_INT_STATUS); sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK); } if ((intmask & SDHCI_INT_DATA_MASK) || (intmask & SDHCI_INT_CMD_MASK)) if (host->ops->sd_error_stats) host->ops->sd_error_stats(host, intmask); intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); intmask &= ~SDHCI_INT_ERROR; if (intmask & SDHCI_INT_BUS_POWER) { pr_err("%s: Card is consuming too much power!\n", mmc_hostname(host->mmc)); sdhci_writel(host, SDHCI_INT_BUS_POWER, SDHCI_INT_STATUS); } intmask &= ~SDHCI_INT_BUS_POWER; if (intmask & SDHCI_INT_CARD_INT) cardint = 1; intmask &= ~SDHCI_INT_CARD_INT; if (intmask) { unexpected |= intmask; sdhci_writel(host, intmask, SDHCI_INT_STATUS); } result = IRQ_HANDLED; intmask = sdhci_readl(host, SDHCI_INT_STATUS); if (intmask && --max_loops) goto again; out: spin_unlock(&host->lock); if (unexpected) { pr_err("%s: Unexpected interrupt 0x%08x.\n", mmc_hostname(host->mmc), unexpected); sdhci_dumpregs(host); } /* * We have to delay this as it calls back into the driver. */ if (cardint) mmc_signal_sdio_irq(host->mmc); return result; } /*****************************************************************************\ * * * Suspend/resume * * * \*****************************************************************************/ #ifdef CONFIG_PM int sdhci_suspend_host(struct sdhci_host *host) { int ret = 0; bool has_tuning_timer; struct mmc_host *mmc = host->mmc; if (host->ops->platform_suspend) host->ops->platform_suspend(host); sdhci_disable_card_detection(host); /* Disable tuning since we are suspending */ has_tuning_timer = host->version >= SDHCI_SPEC_300 && host->tuning_count && host->tuning_mode == SDHCI_TUNING_MODE_1; if (has_tuning_timer) { del_timer_sync(&host->tuning_timer); host->flags &= ~SDHCI_NEEDS_RETUNING; } if (mmc->card) { /* * If eMMC cards are put in sleep state, Vccq can be disabled * but Vcc would still be powered on. In resume, we only restore * the controller context. So, set MMC_PM_KEEP_POWER flag. */ if (mmc_card_can_sleep(mmc) && !(mmc->caps2 & MMC_CAP2_NO_SLEEP_CMD)) mmc->pm_flags = MMC_PM_KEEP_POWER; ret = mmc_suspend_host(host->mmc); } if (ret) { if (has_tuning_timer) { host->flags |= SDHCI_NEEDS_RETUNING; mod_timer(&host->tuning_timer, jiffies + host->tuning_count * HZ); } sdhci_enable_card_detection(host); return ret; } if (mmc->pm_flags & MMC_PM_KEEP_POWER) host->card_int_set = sdhci_readl(host, SDHCI_INT_ENABLE) & SDHCI_INT_CARD_INT; sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); /* cancel sdio clk gate work */ cancel_delayed_work_sync(&host->delayed_clk_gate_wrk); if (host->irq) disable_irq(host->irq); return ret; } EXPORT_SYMBOL_GPL(sdhci_suspend_host); int sdhci_resume_host(struct sdhci_host *host) { int ret = 0; struct mmc_host *mmc = host->mmc; if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { if (host->ops->enable_dma) host->ops->enable_dma(host); } if (host->irq) enable_irq(host->irq); if ((host->mmc->pm_flags & MMC_PM_KEEP_POWER) && (host->quirks2 & SDHCI_QUIRK2_HOST_OFF_CARD_ON)) { /* Card keeps power but host controller does not */ sdhci_init(host, 0); host->pwr = 0; host->clock = 0; sdhci_do_set_ios(host, &host->mmc->ios); } else { sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); mmiowb(); } if (mmc->card) { ret = mmc_resume_host(host->mmc); /* Enable card interrupt as it is overwritten in sdhci_init */ if ((mmc->caps & MMC_CAP_SDIO_IRQ) && (mmc->pm_flags & MMC_PM_KEEP_POWER)) if (host->card_int_set) mmc->ops->enable_sdio_irq(mmc, true); } sdhci_enable_card_detection(host); if (host->ops->platform_resume) host->ops->platform_resume(host); /* Set the re-tuning expiration flag */ if ((host->version >= SDHCI_SPEC_300) && host->tuning_count && (host->tuning_mode == SDHCI_TUNING_MODE_1)) host->flags |= SDHCI_NEEDS_RETUNING; return ret; } EXPORT_SYMBOL_GPL(sdhci_resume_host); void sdhci_enable_irq_wakeups(struct sdhci_host *host) { u8 val; val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL); val |= SDHCI_WAKE_ON_INT; sdhci_writeb(host, val, SDHCI_WAKE_UP_CONTROL); } EXPORT_SYMBOL_GPL(sdhci_enable_irq_wakeups); #endif /* CONFIG_PM */ #ifdef CONFIG_PM_RUNTIME static int sdhci_runtime_pm_get(struct sdhci_host *host) { return pm_runtime_get_sync(host->mmc->parent); } static int sdhci_runtime_pm_put(struct sdhci_host *host) { pm_runtime_mark_last_busy(host->mmc->parent); return pm_runtime_put_autosuspend(host->mmc->parent); } int sdhci_runtime_suspend_host(struct sdhci_host *host) { unsigned long flags; int ret = 0; /* Disable tuning since we are suspending */ if (host->version >= SDHCI_SPEC_300 && host->tuning_mode == SDHCI_TUNING_MODE_1) { del_timer_sync(&host->tuning_timer); host->flags &= ~SDHCI_NEEDS_RETUNING; } spin_lock_irqsave(&host->lock, flags); sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); spin_unlock_irqrestore(&host->lock, flags); synchronize_irq(host->irq); spin_lock_irqsave(&host->lock, flags); host->runtime_suspended = true; spin_unlock_irqrestore(&host->lock, flags); return ret; } EXPORT_SYMBOL_GPL(sdhci_runtime_suspend_host); int sdhci_runtime_resume_host(struct sdhci_host *host) { unsigned long flags; int ret = 0, host_flags = host->flags; if (host_flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { if (host->ops->enable_dma) host->ops->enable_dma(host); } sdhci_init(host, 0); /* Force clock and power re-program */ host->pwr = 0; host->clock = 0; sdhci_do_set_ios(host, &host->mmc->ios); sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); /* Do any post voltage switch platform specific configuration */ if (host->ops->switch_signal_voltage_exit) host->ops->switch_signal_voltage_exit(host); if (host_flags & SDHCI_PV_ENABLED) sdhci_do_enable_preset_value(host, true); /* Set the re-tuning expiration flag */ if ((host->version >= SDHCI_SPEC_300) && host->tuning_count && (host->tuning_mode == SDHCI_TUNING_MODE_1)) host->flags |= SDHCI_NEEDS_RETUNING; spin_lock_irqsave(&host->lock, flags); host->runtime_suspended = false; /* Enable SDIO IRQ */ if ((host->flags & SDHCI_SDIO_IRQ_ENABLED)) sdhci_enable_sdio_irq_nolock(host, true); /* Enable Card Detection */ sdhci_enable_card_detection(host); spin_unlock_irqrestore(&host->lock, flags); return ret; } EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host); #endif /*****************************************************************************\ * * * Device allocation/registration * * * \*****************************************************************************/ struct sdhci_host *sdhci_alloc_host(struct device *dev, size_t priv_size) { struct mmc_host *mmc; struct sdhci_host *host; WARN_ON(dev == NULL); mmc = mmc_alloc_host(sizeof(struct sdhci_host) + priv_size, dev); if (!mmc) return ERR_PTR(-ENOMEM); host = mmc_priv(mmc); host->mmc = mmc; return host; } EXPORT_SYMBOL_GPL(sdhci_alloc_host); int sdhci_add_host(struct sdhci_host *host) { struct mmc_host *mmc; u32 caps[2]; u32 max_current_caps; unsigned int ocr_avail; int ret; struct edp_manager *battery_manager = NULL; struct platform_device *pdev = to_platform_device(mmc_dev(host->mmc)); WARN_ON(host == NULL); if (host == NULL) return -EINVAL; mmc = host->mmc; if (debug_quirks) host->quirks = debug_quirks; if (debug_quirks2) host->quirks2 = debug_quirks2; sdhci_reset(host, SDHCI_RESET_ALL); host->version = sdhci_readw(host, SDHCI_HOST_VERSION); host->version = (host->version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT; if (host->version > SDHCI_SPEC_300) { pr_err("%s: Unknown controller version (%d). " "You may experience problems.\n", mmc_hostname(mmc), host->version); } caps[0] = (host->quirks & SDHCI_QUIRK_MISSING_CAPS) ? host->caps : sdhci_readl(host, SDHCI_CAPABILITIES); caps[1] = (host->version >= SDHCI_SPEC_300) ? sdhci_readl(host, SDHCI_CAPABILITIES_1) : 0; if (host->quirks & SDHCI_QUIRK_FORCE_DMA) host->flags |= SDHCI_USE_SDMA; else if (!(caps[0] & SDHCI_CAN_DO_SDMA)) DBG("Controller doesn't have SDMA capability\n"); else host->flags |= SDHCI_USE_SDMA; if ((host->quirks & SDHCI_QUIRK_BROKEN_DMA) && (host->flags & SDHCI_USE_SDMA)) { DBG("Disabling DMA as it is marked broken\n"); host->flags &= ~SDHCI_USE_SDMA; } if ((host->version >= SDHCI_SPEC_200) && (caps[0] & SDHCI_CAN_DO_ADMA2)) host->flags |= SDHCI_USE_ADMA; if ((host->quirks & SDHCI_QUIRK_BROKEN_ADMA) && (host->flags & SDHCI_USE_ADMA)) { DBG("Disabling ADMA as it is marked broken\n"); host->flags &= ~SDHCI_USE_ADMA; } if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { if (host->ops->enable_dma) { if (host->ops->enable_dma(host)) { pr_warning("%s: No suitable DMA " "available. Falling back to PIO.\n", mmc_hostname(mmc)); host->flags &= ~(SDHCI_USE_SDMA | SDHCI_USE_ADMA); } } } if (host->flags & SDHCI_USE_ADMA) { /* * We need to allocate descriptors for all sg entries * (128) and potentially one alignment transfer for * each of those entries. */ if (mmc_dev(host->mmc)->dma_mask && mmc_dev(host->mmc)->coherent_dma_mask) { host->adma_desc = dma_alloc_coherent( mmc_dev(host->mmc), (128 * 2 + 1) * 4, &host->adma_addr, GFP_KERNEL); if (!host->adma_desc) goto err_dma_alloc; host->align_buffer = dma_alloc_coherent( mmc_dev(host->mmc), 128 * 4, &host->align_addr, GFP_KERNEL); if (!host->align_buffer) { dma_free_coherent(mmc_dev(host->mmc), (128 * 2 + 1) * 4, host->adma_desc, host->adma_addr); host->adma_desc = NULL; goto err_dma_alloc; } host->use_dma_alloc = true; BUG_ON(host->adma_addr & 0x3); BUG_ON(host->align_addr & 0x3); goto out_dma_alloc; } err_dma_alloc: host->adma_desc = kmalloc((128 * 2 + 1) * 4, GFP_KERNEL); host->align_buffer = kmalloc(128 * 4, GFP_KERNEL); if (!host->adma_desc || !host->align_buffer) { kfree(host->adma_desc); kfree(host->align_buffer); pr_warning("%s: Unable to allocate ADMA " "buffers. Falling back to standard DMA.\n", mmc_hostname(mmc)); host->flags &= ~SDHCI_USE_ADMA; } } out_dma_alloc: /* * If we use DMA, then it's up to the caller to set the DMA * mask, but PIO does not need the hw shim so we set a new * mask here in that case. */ if (!(host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA))) { host->dma_mask = DMA_BIT_MASK(64); mmc_dev(host->mmc)->dma_mask = &host->dma_mask; } if (host->version >= SDHCI_SPEC_300) host->max_clk = (caps[0] & SDHCI_CLOCK_V3_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; else host->max_clk = (caps[0] & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; host->max_clk *= 1000000; if (host->max_clk == 0 || host->quirks & SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN) { if (!host->ops->get_max_clock) { pr_err("%s: Hardware doesn't specify base clock " "frequency.\n", mmc_hostname(mmc)); return -ENODEV; } host->max_clk = host->ops->get_max_clock(host); } /* * In case of Host Controller v3.00, find out whether clock * multiplier is supported. */ host->clk_mul = (caps[1] & SDHCI_CLOCK_MUL_MASK) >> SDHCI_CLOCK_MUL_SHIFT; /* * In case the value in Clock Multiplier is 0, then programmable * clock mode is not supported, otherwise the actual clock * multiplier is one more than the value of Clock Multiplier * in the Capabilities Register. */ if (host->clk_mul) host->clk_mul += 1; /* * Set host parameters. */ mmc->ops = &sdhci_ops; mmc->f_max = host->max_clk; if (host->ops->get_min_clock) mmc->f_min = host->ops->get_min_clock(host); else if (host->version >= SDHCI_SPEC_300) { if (host->clk_mul) { mmc->f_min = (host->max_clk * host->clk_mul) / 1024; mmc->f_max = host->max_clk * host->clk_mul; } else mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300; } else mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200; host->timeout_clk = (caps[0] & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; if (host->timeout_clk == 0) { if (host->ops->get_timeout_clock) { host->timeout_clk = host->ops->get_timeout_clock(host); } else if (!(host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)) { pr_err("%s: Hardware doesn't specify timeout clock " "frequency.\n", mmc_hostname(mmc)); return -ENODEV; } } if (caps[0] & SDHCI_TIMEOUT_CLK_UNIT) host->timeout_clk *= 1000; if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) host->timeout_clk = mmc->f_max / 1000; if (!(host->quirks2 & SDHCI_QUIRK2_NO_CALC_MAX_DISCARD_TO)) mmc->max_discard_to = (1 << 27) / host->timeout_clk; if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12) host->flags |= SDHCI_AUTO_CMD12; /* Auto-CMD23 stuff only works in ADMA or PIO. */ if ((host->version >= SDHCI_SPEC_300) && ((host->flags & SDHCI_USE_ADMA) || !(host->flags & SDHCI_USE_SDMA))) { host->flags |= SDHCI_AUTO_CMD23; DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); } else { DBG("%s: Auto-CMD23 unavailable\n", mmc_hostname(mmc)); } /* * A controller may support 8-bit width, but the board itself * might not have the pins brought out. Boards that support * 8-bit width must set "mmc->caps |= MMC_CAP_8_BIT_DATA;" in * their platform code before calling sdhci_add_host(), and we * won't assume 8-bit width for hosts without that CAP. */ if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) mmc->caps |= MMC_CAP_4_BIT_DATA; if (caps[0] & SDHCI_CAN_DO_HISPD) mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) && mmc_card_is_removable(mmc) && !(host->ops->get_cd)) mmc->caps |= MMC_CAP_NEEDS_POLL; /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */ if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50)) mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25; /* SDR104 supports also implies SDR50 support */ if (caps[1] & SDHCI_SUPPORT_SDR104) mmc->caps |= MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50; else if (caps[1] & SDHCI_SUPPORT_SDR50) mmc->caps |= MMC_CAP_UHS_SDR50; if (caps[1] & SDHCI_SUPPORT_DDR50) mmc->caps |= MMC_CAP_UHS_DDR50; /* Does the host need tuning for SDR50? */ if (caps[1] & SDHCI_USE_SDR50_TUNING) host->flags |= SDHCI_SDR50_NEEDS_TUNING; /* Does the host need tuning for HS200? */ if (mmc->caps2 & MMC_CAP2_HS200) host->flags |= SDHCI_HS200_NEEDS_TUNING; /* Driver Type(s) (A, C, D) supported by the host */ if (caps[1] & SDHCI_DRIVER_TYPE_A) mmc->caps |= MMC_CAP_DRIVER_TYPE_A; if (caps[1] & SDHCI_DRIVER_TYPE_C) mmc->caps |= MMC_CAP_DRIVER_TYPE_C; if (caps[1] & SDHCI_DRIVER_TYPE_D) mmc->caps |= MMC_CAP_DRIVER_TYPE_D; /* * If Power Off Notify capability is enabled by the host, * set notify to short power off notify timeout value. */ if (mmc->caps2 & MMC_CAP2_POWEROFF_NOTIFY) mmc->power_notify_type = MMC_HOST_PW_NOTIFY_SHORT; else mmc->power_notify_type = MMC_HOST_PW_NOTIFY_NONE; /* Initial value for re-tuning timer count */ host->tuning_count = (caps[1] & SDHCI_RETUNING_TIMER_COUNT_MASK) >> SDHCI_RETUNING_TIMER_COUNT_SHIFT; /* * If the re-tuning timer count value is 0xF, the timer count * information should be obtained in a non-standard way. */ if (host->tuning_count == 0xF) { if (host->ops->get_tuning_counter) { host->tuning_count = host->ops->get_tuning_counter(host); } else { host->tuning_count = 0; } } /* * In case Re-tuning Timer is not disabled, the actual value of * re-tuning timer will be 2 ^ (n - 1). */ if (host->tuning_count) host->tuning_count = 1 << (host->tuning_count - 1); /* Re-tuning mode supported by the Host Controller */ host->tuning_mode = (caps[1] & SDHCI_RETUNING_MODE_MASK) >> SDHCI_RETUNING_MODE_SHIFT; ocr_avail = 0; /* * According to SD Host Controller spec v3.00, if the Host System * can afford more than 150mA, Host Driver should set XPC to 1. Also * the value is meaningful only if Voltage Support in the Capabilities * register is set. The actual current value is 4 times the register * value. */ max_current_caps = sdhci_readl(host, SDHCI_MAX_CURRENT); if (caps[0] & SDHCI_CAN_VDD_330) { int max_current_330; ocr_avail |= MMC_VDD_32_33 | MMC_VDD_33_34; max_current_330 = ((max_current_caps & SDHCI_MAX_CURRENT_330_MASK) >> SDHCI_MAX_CURRENT_330_SHIFT) * SDHCI_MAX_CURRENT_MULTIPLIER; if (max_current_330 > 150) mmc->caps |= MMC_CAP_SET_XPC_330; } if (caps[0] & SDHCI_CAN_VDD_300) { int max_current_300; ocr_avail |= MMC_VDD_29_30 | MMC_VDD_30_31; max_current_300 = ((max_current_caps & SDHCI_MAX_CURRENT_300_MASK) >> SDHCI_MAX_CURRENT_300_SHIFT) * SDHCI_MAX_CURRENT_MULTIPLIER; if (max_current_300 > 150) mmc->caps |= MMC_CAP_SET_XPC_300; } if (caps[0] & SDHCI_CAN_VDD_180) { int max_current_180; ocr_avail |= MMC_VDD_165_195; max_current_180 = ((max_current_caps & SDHCI_MAX_CURRENT_180_MASK) >> SDHCI_MAX_CURRENT_180_SHIFT) * SDHCI_MAX_CURRENT_MULTIPLIER; if (max_current_180 > 150) mmc->caps |= MMC_CAP_SET_XPC_180; /* Maximum current capabilities of the host at 1.8V */ if (max_current_180 >= 800) mmc->caps |= MMC_CAP_MAX_CURRENT_800; else if (max_current_180 >= 600) mmc->caps |= MMC_CAP_MAX_CURRENT_600; else if (max_current_180 >= 400) mmc->caps |= MMC_CAP_MAX_CURRENT_400; else mmc->caps |= MMC_CAP_MAX_CURRENT_200; } mmc->ocr_avail = ocr_avail; mmc->ocr_avail_sdio = ocr_avail; if (host->ocr_avail_sdio) mmc->ocr_avail_sdio &= host->ocr_avail_sdio; mmc->ocr_avail_sd = ocr_avail; if (host->ocr_avail_sd) mmc->ocr_avail_sd &= host->ocr_avail_sd; else /* normal SD controllers don't support 1.8V */ mmc->ocr_avail_sd &= ~MMC_VDD_165_195; mmc->ocr_avail_mmc = ocr_avail; if (host->ocr_avail_mmc) mmc->ocr_avail_mmc &= host->ocr_avail_mmc; if (mmc->ocr_avail == 0) { pr_err("%s: Hardware doesn't report any " "support voltages.\n", mmc_hostname(mmc)); return -ENODEV; } spin_lock_init(&host->lock); /* * Maximum number of segments. Depends on if the hardware * can do scatter/gather or not. */ if (host->flags & SDHCI_USE_ADMA) mmc->max_segs = 128; else if (host->flags & SDHCI_USE_SDMA) mmc->max_segs = 1; else /* PIO */ mmc->max_segs = 128; /* * Maximum number of sectors in one transfer. Limited by DMA boundary * size (512KiB). */ mmc->max_req_size = 524288; /* * Maximum segment size. Could be one segment with the maximum number * of bytes. When doing hardware scatter/gather, each entry cannot * be larger than 64 KiB though. */ if (host->flags & SDHCI_USE_ADMA) { if (host->quirks & SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC) mmc->max_seg_size = 65535; else mmc->max_seg_size = 65536; } else { mmc->max_seg_size = mmc->max_req_size; } /* * Maximum block size. This varies from controller to controller and * is specified in the capabilities register. */ if (host->quirks & SDHCI_QUIRK_FORCE_BLK_SZ_2048) { mmc->max_blk_size = 2; } else { mmc->max_blk_size = (caps[0] & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; if (mmc->max_blk_size >= 3) { pr_info("%s: Invalid maximum block size, " "assuming 512 bytes\n", mmc_hostname(mmc)); mmc->max_blk_size = 0; } } mmc->max_blk_size = 512 << mmc->max_blk_size; /* * Maximum block count. */ mmc->max_blk_count = (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535; /* * Init tasklets. */ tasklet_init(&host->card_tasklet, sdhci_tasklet_card, (unsigned long)host); tasklet_init(&host->finish_tasklet, sdhci_tasklet_finish, (unsigned long)host); setup_timer(&host->timer, sdhci_timeout_timer, (unsigned long)host); if (host->version >= SDHCI_SPEC_300) { init_waitqueue_head(&host->buf_ready_int); /* Initialize re-tuning timer */ init_timer(&host->tuning_timer); host->tuning_timer.data = (unsigned long)host; host->tuning_timer.function = sdhci_tuning_timer; } ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED, mmc_hostname(mmc), host); if (ret) goto untasklet; host->vmmc = regulator_get(mmc_dev(mmc), "vmmc"); if (IS_ERR(host->vmmc)) { pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); host->vmmc = NULL; } sdhci_init(host, 0); if (host->edp_support == true) { battery_manager = edp_get_manager("battery"); if (!battery_manager) dev_err(&pdev->dev, "unable to get edp manager\n"); else { host->sd_edp_client = devm_kzalloc(&pdev->dev, sizeof(struct edp_client), GFP_KERNEL); if (IS_ERR_OR_NULL(host->sd_edp_client)) { dev_err(&pdev->dev, "could not allocate edp client\n"); host->sd_edp_client = NULL; } strncpy(host->sd_edp_client->name, dev_name(mmc_dev(mmc)), EDP_NAME_LEN-1); host->sd_edp_client->name[EDP_NAME_LEN-1] = '\0'; host->sd_edp_client->states = host->edp_states; host->sd_edp_client->num_states = SD_EDP_NUM_STATES; host->sd_edp_client->e0_index = SD_EDP_HIGH; host->sd_edp_client->priority = EDP_MAX_PRIO + 2; ret = edp_register_client(battery_manager, host->sd_edp_client); if (ret) { dev_err(&pdev->dev, "unable to register edp client\n"); } else { pr_info("%s: edp client registration" \ " successful.\n", dev_name(mmc_dev(mmc))); ret = edp_update_client_request( host->sd_edp_client, SD_EDP_LOW, NULL); if (ret) { dev_err(&pdev->dev, "Unable to set E0 EDP state\n"); edp_unregister_client( host->sd_edp_client); devm_kfree(&pdev->dev, host->sd_edp_client); } } } } #ifdef CONFIG_MMC_DEBUG sdhci_dumpregs(host); #endif #ifdef SDHCI_USE_LEDS_CLASS snprintf(host->led_name, sizeof(host->led_name), "%s::", mmc_hostname(mmc)); host->led.name = host->led_name; host->led.brightness = LED_OFF; host->led.default_trigger = mmc_hostname(mmc); host->led.brightness_set = sdhci_led_control; ret = led_classdev_register(mmc_dev(mmc), &host->led); if (ret) goto reset; #endif mmiowb(); mmc_add_host(mmc); pr_info("%s: SDHCI controller on %s [%s] using %s\n", mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), (host->flags & SDHCI_USE_ADMA) ? "ADMA" : (host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO"); sdhci_enable_card_detection(host); return 0; #ifdef SDHCI_USE_LEDS_CLASS reset: sdhci_reset(host, SDHCI_RESET_ALL); free_irq(host->irq, host); #endif untasklet: tasklet_kill(&host->card_tasklet); tasklet_kill(&host->finish_tasklet); return ret; } EXPORT_SYMBOL_GPL(sdhci_add_host); void sdhci_remove_host(struct sdhci_host *host, int dead) { unsigned long flags; if (dead) { spin_lock_irqsave(&host->lock, flags); host->flags |= SDHCI_DEVICE_DEAD; if (host->mrq) { pr_err("%s: Controller removed during " " transfer!\n", mmc_hostname(host->mmc)); host->mrq->cmd->error = -ENOMEDIUM; tasklet_schedule(&host->finish_tasklet); } spin_unlock_irqrestore(&host->lock, flags); } sdhci_disable_card_detection(host); mmc_remove_host(host->mmc); #ifdef SDHCI_USE_LEDS_CLASS led_classdev_unregister(&host->led); #endif if (!dead) sdhci_reset(host, SDHCI_RESET_ALL); free_irq(host->irq, host); del_timer_sync(&host->timer); if (host->version >= SDHCI_SPEC_300) del_timer_sync(&host->tuning_timer); tasklet_kill(&host->card_tasklet); tasklet_kill(&host->finish_tasklet); if (host->vmmc) regulator_put(host->vmmc); if (host->use_dma_alloc) { dma_free_coherent(mmc_dev(host->mmc), (128 * 2 + 1) * 4, host->adma_desc, host->adma_addr); dma_free_coherent(mmc_dev(host->mmc), 128 * 4, host->align_buffer, host->align_addr); } else { kfree(host->adma_desc); kfree(host->align_buffer); } host->adma_desc = NULL; host->align_buffer = NULL; } EXPORT_SYMBOL_GPL(sdhci_remove_host); void sdhci_free_host(struct sdhci_host *host) { mmc_free_host(host->mmc); } EXPORT_SYMBOL_GPL(sdhci_free_host); /*****************************************************************************\ * * * Driver init/exit * * * \*****************************************************************************/ static int __init sdhci_drv_init(void) { pr_info(DRIVER_NAME ": Secure Digital Host Controller Interface driver\n"); pr_info(DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); return 0; } static void __exit sdhci_drv_exit(void) { } module_init(sdhci_drv_init); module_exit(sdhci_drv_exit); module_param(debug_quirks, uint, 0444); module_param(debug_quirks2, uint, 0444); MODULE_AUTHOR("Pierre Ossman <[email protected]>"); MODULE_DESCRIPTION("Secure Digital Host Controller Interface core driver"); MODULE_LICENSE("GPL"); MODULE_PARM_DESC(debug_quirks, "Force certain quirks."); MODULE_PARM_DESC(debug_quirks2, "Force certain other quirks.");
gpl-2.0
guker/ZoneMinder
web/skins/flat/views/filter.php
13954
<?php // // ZoneMinder web filter view file, $Date$, $Revision$ // Copyright (C) 2001-2008 Philip Coombes // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // if ( !canView( 'Events' ) ) { $view = "error"; return; } $selectName = "filterName"; $filterNames = array( ''=>$SLANG['ChooseFilter'] ); foreach ( dbFetchAll( "select * from Filters order by Name" ) as $row ) { $filterNames[$row['Name']] = $row['Name']; if ( $row['Background'] ) $filterNames[$row['Name']] .= "*"; if ( !empty($_REQUEST['reload']) && isset($_REQUEST['filterName']) && $_REQUEST['filterName'] == $row['Name'] ) $dbFilter = $row; } $backgroundStr = ""; if ( isset($dbFilter) ) { if ( $dbFilter['Background'] ) $backgroundStr = '['.strtolower($SLANG['Background']).']'; $_REQUEST['filter'] = jsonDecode( $dbFilter['Query'] ); $_REQUEST['sort_field'] = isset($_REQUEST['filter']['sort_field'])?$_REQUEST['filter']['sort_field']:"DateTime"; $_REQUEST['sort_asc'] = isset($_REQUEST['filter']['sort_asc'])?$_REQUEST['filter']['sort_asc']:"1"; $_REQUEST['limit'] = isset($_REQUEST['filter']['limit'])?$_REQUEST['filter']['limit']:""; unset( $_REQUEST['filter']['sort_field'] ); unset( $_REQUEST['filter']['sort_asc'] ); unset( $_REQUEST['filter']['limit'] ); } $conjunctionTypes = array( 'and' => $SLANG['ConjAnd'], 'or' => $SLANG['ConjOr'] ); $obracketTypes = array(); $cbracketTypes = array(); if ( isset($_REQUEST['filter']['terms']) ) { for ( $i = 0; $i <= count($_REQUEST['filter']['terms'])-2; $i++ ) { $obracketTypes[$i] = str_repeat( "(", $i ); $cbracketTypes[$i] = str_repeat( ")", $i ); } } $attrTypes = array( 'MonitorId' => $SLANG['AttrMonitorId'], 'MonitorName' => $SLANG['AttrMonitorName'], 'Id' => $SLANG['AttrId'], 'Name' => $SLANG['AttrName'], 'Cause' => $SLANG['AttrCause'], 'Notes' => $SLANG['AttrNotes'], 'DateTime' => $SLANG['AttrDateTime'], 'Date' => $SLANG['AttrDate'], 'Time' => $SLANG['AttrTime'], 'Weekday' => $SLANG['AttrWeekday'], 'Length' => $SLANG['AttrDuration'], 'Frames' => $SLANG['AttrFrames'], 'AlarmFrames' => $SLANG['AttrAlarmFrames'], 'TotScore' => $SLANG['AttrTotalScore'], 'AvgScore' => $SLANG['AttrAvgScore'], 'MaxScore' => $SLANG['AttrMaxScore'], 'Archived' => $SLANG['AttrArchiveStatus'], 'DiskPercent' => $SLANG['AttrDiskPercent'], 'DiskBlocks' => $SLANG['AttrDiskBlocks'], 'SystemLoad' => $SLANG['AttrSystemLoad'], ); $opTypes = array( '=' => $SLANG['OpEq'], '!=' => $SLANG['OpNe'], '>=' => $SLANG['OpGtEq'], '>' => $SLANG['OpGt'], '<' => $SLANG['OpLt'], '<=' => $SLANG['OpLtEq'], '=~' => $SLANG['OpMatches'], '!~' => $SLANG['OpNotMatches'], '=[]' => $SLANG['OpIn'], '![]' => $SLANG['OpNotIn'], ); $archiveTypes = array( '0' => $SLANG['ArchUnarchived'], '1' => $SLANG['ArchArchived'] ); $weekdays = array(); for ( $i = 0; $i < 7; $i++ ) { $weekdays[$i] = strftime( "%A", mktime( 12, 0, 0, 1, $i+1, 2001 ) ); } $sort_fields = array( 'Id' => $SLANG['AttrId'], 'Name' => $SLANG['AttrName'], 'Cause' => $SLANG['AttrCause'], 'Notes' => $SLANG['AttrNotes'], 'MonitorName' => $SLANG['AttrMonitorName'], 'DateTime' => $SLANG['AttrDateTime'], 'Length' => $SLANG['AttrDuration'], 'Frames' => $SLANG['AttrFrames'], 'AlarmFrames' => $SLANG['AttrAlarmFrames'], 'TotScore' => $SLANG['AttrTotalScore'], 'AvgScore' => $SLANG['AttrAvgScore'], 'MaxScore' => $SLANG['AttrMaxScore'], ); $sort_dirns = array( '1' => $SLANG['SortAsc'], '0' => $SLANG['SortDesc'] ); if ( empty($_REQUEST['sort_field']) ) { $_REQUEST['sort_field'] = ZM_WEB_EVENT_SORT_FIELD; $_REQUEST['sort_asc'] = (ZM_WEB_EVENT_SORT_ORDER == "asc"); } $hasCal = file_exists( 'tools/jscalendar/calendar.js' ); $focusWindow = true; xhtmlHeaders(__FILE__, $SLANG['EventFilter'] ); ?> <body> <div id="page"> <div id="header"> <div id="headerButtons"> <a href="#" onclick="closeWindow();"><?= $SLANG['Close'] ?></a> </div> <h2><?= $SLANG['EventFilter'] ?></h2> </div> <div id="content"> <form name="contentForm" id="contentForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>"> <input type="hidden" name="view" value="filter"/> <input type="hidden" name="page" value="<?= requestVar( 'page' ) ?>"/> <input type="hidden" name="reload" value="0"/> <input type="hidden" name="execute" value="0"/> <input type="hidden" name="action" value=""/> <input type="hidden" name="subaction" value=""/> <input type="hidden" name="line" value=""/> <input type="hidden" name="fid" value=""/> <hr/> <div id="filterSelector"><label for="<?= $selectName ?>"><?= $SLANG['UseFilter'] ?></label><?php if ( count($filterNames) > 1 ) { echo buildSelect( $selectName, $filterNames, "submitToFilter( this, 1 );" ); } else { ?><select disabled="disabled"><option><?= $SLANG['NoSavedFilters'] ?></option></select><?php } ?><?= $backgroundStr ?></div> <hr/> <table id="fieldsTable" class="filterTable" cellspacing="0"> <tbody> <?php for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['terms']); $i++ ) { ?> <tr> <?php if ( $i == 0 ) { ?> <td>&nbsp;</td> <?php } else { ?> <td><?= buildSelect( "filter[terms][$i][cnj]", $conjunctionTypes ); ?></td> <?php } ?> <td><?php if ( count($_REQUEST['filter']['terms']) > 2 ) { echo buildSelect( "filter[terms][$i][obr]", $obracketTypes ); } else { ?>&nbsp;<?php } ?></td> <td><?= buildSelect( "filter[terms][$i][attr]", $attrTypes, "clearValue( this, $i ); submitToFilter( this, 0 );" ); ?></td> <?php if ( isset($_REQUEST['filter']['terms'][$i]['attr']) ) { if ( $_REQUEST['filter']['terms'][$i]['attr'] == "Archived" ) { ?> <td><?= $SLANG['OpEq'] ?><input type="hidden" name="filter[terms][<?= $i ?>][op]" value="="/></td> <td><?= buildSelect( "filter[terms][$i][val]", $archiveTypes ); ?></td> <?php } elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "DateTime" ) { ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><input type="text" name="filter[terms][<?= $i ?>][val]" id="filter[terms][<?= $i ?>][val]" value="<?= isset($_REQUEST['filter']['terms'][$i]['val'])?validHtmlStr($_REQUEST['filter']['terms'][$i]['val']):'' ?>"/><?php if ( $hasCal ) { ?><script type="text/javascript">Calendar.setup( { inputField: "filter[terms][<?= $i ?>][val]", ifFormat: "%Y-%m-%d %H:%M", showsTime: true, timeFormat: "24", showOthers: true, weekNumbers: false });</script><?php } ?></td> <?php } elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "Date" ) { ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><input type="text" name="filter[terms][<?= $i ?>][val]" id="filter[terms][<?= $i ?>][val]" value="<?= isset($_REQUEST['filter']['terms'][$i]['val'])?validHtmlStr($_REQUEST['filter']['terms'][$i]['val']):'' ?>"/><?php if ( $hasCal ) { ?><script type="text/javascript">Calendar.setup( { inputField: "filter[terms][<?= $i ?>][val]", ifFormat: "%Y-%m-%d", showOthers: true, weekNumbers: false });</script><?php } ?></td> <?php } elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "Weekday" ) { ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><?= buildSelect( "filter[terms][$i][val]", $weekdays ); ?></td> <?php } elseif ( false && $_REQUEST['filter']['terms'][$i]['attr'] == "MonitorName" ) { $monitors = array(); foreach ( dbFetchAll( "select Id,Name from Monitors order by Sequence asc" ) as $monitor ) { if ( visibleMonitor( $monitor['Id'] ) ) { $monitors[$monitor['Name']] = $monitor['Name']; } } ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><?= buildSelect( "filter[terms][$i][val]", $monitors ); ?></td> <?php } else { ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><input type="text" name="filter[terms][<?= $i ?>][val]" value="<?= $_REQUEST['filter']['terms'][$i]['val'] ?>"/></td> <?php } } else { ?> <td><?= buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td> <td><input type="text" name="filter[terms][<?= $i ?>][val]" value="<?= isset($_REQUEST['filter']['terms'][$i]['val'])?$_REQUEST['filter']['terms'][$i]['val']:'' ?>"/></td> <?php } ?> <td><?php if ( count($_REQUEST['filter']['terms']) > 2 ) { echo buildSelect( "filter[terms][$i][cbr]", $cbracketTypes ); } else { ?>&nbsp;<?php } ?></td> <td><input type="button" onclick="addTerm( this, <?= $i+1 ?> )" value="+"/><?php if ( $_REQUEST['filter']['terms'] > 1 ) { ?><input type="button" onclick="delTerm( this, <?= $i ?> )" value="-"/><?php } ?></td> </tr> <?php } ?> </tbody> </table> <hr/> <table id="sortTable" class="filterTable" cellspacing="0"> <tbody> <tr> <td><label for="sort_field"><?= $SLANG['SortBy'] ?></label><?= buildSelect( "sort_field", $sort_fields ); ?><?= buildSelect( "sort_asc", $sort_dirns ); ?></td> <td><label for="limit"><?= $SLANG['LimitResultsPre'] ?></label><input type="text" size="6" id="limit" name="limit" value="<?= isset($_REQUEST['limit'])?validInt($_REQUEST['limit']):"" ?>"/><?= $SLANG['LimitResultsPost'] ?></td> </tr> </tbody> </table> <hr/> <table id="actionsTable" class="filterTable" cellspacing="0"> <tbody> <tr> <td><?= $SLANG['FilterArchiveEvents'] ?></td> <td><input type="checkbox" name="autoArchive" value="1"<?php if ( !empty($dbFilter['AutoArchive']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> <?php if ( ZM_OPT_FFMPEG ) { ?> <tr> <td><?= $SLANG['FilterVideoEvents'] ?></td> <td><input type="checkbox" name="autoVideo" value="1"<?php if ( !empty($dbFilter['AutoVideo']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> <?php } if ( ZM_OPT_UPLOAD ) { ?> <tr> <td><?= $SLANG['FilterUploadEvents'] ?></td> <td><input type="checkbox" name="autoUpload" value="1"<?php if ( !empty($dbFilter['AutoUpload']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> <?php } if ( ZM_OPT_EMAIL ) { ?> <tr> <td><?= $SLANG['FilterEmailEvents'] ?></td> <td><input type="checkbox" name="autoEmail" value="1"<?php if ( !empty($dbFilter['AutoEmail']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> <?php } if ( ZM_OPT_MESSAGE ) { ?> <tr> <td><?= $SLANG['FilterMessageEvents'] ?></td> <td><input type="checkbox" name="autoMessage" value="1"<?php if ( !empty($dbFilter['AutoMessage']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> <?php } ?> <tr> <td><?= $SLANG['FilterExecuteEvents'] ?></td> <td><input type="checkbox" name="autoExecute" value="1"<?php if ( !empty($dbFilter['AutoExecute']) ) { ?> checked="checked"<?php } ?>/><input type="text" name="autoExecuteCmd" value="<?= isset($dbFilter['AutoExecuteCmd'])?$dbFilter['AutoExecuteCmd']:"" ?>" size="32" maxlength="255" onchange="updateButtons( this )"/></td> </tr> <tr> <td><?= $SLANG['FilterDeleteEvents'] ?></td> <td colspan="2"><input type="checkbox" name="autoDelete" value="1"<?php if ( !empty($dbFilter['AutoDelete']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> </tr> </tbody> </table> <hr/> <div id="contentButtons"> <input type="submit" value="<?= $SLANG['Submit'] ?>" onclick="submitToEvents( this );"/> <input type="button" name="executeButton" id="executeButton" value="<?= $SLANG['Execute'] ?>" onclick="executeFilter( this );"/> <?php if ( canEdit( 'Events' ) ) { ?> <input type="button" value="<?= $SLANG['Save'] ?>" onclick="saveFilter( this );"/><?php } ?> <?php if ( canEdit( 'Events' ) && isset($dbFilter) ) { ?> <input type="button" value="<?= $SLANG['Delete'] ?>" onclick="deleteFilter( this, '<?= $dbFilter['Name'] ?>' );"/><?php } ?> <input type="button" value="<?= $SLANG['Reset'] ?>" onclick="submitToFilter( this, 1 );"/> </div> </form> </div> </div> </body> </html>
gpl-2.0
kinap/scapy
scapy/modules/voip.py
4288
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ VoIP (Voice over IP) related functions """ import os ################### ## Testing stuff ## ################### from fcntl import fcntl from scapy.sendrecv import sniff from scapy.layers.inet import IP,UDP from scapy.layers.rtp import RTP from scapy.utils import get_temp_file def merge(x,y,sample_size=2): if len(x) > len(y): y += "\x00"*(len(x)-len(y)) elif len(x) < len(y): x += "\x00"*(len(y)-len(x)) m = "" ss=sample_size for i in xrange(len(x)/ss): m += x[ss*i:ss*(i+1)]+y[ss*i:ss*(i+1)] return m # return "".join(map(str.__add__, x, y)) def voip_play(s1,list=None,**kargs): FIFO=get_temp_file() FIFO1=FIFO % 1 FIFO2=FIFO % 2 os.mkfifo(FIFO1) os.mkfifo(FIFO2) try: os.system("soxmix -t .ul %s -t .ul %s -t ossdsp /dev/dsp &" % (FIFO1,FIFO2)) c1=open(FIFO1,"w", 4096) c2=open(FIFO2,"w", 4096) fcntl.fcntl(c1.fileno(),fcntl.F_SETFL, os.O_NONBLOCK) fcntl.fcntl(c2.fileno(),fcntl.F_SETFL, os.O_NONBLOCK) # dsp,rd = os.popen2("sox -t .ul -c 2 - -t ossdsp /dev/dsp") def play(pkt, last=None): if last is None: last = [] if not pkt: return if not pkt.haslayer(UDP): return ip=pkt.getlayer(IP) if s1 in [ip.src, ip.dst]: if not last: last.append(pkt) return load=last.pop() # x1 = load.load[12:] c1.write(load.load[12:]) if load.getlayer(IP).src == ip.src: # x2 = "" c2.write("\x00"*len(load.load[12:])) last.append(pkt) else: # x2 = pkt.load[:12] c2.write(pkt.load[12:]) # dsp.write(merge(x1,x2)) if list is None: sniff(store=0, prn=play, **kargs) else: for p in list: play(p) finally: os.unlink(FIFO1) os.unlink(FIFO2) def voip_play1(s1,list=None,**kargs): dsp,rd = os.popen2("sox -t .ul - -t ossdsp /dev/dsp") def play(pkt): if not pkt: return if not pkt.haslayer(UDP): return ip=pkt.getlayer(IP) if s1 in [ip.src, ip.dst]: from scapy.config import conf dsp.write(pkt.getlayer(conf.raw_layer).load[12:]) try: if list is None: sniff(store=0, prn=play, **kargs) else: for p in list: play(p) finally: dsp.close() rd.close() def voip_play2(s1,**kargs): dsp,rd = os.popen2("sox -t .ul -c 2 - -t ossdsp /dev/dsp") def play(pkt, last=None): if last is None: last = [] if not pkt: return if not pkt.haslayer(UDP): return ip=pkt.getlayer(IP) if s1 in [ip.src, ip.dst]: if not last: last.append(pkt) return load=last.pop() x1 = load.load[12:] # c1.write(load.load[12:]) if load.getlayer(IP).src == ip.src: x2 = "" # c2.write("\x00"*len(load.load[12:])) last.append(pkt) else: x2 = pkt.load[:12] # c2.write(pkt.load[12:]) dsp.write(merge(x1,x2)) sniff(store=0, prn=play, **kargs) def voip_play3(lst=None,**kargs): dsp,rd = os.popen2("sox -t .ul - -t ossdsp /dev/dsp") try: def play(pkt, dsp=dsp): from scapy.config import conf if pkt and pkt.haslayer(UDP) and pkt.haslayer(conf.raw_layer): dsp.write(pkt.getlayer(RTP).load) if lst is None: sniff(store=0, prn=play, **kargs) else: for p in lst: play(p) finally: try: dsp.close() rd.close() except: pass
gpl-2.0
Bootz/TC-One
src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
6578
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: Boss_Warp_Splinter SD%Complete: 80 SDComment: Includes Sapling (need some better control with these). SDCategory: Tempest Keep, The Botanica EndScriptData */ #include "precompiled.h" /*##### # mob_treant (Sapling) #####*/ #define SPELL_HEAL_FATHER 6262 struct TRINITY_DLL_DECL mob_treantAI : public ScriptedAI { mob_treantAI (Creature *c) : ScriptedAI(c) { WarpGuid = 0; } uint64 WarpGuid; uint32 check_Timer; void Reset() { check_Timer = 0; } void EnterCombat(Unit *who) {} void MoveInLineOfSight(Unit*) {} void UpdateAI(const uint32 diff) { if (!UpdateVictim() ) { if(WarpGuid && check_Timer < diff) { if(Unit *Warp = (Unit*)Unit::GetUnit(*m_creature, WarpGuid)) { if(m_creature->IsWithinMeleeRange(Warp,2.5f)) { int32 CurrentHP_Treant = (int32)m_creature->GetHealth(); Warp->CastCustomSpell(Warp,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID()); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } m_creature->GetMotionMaster()->MoveFollow(Warp,0,0); } check_Timer = 1000; }else check_Timer -= diff; return; } if (m_creature->getVictim()->GetGUID() != WarpGuid) DoMeleeAttackIfReady(); } }; /*##### # boss_warp_splinter #####*/ #define SAY_AGGRO -1553007 #define SAY_SLAY_1 -1553008 #define SAY_SLAY_2 -1553009 #define SAY_SUMMON_1 -1553010 #define SAY_SUMMON_2 -1553011 #define SAY_DEATH -1553012 #define WAR_STOMP 34716 #define SUMMON_TREANTS 34727 // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon) #define ARCANE_VOLLEY (HeroicMode?39133:36705) #define CREATURE_TREANT 19949 #define TREANT_SPAWN_DIST 50 //50 yards from Warp Splinter's spawn point float treant_pos[6][3] = { {24.301233, 427.221100, -27.060635}, {16.795492, 359.678802, -27.355425}, {53.493484, 345.381470, -26.196192}, {61.867096, 439.362732, -25.921030}, {109.861877, 423.201630, -27.356019}, {106.780159, 355.582581, -27.593357} }; struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI { boss_warp_splinterAI(Creature *c) : ScriptedAI(c) { HeroicMode = c->GetMap()->IsHeroic(); Treant_Spawn_Pos_X = c->GetPositionX(); Treant_Spawn_Pos_Y = c->GetPositionY(); } uint32 War_Stomp_Timer; uint32 Summon_Treants_Timer; uint32 Arcane_Volley_Timer; bool HeroicMode; float Treant_Spawn_Pos_X; float Treant_Spawn_Pos_Y; void Reset() { War_Stomp_Timer = 25000 + rand()%15000; Summon_Treants_Timer = 45000; Arcane_Volley_Timer = 8000 + rand()%12000; m_creature->SetSpeed( MOVE_RUN, 0.7f, true); } void EnterCombat(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); } void KilledUnit(Unit* victim) { switch(rand()%2) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; } } void JustDied(Unit* Killer) { DoScriptText(SAY_DEATH, m_creature); } void SummonTreants() { for(int i = 0; i < 6; ++i) { float angle = (M_PI / 3) * i; float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle); float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle); float O = - m_creature->GetAngle(X,Y); if(Creature *pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000)) ((mob_treantAI*)pTreant->AI())->WarpGuid = m_creature->GetGUID(); } switch(rand()%2) { case 0: DoScriptText(SAY_SUMMON_1, m_creature); break; case 1: DoScriptText(SAY_SUMMON_2, m_creature); break; } } void UpdateAI(const uint32 diff) { if (!UpdateVictim() ) return; //Check for War Stomp if(War_Stomp_Timer < diff) { DoCast(m_creature->getVictim(),WAR_STOMP); War_Stomp_Timer = 25000 + rand()%15000; }else War_Stomp_Timer -= diff; //Check for Arcane Volley if(Arcane_Volley_Timer < diff) { DoCast(m_creature->getVictim(),ARCANE_VOLLEY); Arcane_Volley_Timer = 20000 + rand()%15000; }else Arcane_Volley_Timer -= diff; //Check for Summon Treants if(Summon_Treants_Timer < diff) { SummonTreants(); Summon_Treants_Timer = 45000; }else Summon_Treants_Timer -= diff; DoMeleeAttackIfReady(); } }; CreatureAI* GetAI_boss_warp_splinter(Creature *_Creature) { return new boss_warp_splinterAI (_Creature); } CreatureAI* GetAI_mob_treant(Creature *_Creature) { return new mob_treantAI (_Creature); } void AddSC_boss_warp_splinter() { Script *newscript; newscript = new Script; newscript->Name="boss_warp_splinter"; newscript->GetAI = &GetAI_boss_warp_splinter; newscript->RegisterSelf(); newscript = new Script; newscript->Name="mob_warp_splinter_treant"; newscript->GetAI = &GetAI_mob_treant; newscript->RegisterSelf(); }
gpl-2.0
dumbbell/virt-manager
src/virtManager/secret.py
1629
# # Copyright (C) 2006 Red Hat, Inc. # Copyright (C) 2006 Daniel P. Berrange <[email protected]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. # class vmmSecret(object): def __init__(self, name, secret=None, attributes=None): self.name = name self.secret = secret if attributes == None: attributes = {} self.attributes = attributes def set_secret(self, data): self.secret = data def get_secret(self): return self.secret def get_name(self): return self.name def get_attributes(self): return self.attributes def has_attribute(self, key): return key in self.attributes def add_attribute(self, key, value): if type(value) != str: value = str(value) self.attributes[key] = value def list_attributes(self): return self.attributes.keys() def get_attribute(self, key): return self.attributes[key]
gpl-2.0
Esleelkartea/kz-adeada-talleres-electricos-
kzadeadatallereselectricos_v1.0.0_win32_installer/windows/xampp/htdocs/kz_adeada_talleres_electricos/commons/calidad/dir/nueva_reunion.php
4891
<?php /////////////////////////////////////////////////////////////////////////// // // // NOTICE OF COPYRIGHT // // // // Adeada Talleres Electricos // // http://www.grupogisma.com // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details: // // // // http://www.gnu.org/copyleft/gpl.html // // // /////////////////////////////////////////////////////////////////////////// require('../../../functions/globales.php'); require('../include/rutas.php'); require('../functions/main.php'); require('../struct/login2.php'); include('../struct/header_dir.php'); require('../functions/dir_functions.php'); require('dir_preacciones.php'); ?> <script>document.getElementById("lnk_direccion").setAttribute("class", "seleccionado");</script> <script>document.getElementById("lnk_ver_reuniones").setAttribute("class", "seleccionado");</script> <div id="cuerpo2"> <form action="ver_reuniones.php" id="crear_reunion" name="form_crear" method="post"> <input type='hidden' name='new_reunion' value='new_reunion'></input> <table class="tabla_sin_borde" width="100%"> <tr> <td width="25%">Departamento:</td> <td> Selecci&oacute;nalo: <select name='departamento' id='departamento' onChange="$('#departamento_tipo').attr('value', this.value);"> <option value=''></option> <?php $departamentos = mostrar_departamentos(); foreach($departamentos as $key => $valor){ ?> <option value='<?php echo $valor[0]; ?>'><?php echo $valor[0]; ?></option> <?php }?> </select> , o introduce uno nuevo: <input type='text' name='departamento_tipo' id='departamento_tipo' class='requerido' value='' size=35></input> </td> </tr> <tr> <td>Fecha:</td> <td><input type='text' name='fecha' id='fecha' value='' size='14'></input> <img style="cursor:pointer;" src='<?php echo CAL_RUTA_NIVEL1."img/calendar2.png";?>' id='edit_fechacreacion'> <script> Calendar.setup({ trigger : "edit_fechacreacion", inputField : "fecha" }); </script> </td> </tr> <tr> <td>Asistentes:</td> <td><input type="text" name='asistentes' id="asistentes" value='' size='60'></td> </tr> <tr> <td>Objeto de la reuni&oacute;n:</td> <td><input type="text" name='objeto' id="objeto" value='' size='35'></td> </tr> <tr> <td>Fecha siguiente reuni&oacute;n:</td> <td><input type='text' name='fechasig' id='fechasig' value='' size='14'></input> <img style="cursor:pointer;" src='<?php echo CAL_RUTA_NIVEL1."img/calendar2.png";?>' id='cal1'> <script> Calendar.setup({ trigger : "cal1", inputField : "fechasig" }); </script> </td> </tr> <tr> <td>Hora:</td> <td><input type="text" name='hora_siguiente' id="hora_siguiente" value='' size='14'></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td> <input class="bt-accion" type="button" onclick="$('#crear_reunion').submit();" name="img_crear" id="img_crear" value="Crear" /> <input class="bt-accion" type="button" onclick="$('#cancelar_<?php echo $valor['id']; ?>').submit();" name="img_cancelar" id="img_cancelar<?php echo $valor['id']; ?>" value="Cancelar" /> </td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> </form> <form action="ver_reuniones.php" method="post" id="cancelar_<?php echo $valor['id'];?>"> </form> </div> <?php include('../struct/footer2.php');?> </div> </div> </body> </html>
gpl-2.0
sunsided/player
server/drivers/localization/ekfvloc/scan.hh
2078
/* * Player - One Hell of a Robot Server * Copyright (C) 2010 * Mayte Lázaro, Alejandro R. Mosteo * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SCAN_H_ #define SCAN_H_ #include <vector> #include "types.hh" #include "uloc.hh" class Scan { public: /// Provide laser parameters: maximum range and its pose on top of robot, /// and noise model. Scan(double max_range, double laser_x, double laser_y, double laser_angle, double laser_noise_range, double laser_noise_bearing); const Uloc & uloc(const int i) const; // read only access /// Update laser pose void SetLaserPose(double x, double y, double a); /// Set last laser reading /// Removes out of range values and attaches the uncertainty model void SetLastScan(const DoublesVector& ranges, const DoublesVector& bearings); int ScanCount(void) const; double phi(const int i) const; double rho(const int i) const; const double kOutOfRange_; const double kLaserNoiseRange_; const double kLaserNoiseBearing_; private: Uloc AttachReferenceToScanPoint(double rho, double phi); void addUloc(Uloc u); vector<Uloc> ulocs_; DoublesVector rho_; // Distance DoublesVector phi_; // Bearing Transf xform_laser_to_robot_; }; #endif /* SCAN_H_ */
gpl-2.0
fergy/iphone_kernel
arch/arm/mach-s5l8930/mach-iphone4.c
2051
/** * Copyright (c) 2011 Richard Ian Taylor. * * This file is part of the iDroid Project. (http://www.idroidproject.org). * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/device.h> #include <linux/types.h> #include <linux/platform_device.h> #include <linux/gpio_keys.h> #include <linux/input.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <plat/display-pipe.h> #include <plat/mipi_dsim.h> #include <plat/cpu.h> #include <mach/cpu.h> #include <mach/time.h> #include <mach/map.h> #include <mach/gpio.h> #include <mach/devices.h> static struct s5l_clcd_info clcd_info = { .reset_pin = S5L8930_GPIO(0x206), .pull_pin = S5L8930_GPIO(0x207), .irq = IRQ_CLCD0, .dot_pitch = 326, .horizontal = { 71, 71, 73 }, .vertical = { 12, 12, 16 }, }; static struct fb_videomode video_mode = { .xres = 640, .yres = 960, .pixclock = 51300000, .left_margin = 15, .right_margin = 14, .upper_margin = 12, .lower_margin = 12, .hsync_len = 1, .vsync_len = 16, .flag = 0xD, }; static struct gpio_keys_button buttons[] = { [0] = { .type = EV_KEY, .code = KEY_ENTER, .gpio = S5L8930_GPIO(0x7), .desc = "Home", }, [1] = { .type = EV_KEY, .code = KEY_ESC, .gpio = S5L8930_GPIO(0x1), .desc = "Hold", }, [2] = { .type = EV_KEY, .code = KEY_VOLUMEUP, .gpio = S5L8930_GPIO(0x2), .desc = "Volume Up", }, [3] = { .type = EV_KEY, .code = KEY_VOLUMEDOWN, .gpio = S5L8930_GPIO(0x3), .desc = "Volume Down", }, }; static void __init ip4_init(void) { s5l8930_init(); s5l8930_register_gpio_keys(buttons, ARRAY_SIZE(buttons)); s5l8930_register_mipi_dsim(&video_mode, 2, 57, 1, 3); s5l8930_register_clcd(&video_mode, 24, &clcd_info); } MACHINE_START(IPHONE_4, "Apple iPhone 4") /* Maintainer: iDroid Project */ .map_io = s5l8930_map_io, .init_irq = s5l8930_init_irq, .timer = &s5l8930_timer, .init_machine = ip4_init, MACHINE_END
gpl-2.0
md5555/S6-UniKernel
kernel/timer.c
49410
/* * linux/kernel/timer.c * * Kernel internal timers * * Copyright (C) 1991, 1992 Linus Torvalds * * 1997-01-28 Modified by Finn Arne Gangstad to make timers scale better. * * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills * 1998-12-24 Fixed a xtime SMP race (we need the xtime_lock rw spinlock to * serialize accesses to xtime/lost_ticks). * Copyright (C) 1998 Andrea Arcangeli * 1999-03-10 Improved NTP compatibility by Ulrich Windl * 2002-05-31 Move sys_sysinfo here and make its locking sane, Robert Love * 2000-10-05 Implemented scalable SMP per-CPU timer handling. * Copyright (C) 2000, 2001, 2002 Ingo Molnar * Designed by David S. Miller, Alexey Kuznetsov and Ingo Molnar */ #include <linux/kernel_stat.h> #include <linux/export.h> #include <linux/interrupt.h> #include <linux/percpu.h> #include <linux/init.h> #include <linux/mm.h> #include <linux/swap.h> #include <linux/pid_namespace.h> #include <linux/notifier.h> #include <linux/thread_info.h> #include <linux/time.h> #include <linux/jiffies.h> #include <linux/posix-timers.h> #include <linux/cpu.h> #include <linux/syscalls.h> #include <linux/delay.h> #include <linux/tick.h> #include <linux/kallsyms.h> #include <linux/irq_work.h> #include <linux/sched.h> #include <linux/sched/sysctl.h> #include <linux/slab.h> #include <linux/compat.h> #include <asm/uaccess.h> #include <asm/unistd.h> #include <asm/div64.h> #include <asm/timex.h> #include <asm/io.h> #define CREATE_TRACE_POINTS #include <trace/events/timer.h> u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES; EXPORT_SYMBOL(jiffies_64); /* * per-CPU timer vector definitions: */ #define TVN_BITS (CONFIG_BASE_SMALL ? 4 : 6) #define TVR_BITS (CONFIG_BASE_SMALL ? 6 : 8) #define TVN_SIZE (1 << TVN_BITS) #define TVR_SIZE (1 << TVR_BITS) #define TVN_MASK (TVN_SIZE - 1) #define TVR_MASK (TVR_SIZE - 1) #define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1)) struct tvec { struct list_head vec[TVN_SIZE]; }; struct tvec_root { struct list_head vec[TVR_SIZE]; }; struct tvec_base { spinlock_t lock; struct timer_list *running_timer; unsigned long timer_jiffies; unsigned long next_timer; unsigned long active_timers; struct tvec_root tv1; struct tvec tv2; struct tvec tv3; struct tvec tv4; struct tvec tv5; } ____cacheline_aligned; struct tvec_base boot_tvec_bases; EXPORT_SYMBOL(boot_tvec_bases); static DEFINE_PER_CPU(struct tvec_base *, tvec_bases) = &boot_tvec_bases; /* Functions below help us manage 'deferrable' flag */ static inline unsigned int tbase_get_deferrable(struct tvec_base *base) { return ((unsigned int)(unsigned long)base & TIMER_DEFERRABLE); } static inline unsigned int tbase_get_irqsafe(struct tvec_base *base) { return ((unsigned int)(unsigned long)base & TIMER_IRQSAFE); } static inline struct tvec_base *tbase_get_base(struct tvec_base *base) { return ((struct tvec_base *)((unsigned long)base & ~TIMER_FLAG_MASK)); } static inline void timer_set_base(struct timer_list *timer, struct tvec_base *new_base) { unsigned long flags = (unsigned long)timer->base & TIMER_FLAG_MASK; timer->base = (struct tvec_base *)((unsigned long)(new_base) | flags); } static unsigned long round_jiffies_common(unsigned long j, int cpu, bool force_up) { int rem; unsigned long original = j; /* * We don't want all cpus firing their timers at once hitting the * same lock or cachelines, so we skew each extra cpu with an extra * 3 jiffies. This 3 jiffies came originally from the mm/ code which * already did this. * The skew is done by adding 3*cpunr, then round, then subtract this * extra offset again. */ j += cpu * 3; rem = j % HZ; /* * If the target jiffie is just after a whole second (which can happen * due to delays of the timer irq, long irq off times etc etc) then * we should round down to the whole second, not up. Use 1/4th second * as cutoff for this rounding as an extreme upper bound for this. * But never round down if @force_up is set. */ if (rem < HZ/4 && !force_up) /* round down */ j = j - rem; else /* round up */ j = j - rem + HZ; /* now that we have rounded, subtract the extra skew again */ j -= cpu * 3; /* * Make sure j is still in the future. Otherwise return the * unmodified value. */ return time_is_after_jiffies(j) ? j : original; } /** * __round_jiffies - function to round jiffies to a full second * @j: the time in (absolute) jiffies that should be rounded * @cpu: the processor number on which the timeout will happen * * __round_jiffies() rounds an absolute time in the future (in jiffies) * up or down to (approximately) full seconds. This is useful for timers * for which the exact time they fire does not matter too much, as long as * they fire approximately every X seconds. * * By rounding these timers to whole seconds, all such timers will fire * at the same time, rather than at various times spread out. The goal * of this is to have the CPU wake up less, which saves power. * * The exact rounding is skewed for each processor to avoid all * processors firing at the exact same time, which could lead * to lock contention or spurious cache line bouncing. * * The return value is the rounded version of the @j parameter. */ unsigned long __round_jiffies(unsigned long j, int cpu) { return round_jiffies_common(j, cpu, false); } EXPORT_SYMBOL_GPL(__round_jiffies); /** * __round_jiffies_relative - function to round jiffies to a full second * @j: the time in (relative) jiffies that should be rounded * @cpu: the processor number on which the timeout will happen * * __round_jiffies_relative() rounds a time delta in the future (in jiffies) * up or down to (approximately) full seconds. This is useful for timers * for which the exact time they fire does not matter too much, as long as * they fire approximately every X seconds. * * By rounding these timers to whole seconds, all such timers will fire * at the same time, rather than at various times spread out. The goal * of this is to have the CPU wake up less, which saves power. * * The exact rounding is skewed for each processor to avoid all * processors firing at the exact same time, which could lead * to lock contention or spurious cache line bouncing. * * The return value is the rounded version of the @j parameter. */ unsigned long __round_jiffies_relative(unsigned long j, int cpu) { unsigned long j0 = jiffies; /* Use j0 because jiffies might change while we run */ return round_jiffies_common(j + j0, cpu, false) - j0; } EXPORT_SYMBOL_GPL(__round_jiffies_relative); /** * round_jiffies - function to round jiffies to a full second * @j: the time in (absolute) jiffies that should be rounded * * round_jiffies() rounds an absolute time in the future (in jiffies) * up or down to (approximately) full seconds. This is useful for timers * for which the exact time they fire does not matter too much, as long as * they fire approximately every X seconds. * * By rounding these timers to whole seconds, all such timers will fire * at the same time, rather than at various times spread out. The goal * of this is to have the CPU wake up less, which saves power. * * The return value is the rounded version of the @j parameter. */ unsigned long round_jiffies(unsigned long j) { return round_jiffies_common(j, raw_smp_processor_id(), false); } EXPORT_SYMBOL_GPL(round_jiffies); /** * round_jiffies_relative - function to round jiffies to a full second * @j: the time in (relative) jiffies that should be rounded * * round_jiffies_relative() rounds a time delta in the future (in jiffies) * up or down to (approximately) full seconds. This is useful for timers * for which the exact time they fire does not matter too much, as long as * they fire approximately every X seconds. * * By rounding these timers to whole seconds, all such timers will fire * at the same time, rather than at various times spread out. The goal * of this is to have the CPU wake up less, which saves power. * * The return value is the rounded version of the @j parameter. */ unsigned long round_jiffies_relative(unsigned long j) { return __round_jiffies_relative(j, raw_smp_processor_id()); } EXPORT_SYMBOL_GPL(round_jiffies_relative); /** * __round_jiffies_up - function to round jiffies up to a full second * @j: the time in (absolute) jiffies that should be rounded * @cpu: the processor number on which the timeout will happen * * This is the same as __round_jiffies() except that it will never * round down. This is useful for timeouts for which the exact time * of firing does not matter too much, as long as they don't fire too * early. */ unsigned long __round_jiffies_up(unsigned long j, int cpu) { return round_jiffies_common(j, cpu, true); } EXPORT_SYMBOL_GPL(__round_jiffies_up); /** * __round_jiffies_up_relative - function to round jiffies up to a full second * @j: the time in (relative) jiffies that should be rounded * @cpu: the processor number on which the timeout will happen * * This is the same as __round_jiffies_relative() except that it will never * round down. This is useful for timeouts for which the exact time * of firing does not matter too much, as long as they don't fire too * early. */ unsigned long __round_jiffies_up_relative(unsigned long j, int cpu) { unsigned long j0 = jiffies; /* Use j0 because jiffies might change while we run */ return round_jiffies_common(j + j0, cpu, true) - j0; } EXPORT_SYMBOL_GPL(__round_jiffies_up_relative); /** * round_jiffies_up - function to round jiffies up to a full second * @j: the time in (absolute) jiffies that should be rounded * * This is the same as round_jiffies() except that it will never * round down. This is useful for timeouts for which the exact time * of firing does not matter too much, as long as they don't fire too * early. */ unsigned long round_jiffies_up(unsigned long j) { return round_jiffies_common(j, raw_smp_processor_id(), true); } EXPORT_SYMBOL_GPL(round_jiffies_up); /** * round_jiffies_up_relative - function to round jiffies up to a full second * @j: the time in (relative) jiffies that should be rounded * * This is the same as round_jiffies_relative() except that it will never * round down. This is useful for timeouts for which the exact time * of firing does not matter too much, as long as they don't fire too * early. */ unsigned long round_jiffies_up_relative(unsigned long j) { return __round_jiffies_up_relative(j, raw_smp_processor_id()); } EXPORT_SYMBOL_GPL(round_jiffies_up_relative); /** * set_timer_slack - set the allowed slack for a timer * @timer: the timer to be modified * @slack_hz: the amount of time (in jiffies) allowed for rounding * * Set the amount of time, in jiffies, that a certain timer has * in terms of slack. By setting this value, the timer subsystem * will schedule the actual timer somewhere between * the time mod_timer() asks for, and that time plus the slack. * * By setting the slack to -1, a percentage of the delay is used * instead. */ void set_timer_slack(struct timer_list *timer, int slack_hz) { timer->slack = slack_hz; } EXPORT_SYMBOL_GPL(set_timer_slack); static void __internal_add_timer(struct tvec_base *base, struct timer_list *timer) { unsigned long expires = timer->expires; unsigned long idx = expires - base->timer_jiffies; struct list_head *vec; if (idx < TVR_SIZE) { int i = expires & TVR_MASK; vec = base->tv1.vec + i; } else if (idx < 1 << (TVR_BITS + TVN_BITS)) { int i = (expires >> TVR_BITS) & TVN_MASK; vec = base->tv2.vec + i; } else if (idx < 1 << (TVR_BITS + 2 * TVN_BITS)) { int i = (expires >> (TVR_BITS + TVN_BITS)) & TVN_MASK; vec = base->tv3.vec + i; } else if (idx < 1 << (TVR_BITS + 3 * TVN_BITS)) { int i = (expires >> (TVR_BITS + 2 * TVN_BITS)) & TVN_MASK; vec = base->tv4.vec + i; } else if ((signed long) idx < 0) { /* * Can happen if you add a timer with expires == jiffies, * or you set a timer to go off in the past */ vec = base->tv1.vec + (base->timer_jiffies & TVR_MASK); } else { int i; /* If the timeout is larger than MAX_TVAL (on 64-bit * architectures or with CONFIG_BASE_SMALL=1) then we * use the maximum timeout. */ if (idx > MAX_TVAL) { idx = MAX_TVAL; expires = idx + base->timer_jiffies; } i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK; vec = base->tv5.vec + i; } /* * Timers are FIFO: */ list_add_tail(&timer->entry, vec); } static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) { __internal_add_timer(base, timer); /* * Update base->active_timers and base->next_timer */ if (!tbase_get_deferrable(timer->base)) { if (time_before(timer->expires, base->next_timer)) base->next_timer = timer->expires; base->active_timers++; } } #ifdef CONFIG_TIMER_STATS void __timer_stats_timer_set_start_info(struct timer_list *timer, void *addr) { if (timer->start_site) return; timer->start_site = addr; memcpy(timer->start_comm, current->comm, TASK_COMM_LEN); timer->start_pid = current->pid; } static void timer_stats_account_timer(struct timer_list *timer) { unsigned int flag = 0; if (likely(!timer->start_site)) return; if (unlikely(tbase_get_deferrable(timer->base))) flag |= TIMER_STATS_FLAG_DEFERRABLE; timer_stats_update_stats(timer, timer->start_pid, timer->start_site, timer->function, timer->start_comm, flag); } #else static void timer_stats_account_timer(struct timer_list *timer) {} #endif #ifdef CONFIG_DEBUG_OBJECTS_TIMERS static struct debug_obj_descr timer_debug_descr; static void *timer_debug_hint(void *addr) { return ((struct timer_list *) addr)->function; } /* * fixup_init is called when: * - an active object is initialized */ static int timer_fixup_init(void *addr, enum debug_obj_state state) { struct timer_list *timer = addr; switch (state) { case ODEBUG_STATE_ACTIVE: del_timer_sync(timer); debug_object_init(timer, &timer_debug_descr); return 1; default: return 0; } } /* Stub timer callback for improperly used timers. */ static void stub_timer(unsigned long data) { WARN_ON(1); } /* * fixup_activate is called when: * - an active object is activated * - an unknown object is activated (might be a statically initialized object) */ static int timer_fixup_activate(void *addr, enum debug_obj_state state) { struct timer_list *timer = addr; switch (state) { case ODEBUG_STATE_NOTAVAILABLE: /* * This is not really a fixup. The timer was * statically initialized. We just make sure that it * is tracked in the object tracker. */ if (timer->entry.next == NULL && timer->entry.prev == TIMER_ENTRY_STATIC) { debug_object_init(timer, &timer_debug_descr); debug_object_activate(timer, &timer_debug_descr); return 0; } else { setup_timer(timer, stub_timer, 0); return 1; } return 0; case ODEBUG_STATE_ACTIVE: WARN_ON(1); default: return 0; } } /* * fixup_free is called when: * - an active object is freed */ static int timer_fixup_free(void *addr, enum debug_obj_state state) { struct timer_list *timer = addr; switch (state) { case ODEBUG_STATE_ACTIVE: del_timer_sync(timer); debug_object_free(timer, &timer_debug_descr); return 1; default: return 0; } } /* * fixup_assert_init is called when: * - an untracked/uninit-ed object is found */ static int timer_fixup_assert_init(void *addr, enum debug_obj_state state) { struct timer_list *timer = addr; switch (state) { case ODEBUG_STATE_NOTAVAILABLE: if (timer->entry.prev == TIMER_ENTRY_STATIC) { /* * This is not really a fixup. The timer was * statically initialized. We just make sure that it * is tracked in the object tracker. */ debug_object_init(timer, &timer_debug_descr); return 0; } else { setup_timer(timer, stub_timer, 0); return 1; } default: return 0; } } static struct debug_obj_descr timer_debug_descr = { .name = "timer_list", .debug_hint = timer_debug_hint, .fixup_init = timer_fixup_init, .fixup_activate = timer_fixup_activate, .fixup_free = timer_fixup_free, .fixup_assert_init = timer_fixup_assert_init, }; static inline void debug_timer_init(struct timer_list *timer) { debug_object_init(timer, &timer_debug_descr); } static inline void debug_timer_activate(struct timer_list *timer) { debug_object_activate(timer, &timer_debug_descr); } static inline void debug_timer_deactivate(struct timer_list *timer) { debug_object_deactivate(timer, &timer_debug_descr); } static inline void debug_timer_free(struct timer_list *timer) { debug_object_free(timer, &timer_debug_descr); } static inline void debug_timer_assert_init(struct timer_list *timer) { debug_object_assert_init(timer, &timer_debug_descr); } static void do_init_timer(struct timer_list *timer, unsigned int flags, const char *name, struct lock_class_key *key); void init_timer_on_stack_key(struct timer_list *timer, unsigned int flags, const char *name, struct lock_class_key *key) { debug_object_init_on_stack(timer, &timer_debug_descr); do_init_timer(timer, flags, name, key); } EXPORT_SYMBOL_GPL(init_timer_on_stack_key); void destroy_timer_on_stack(struct timer_list *timer) { debug_object_free(timer, &timer_debug_descr); } EXPORT_SYMBOL_GPL(destroy_timer_on_stack); #else static inline void debug_timer_init(struct timer_list *timer) { } static inline void debug_timer_activate(struct timer_list *timer) { } static inline void debug_timer_deactivate(struct timer_list *timer) { } static inline void debug_timer_assert_init(struct timer_list *timer) { } #endif static inline void debug_init(struct timer_list *timer) { debug_timer_init(timer); trace_timer_init(timer); } static inline void debug_activate(struct timer_list *timer, unsigned long expires) { debug_timer_activate(timer); trace_timer_start(timer, expires); } static inline void debug_deactivate(struct timer_list *timer) { debug_timer_deactivate(timer); trace_timer_cancel(timer); } static inline void debug_assert_init(struct timer_list *timer) { debug_timer_assert_init(timer); } static void do_init_timer(struct timer_list *timer, unsigned int flags, const char *name, struct lock_class_key *key) { struct tvec_base *base = __raw_get_cpu_var(tvec_bases); timer->entry.next = NULL; timer->base = (void *)((unsigned long)base | flags); timer->slack = -1; #ifdef CONFIG_TIMER_STATS timer->start_site = NULL; timer->start_pid = -1; memset(timer->start_comm, 0, TASK_COMM_LEN); #endif lockdep_init_map(&timer->lockdep_map, name, key, 0); } /** * init_timer_key - initialize a timer * @timer: the timer to be initialized * @flags: timer flags * @name: name of the timer * @key: lockdep class key of the fake lock used for tracking timer * sync lock dependencies * * init_timer_key() must be done to a timer prior calling *any* of the * other timer functions. */ void init_timer_key(struct timer_list *timer, unsigned int flags, const char *name, struct lock_class_key *key) { debug_init(timer); do_init_timer(timer, flags, name, key); } EXPORT_SYMBOL(init_timer_key); static inline void detach_timer(struct timer_list *timer, bool clear_pending) { struct list_head *entry = &timer->entry; debug_deactivate(timer); __list_del(entry->prev, entry->next); if (clear_pending) entry->next = NULL; entry->prev = LIST_POISON2; } static inline void detach_expired_timer(struct timer_list *timer, struct tvec_base *base) { detach_timer(timer, true); if (!tbase_get_deferrable(timer->base)) base->active_timers--; } static int detach_if_pending(struct timer_list *timer, struct tvec_base *base, bool clear_pending) { if (!timer_pending(timer)) return 0; detach_timer(timer, clear_pending); if (!tbase_get_deferrable(timer->base)) { base->active_timers--; if (timer->expires == base->next_timer) base->next_timer = base->timer_jiffies; } return 1; } /* * We are using hashed locking: holding per_cpu(tvec_bases).lock * means that all timers which are tied to this base via timer->base are * locked, and the base itself is locked too. * * So __run_timers/migrate_timers can safely modify all timers which could * be found on ->tvX lists. * * When the timer's base is locked, and the timer removed from list, it is * possible to set timer->base = NULL and drop the lock: the timer remains * locked. */ static struct tvec_base *lock_timer_base(struct timer_list *timer, unsigned long *flags) __acquires(timer->base->lock) { struct tvec_base *base; for (;;) { struct tvec_base *prelock_base = timer->base; base = tbase_get_base(prelock_base); if (likely(base != NULL)) { spin_lock_irqsave(&base->lock, *flags); if (likely(prelock_base == timer->base)) return base; /* The timer has migrated to another CPU */ spin_unlock_irqrestore(&base->lock, *flags); } cpu_relax(); } } static inline int __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only, int pinned) { struct tvec_base *base, *new_base; unsigned long flags; int ret = 0 , cpu; timer_stats_timer_set_start_info(timer); BUG_ON(!timer->function); base = lock_timer_base(timer, &flags); ret = detach_if_pending(timer, base, false); if (!ret && pending_only) goto out_unlock; debug_activate(timer, expires); cpu = smp_processor_id(); #if defined(CONFIG_NO_HZ_COMMON) && defined(CONFIG_SMP) if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu)) cpu = get_nohz_timer_target(); #endif new_base = per_cpu(tvec_bases, cpu); if (base != new_base) { /* * We are trying to schedule the timer on the local CPU. * However we can't change timer's base while it is running, * otherwise del_timer_sync() can't detect that the timer's * handler yet has not finished. This also guarantees that * the timer is serialized wrt itself. */ if (likely(base->running_timer != timer)) { /* See the comment in lock_timer_base() */ timer_set_base(timer, NULL); spin_unlock(&base->lock); base = new_base; spin_lock(&base->lock); timer_set_base(timer, base); } } timer->expires = expires; internal_add_timer(base, timer); out_unlock: spin_unlock_irqrestore(&base->lock, flags); return ret; } static inline int __mod_timer_on(struct timer_list *timer, int cpu, unsigned long expires, bool pending_only) { struct tvec_base *base, *new_base; unsigned long flags; int ret = 0; timer_stats_timer_set_start_info(timer); BUG_ON(!timer->function); base = lock_timer_base(timer, &flags); ret = detach_if_pending(timer, base, false); if (!ret && pending_only) goto out_unlock; debug_activate(timer, expires); new_base = per_cpu(tvec_bases, cpu); if (base != new_base) { /* * We are trying to schedule the timer on the local CPU. * However we can't change timer's base while it is running, * otherwise del_timer_sync() can't detect that the timer's * handler yet has not finished. This also guarantees that * the timer is serialized wrt itself. */ if (likely(base->running_timer != timer)) { /* See the comment in lock_timer_base() */ timer_set_base(timer, NULL); spin_unlock(&base->lock); base = new_base; spin_lock(&base->lock); timer_set_base(timer, base); } } timer->expires = expires; internal_add_timer(base, timer); out_unlock: spin_unlock_irqrestore(&base->lock, flags); return ret; } /** * mod_timer_pending - modify a pending timer's timeout * @timer: the pending timer to be modified * @expires: new timeout in jiffies * * mod_timer_pending() is the same for pending timers as mod_timer(), * but will not re-activate and modify already deleted timers. * * It is useful for unserialized use of timers. */ int mod_timer_pending(struct timer_list *timer, unsigned long expires) { return __mod_timer(timer, expires, true, TIMER_NOT_PINNED); } EXPORT_SYMBOL(mod_timer_pending); /* * Decide where to put the timer while taking the slack into account * * Algorithm: * 1) calculate the maximum (absolute) time * 2) calculate the highest bit where the expires and new max are different * 3) round down the maximum time, so that all the lower bits are zeros */ static inline unsigned long apply_slack(struct timer_list *timer, unsigned long expires) { unsigned long expires_limit, mask; int bit; if (timer->slack >= 0) { expires_limit = expires + timer->slack; } else { long delta = expires - jiffies; if (delta < 256) return expires; expires_limit = expires + delta / 256; } mask = expires ^ expires_limit; if (mask == 0) return expires; bit = find_last_bit(&mask, BITS_PER_LONG); /* Round down by zero-ing the lower bits */ expires_limit = (expires_limit >> bit) << bit; return expires_limit; } /** * mod_timer - modify a timer's timeout * @timer: the timer to be modified * @expires: new timeout in jiffies * * mod_timer() is a more efficient way to update the expire field of an * active timer (if the timer is inactive it will be activated) * * mod_timer(timer, expires) is equivalent to: * * del_timer(timer); timer->expires = expires; add_timer(timer); * * Note that if there are multiple unserialized concurrent users of the * same timer, then mod_timer() is the only safe way to modify the timeout, * since add_timer() cannot modify an already running timer. * * The function returns whether it has modified a pending timer or not. * (ie. mod_timer() of an inactive timer returns 0, mod_timer() of an * active timer returns 1.) */ int mod_timer(struct timer_list *timer, unsigned long expires) { expires = apply_slack(timer, expires); /* * This is a common optimization triggered by the * networking code - if the timer is re-modified * to be the same thing then just return: */ if (timer_pending(timer) && timer->expires == expires) return 1; return __mod_timer(timer, expires, false, TIMER_NOT_PINNED); } EXPORT_SYMBOL(mod_timer); int mod_timer_on(struct timer_list *timer, int cpu, unsigned long expires) { expires = apply_slack(timer, expires); /* * This is a common optimization triggered by the * networking code - if the timer is re-modified * to be the same thing then just return: */ if (timer_pending(timer) && timer->expires == expires) return 1; return __mod_timer_on(timer, cpu, expires, false); } EXPORT_SYMBOL(mod_timer_on); /** * mod_timer_pinned - modify a timer's timeout * @timer: the timer to be modified * @expires: new timeout in jiffies * * mod_timer_pinned() is a way to update the expire field of an * active timer (if the timer is inactive it will be activated) * and to ensure that the timer is scheduled on the current CPU. * * Note that this does not prevent the timer from being migrated * when the current CPU goes offline. If this is a problem for * you, use CPU-hotplug notifiers to handle it correctly, for * example, cancelling the timer when the corresponding CPU goes * offline. * * mod_timer_pinned(timer, expires) is equivalent to: * * del_timer(timer); timer->expires = expires; add_timer(timer); */ int mod_timer_pinned(struct timer_list *timer, unsigned long expires) { if (timer->expires == expires && timer_pending(timer)) return 1; return __mod_timer(timer, expires, false, TIMER_PINNED); } EXPORT_SYMBOL(mod_timer_pinned); /** * add_timer - start a timer * @timer: the timer to be added * * The kernel will do a ->function(->data) callback from the * timer interrupt at the ->expires point in the future. The * current time is 'jiffies'. * * The timer's ->expires, ->function (and if the handler uses it, ->data) * fields must be set prior calling this function. * * Timers with an ->expires field in the past will be executed in the next * timer tick. */ void add_timer(struct timer_list *timer) { BUG_ON(timer_pending(timer)); mod_timer(timer, timer->expires); } EXPORT_SYMBOL(add_timer); /** * add_timer_on - start a timer on a particular CPU * @timer: the timer to be added * @cpu: the CPU to start it on * * This is not very scalable on SMP. Double adds are not possible. */ void add_timer_on(struct timer_list *timer, int cpu) { struct tvec_base *base = per_cpu(tvec_bases, cpu); unsigned long flags; timer_stats_timer_set_start_info(timer); BUG_ON(timer_pending(timer) || !timer->function); spin_lock_irqsave(&base->lock, flags); timer_set_base(timer, base); debug_activate(timer, timer->expires); internal_add_timer(base, timer); /* * Check whether the other CPU is in dynticks mode and needs * to be triggered to reevaluate the timer wheel. * We are protected against the other CPU fiddling * with the timer by holding the timer base lock. This also * makes sure that a CPU on the way to stop its tick can not * evaluate the timer wheel. */ wake_up_nohz_cpu(cpu); spin_unlock_irqrestore(&base->lock, flags); } EXPORT_SYMBOL_GPL(add_timer_on); /** * del_timer - deactive a timer. * @timer: the timer to be deactivated * * del_timer() deactivates a timer - this works on both active and inactive * timers. * * The function returns whether it has deactivated a pending timer or not. * (ie. del_timer() of an inactive timer returns 0, del_timer() of an * active timer returns 1.) */ int del_timer(struct timer_list *timer) { struct tvec_base *base; unsigned long flags; int ret = 0; debug_assert_init(timer); timer_stats_timer_clear_start_info(timer); if (timer_pending(timer)) { base = lock_timer_base(timer, &flags); ret = detach_if_pending(timer, base, true); spin_unlock_irqrestore(&base->lock, flags); } return ret; } EXPORT_SYMBOL(del_timer); /** * try_to_del_timer_sync - Try to deactivate a timer * @timer: timer do del * * This function tries to deactivate a timer. Upon successful (ret >= 0) * exit the timer is not queued and the handler is not running on any CPU. */ int try_to_del_timer_sync(struct timer_list *timer) { struct tvec_base *base; unsigned long flags; int ret = -1; debug_assert_init(timer); base = lock_timer_base(timer, &flags); if (base->running_timer != timer) { timer_stats_timer_clear_start_info(timer); ret = detach_if_pending(timer, base, true); } spin_unlock_irqrestore(&base->lock, flags); return ret; } EXPORT_SYMBOL(try_to_del_timer_sync); #ifdef CONFIG_SMP /** * del_timer_sync - deactivate a timer and wait for the handler to finish. * @timer: the timer to be deactivated * * This function only differs from del_timer() on SMP: besides deactivating * the timer it also makes sure the handler has finished executing on other * CPUs. * * Synchronization rules: Callers must prevent restarting of the timer, * otherwise this function is meaningless. It must not be called from * interrupt contexts unless the timer is an irqsafe one. The caller must * not hold locks which would prevent completion of the timer's * handler. The timer's handler must not call add_timer_on(). Upon exit the * timer is not queued and the handler is not running on any CPU. * * Note: For !irqsafe timers, you must not hold locks that are held in * interrupt context while calling this function. Even if the lock has * nothing to do with the timer in question. Here's why: * * CPU0 CPU1 * ---- ---- * <SOFTIRQ> * call_timer_fn(); * base->running_timer = mytimer; * spin_lock_irq(somelock); * <IRQ> * spin_lock(somelock); * del_timer_sync(mytimer); * while (base->running_timer == mytimer); * * Now del_timer_sync() will never return and never release somelock. * The interrupt on the other CPU is waiting to grab somelock but * it has interrupted the softirq that CPU0 is waiting to finish. * * The function returns whether it has deactivated a pending timer or not. */ int del_timer_sync(struct timer_list *timer) { #ifdef CONFIG_LOCKDEP unsigned long flags; /* * If lockdep gives a backtrace here, please reference * the synchronization rules above. */ local_irq_save(flags); lock_map_acquire(&timer->lockdep_map); lock_map_release(&timer->lockdep_map); local_irq_restore(flags); #endif /* * don't use it in hardirq context, because it * could lead to deadlock. */ WARN_ON(in_irq() && !tbase_get_irqsafe(timer->base)); for (;;) { int ret = try_to_del_timer_sync(timer); if (ret >= 0) return ret; cpu_relax(); } } EXPORT_SYMBOL(del_timer_sync); #endif static int cascade(struct tvec_base *base, struct tvec *tv, int index) { /* cascade all the timers from tv up one level */ struct timer_list *timer, *tmp; struct list_head tv_list; list_replace_init(tv->vec + index, &tv_list); /* * We are removing _all_ timers from the list, so we * don't have to detach them individually. */ list_for_each_entry_safe(timer, tmp, &tv_list, entry) { BUG_ON(tbase_get_base(timer->base) != base); /* No accounting, while moving them */ __internal_add_timer(base, timer); } return index; } static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), unsigned long data) { int preempt_count = preempt_count(); #ifdef CONFIG_LOCKDEP /* * It is permissible to free the timer from inside the * function that is called from it, this we need to take into * account for lockdep too. To avoid bogus "held lock freed" * warnings as well as problems when looking into * timer->lockdep_map, make a copy and use that here. */ struct lockdep_map lockdep_map; lockdep_copy_map(&lockdep_map, &timer->lockdep_map); #endif /* * Couple the lock chain with the lock chain at * del_timer_sync() by acquiring the lock_map around the fn() * call here and in del_timer_sync(). */ lock_map_acquire(&lockdep_map); trace_timer_expire_entry(timer); exynos_ss_irq(ESS_FLAG_CALL_TIMER_FN, fn, irqs_disabled(), timer->expires & 0xffffffff); fn(data); exynos_ss_irq(ESS_FLAG_CALL_TIMER_FN, fn, irqs_disabled(), ESS_FLAG_OUT); trace_timer_expire_exit(timer); lock_map_release(&lockdep_map); if (preempt_count != preempt_count()) { WARN_ONCE(1, "timer: %pF preempt leak: %08x -> %08x\n", fn, preempt_count, preempt_count()); /* * Restore the preempt count. That gives us a decent * chance to survive and extract information. If the * callback kept a lock held, bad luck, but not worse * than the BUG() we had. */ preempt_count() = preempt_count; } } #define INDEX(N) ((base->timer_jiffies >> (TVR_BITS + (N) * TVN_BITS)) & TVN_MASK) /** * __run_timers - run all expired timers (if any) on this CPU. * @base: the timer vector to be processed. * * This function cascades all vectors and executes all expired timer * vectors. */ static inline void __run_timers(struct tvec_base *base) { struct timer_list *timer; spin_lock_irq(&base->lock); while (time_after_eq(jiffies, base->timer_jiffies)) { struct list_head work_list; struct list_head *head = &work_list; int index = base->timer_jiffies & TVR_MASK; /* * Cascade timers: */ if (!index && (!cascade(base, &base->tv2, INDEX(0))) && (!cascade(base, &base->tv3, INDEX(1))) && !cascade(base, &base->tv4, INDEX(2))) cascade(base, &base->tv5, INDEX(3)); ++base->timer_jiffies; list_replace_init(base->tv1.vec + index, &work_list); while (!list_empty(head)) { void (*fn)(unsigned long); unsigned long data; bool irqsafe; timer = list_first_entry(head, struct timer_list,entry); fn = timer->function; data = timer->data; irqsafe = tbase_get_irqsafe(timer->base); BUG_ON(tbase_get_base(timer->base) != base); timer_stats_account_timer(timer); base->running_timer = timer; detach_expired_timer(timer, base); if (irqsafe) { spin_unlock(&base->lock); call_timer_fn(timer, fn, data); spin_lock(&base->lock); } else { spin_unlock_irq(&base->lock); call_timer_fn(timer, fn, data); spin_lock_irq(&base->lock); } } } base->running_timer = NULL; spin_unlock_irq(&base->lock); } #ifdef CONFIG_NO_HZ_COMMON /* * Find out when the next timer event is due to happen. This * is used on S/390 to stop all activity when a CPU is idle. * This function needs to be called with interrupts disabled. */ static unsigned long __next_timer_interrupt(struct tvec_base *base) { unsigned long timer_jiffies = base->timer_jiffies; unsigned long expires = timer_jiffies + NEXT_TIMER_MAX_DELTA; int index, slot, array, found = 0; struct timer_list *nte; struct tvec *varray[4]; /* Look for timer events in tv1. */ index = slot = timer_jiffies & TVR_MASK; do { list_for_each_entry(nte, base->tv1.vec + slot, entry) { if (tbase_get_deferrable(nte->base)) continue; found = 1; expires = nte->expires; /* Look at the cascade bucket(s)? */ if (!index || slot < index) goto cascade; return expires; } slot = (slot + 1) & TVR_MASK; } while (slot != index); cascade: /* Calculate the next cascade event */ if (index) timer_jiffies += TVR_SIZE - index; timer_jiffies >>= TVR_BITS; /* Check tv2-tv5. */ varray[0] = &base->tv2; varray[1] = &base->tv3; varray[2] = &base->tv4; varray[3] = &base->tv5; for (array = 0; array < 4; array++) { struct tvec *varp = varray[array]; index = slot = timer_jiffies & TVN_MASK; do { list_for_each_entry(nte, varp->vec + slot, entry) { if (tbase_get_deferrable(nte->base)) continue; found = 1; if (time_before(nte->expires, expires)) expires = nte->expires; } /* * Do we still search for the first timer or are * we looking up the cascade buckets ? */ if (found) { /* Look at the cascade bucket(s)? */ if (!index || slot < index) break; return expires; } slot = (slot + 1) & TVN_MASK; } while (slot != index); if (index) timer_jiffies += TVN_SIZE - index; timer_jiffies >>= TVN_BITS; } return expires; } /* * Check, if the next hrtimer event is before the next timer wheel * event: */ static unsigned long cmp_next_hrtimer_event(unsigned long now, unsigned long expires) { ktime_t hr_delta = hrtimer_get_next_event(); struct timespec tsdelta; unsigned long delta; if (hr_delta.tv64 == KTIME_MAX) return expires; /* * Expired timer available, let it expire in the next tick */ if (hr_delta.tv64 <= 0) return now + 1; tsdelta = ktime_to_timespec(hr_delta); delta = timespec_to_jiffies(&tsdelta); /* * Limit the delta to the max value, which is checked in * tick_nohz_stop_sched_tick(): */ if (delta > NEXT_TIMER_MAX_DELTA) delta = NEXT_TIMER_MAX_DELTA; /* * Take rounding errors in to account and make sure, that it * expires in the next tick. Otherwise we go into an endless * ping pong due to tick_nohz_stop_sched_tick() retriggering * the timer softirq */ if (delta < 1) delta = 1; now += delta; if (time_before(now, expires)) return now; return expires; } /** * get_next_timer_interrupt - return the jiffy of the next pending timer * @now: current time (in jiffies) */ unsigned long get_next_timer_interrupt(unsigned long now) { struct tvec_base *base = __this_cpu_read(tvec_bases); unsigned long expires = now + NEXT_TIMER_MAX_DELTA; /* * Pretend that there is no timer pending if the cpu is offline. * Possible pending timers will be migrated later to an active cpu. */ if (cpu_is_offline(smp_processor_id())) return expires; spin_lock(&base->lock); if (base->active_timers) { if (time_before_eq(base->next_timer, base->timer_jiffies)) base->next_timer = __next_timer_interrupt(base); expires = base->next_timer; } spin_unlock(&base->lock); if (time_before_eq(expires, now)) return now; return cmp_next_hrtimer_event(now, expires); } #endif /* * Called from the timer interrupt handler to charge one tick to the current * process. user_tick is 1 if the tick is user time, 0 for system. */ void update_process_times(int user_tick) { struct task_struct *p = current; int cpu = smp_processor_id(); /* Note: this timer irq context must be accounted for as well. */ account_process_tick(p, user_tick); run_local_timers(); rcu_check_callbacks(cpu, user_tick); #ifdef CONFIG_IRQ_WORK if (in_irq()) irq_work_run(); #endif scheduler_tick(); run_posix_cpu_timers(p); } /* * This function runs timers and the timer-tq in bottom half context. */ static void run_timer_softirq(struct softirq_action *h) { struct tvec_base *base = __this_cpu_read(tvec_bases); hrtimer_run_pending(); if (time_after_eq(jiffies, base->timer_jiffies)) __run_timers(base); } /* * Called by the local, per-CPU timer interrupt on SMP. */ void run_local_timers(void) { hrtimer_run_queues(); raise_softirq(TIMER_SOFTIRQ); } #ifdef __ARCH_WANT_SYS_ALARM /* * For backwards compatibility? This can be done in libc so Alpha * and all newer ports shouldn't need it. */ SYSCALL_DEFINE1(alarm, unsigned int, seconds) { return alarm_setitimer(seconds); } #endif static void process_timeout(unsigned long __data) { wake_up_process((struct task_struct *)__data); } /** * schedule_timeout - sleep until timeout * @timeout: timeout value in jiffies * * Make the current task sleep until @timeout jiffies have * elapsed. The routine will return immediately unless * the current task state has been set (see set_current_state()). * * You can set the task state as follows - * * %TASK_UNINTERRUPTIBLE - at least @timeout jiffies are guaranteed to * pass before the routine returns. The routine will return 0 * * %TASK_INTERRUPTIBLE - the routine may return early if a signal is * delivered to the current task. In this case the remaining time * in jiffies will be returned, or 0 if the timer expired in time * * The current task state is guaranteed to be TASK_RUNNING when this * routine returns. * * Specifying a @timeout value of %MAX_SCHEDULE_TIMEOUT will schedule * the CPU away without a bound on the timeout. In this case the return * value will be %MAX_SCHEDULE_TIMEOUT. * * In all cases the return value is guaranteed to be non-negative. */ signed long __sched schedule_timeout(signed long timeout) { struct timer_list timer; unsigned long expire; switch (timeout) { case MAX_SCHEDULE_TIMEOUT: /* * These two special cases are useful to be comfortable * in the caller. Nothing more. We could take * MAX_SCHEDULE_TIMEOUT from one of the negative value * but I' d like to return a valid offset (>=0) to allow * the caller to do everything it want with the retval. */ schedule(); goto out; default: /* * Another bit of PARANOID. Note that the retval will be * 0 since no piece of kernel is supposed to do a check * for a negative retval of schedule_timeout() (since it * should never happens anyway). You just have the printk() * that will tell you if something is gone wrong and where. */ if (timeout < 0) { printk(KERN_ERR "schedule_timeout: wrong timeout " "value %lx\n", timeout); dump_stack(); current->state = TASK_RUNNING; goto out; } } expire = timeout + jiffies; setup_timer_on_stack(&timer, process_timeout, (unsigned long)current); __mod_timer(&timer, expire, false, TIMER_NOT_PINNED); schedule(); del_singleshot_timer_sync(&timer); /* Remove the timer from the object tracker */ destroy_timer_on_stack(&timer); timeout = expire - jiffies; out: return timeout < 0 ? 0 : timeout; } EXPORT_SYMBOL(schedule_timeout); /* * We can use __set_current_state() here because schedule_timeout() calls * schedule() unconditionally. */ signed long __sched schedule_timeout_interruptible(signed long timeout) { __set_current_state(TASK_INTERRUPTIBLE); return schedule_timeout(timeout); } EXPORT_SYMBOL(schedule_timeout_interruptible); signed long __sched schedule_timeout_killable(signed long timeout) { __set_current_state(TASK_KILLABLE); return schedule_timeout(timeout); } EXPORT_SYMBOL(schedule_timeout_killable); signed long __sched schedule_timeout_uninterruptible(signed long timeout) { __set_current_state(TASK_UNINTERRUPTIBLE); return schedule_timeout(timeout); } EXPORT_SYMBOL(schedule_timeout_uninterruptible); static int __cpuinit init_timers_cpu(int cpu) { int j; struct tvec_base *base; static char __cpuinitdata tvec_base_done[NR_CPUS]; if (!tvec_base_done[cpu]) { static char boot_done; if (boot_done) { /* * The APs use this path later in boot */ base = kmalloc_node(sizeof(*base), GFP_KERNEL | __GFP_ZERO, cpu_to_node(cpu)); if (!base) return -ENOMEM; /* Make sure that tvec_base is 2 byte aligned */ if (tbase_get_deferrable(base)) { WARN_ON(1); kfree(base); return -ENOMEM; } per_cpu(tvec_bases, cpu) = base; } else { /* * This is for the boot CPU - we use compile-time * static initialisation because per-cpu memory isn't * ready yet and because the memory allocators are not * initialised either. */ boot_done = 1; base = &boot_tvec_bases; } spin_lock_init(&base->lock); tvec_base_done[cpu] = 1; } else { base = per_cpu(tvec_bases, cpu); } for (j = 0; j < TVN_SIZE; j++) { INIT_LIST_HEAD(base->tv5.vec + j); INIT_LIST_HEAD(base->tv4.vec + j); INIT_LIST_HEAD(base->tv3.vec + j); INIT_LIST_HEAD(base->tv2.vec + j); } for (j = 0; j < TVR_SIZE; j++) INIT_LIST_HEAD(base->tv1.vec + j); base->timer_jiffies = jiffies; base->next_timer = base->timer_jiffies; base->active_timers = 0; return 0; } #ifdef CONFIG_HOTPLUG_CPU static void migrate_timer_list(struct tvec_base *new_base, struct list_head *head) { struct timer_list *timer; while (!list_empty(head)) { timer = list_first_entry(head, struct timer_list, entry); /* We ignore the accounting on the dying cpu */ detach_timer(timer, false); timer_set_base(timer, new_base); internal_add_timer(new_base, timer); } } static void __cpuinit migrate_timers(int cpu) { struct tvec_base *old_base; struct tvec_base *new_base; int i; BUG_ON(cpu_online(cpu)); old_base = per_cpu(tvec_bases, cpu); new_base = get_cpu_var(tvec_bases); /* * The caller is globally serialized and nobody else * takes two locks at once, deadlock is not possible. */ spin_lock_irq(&new_base->lock); spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); BUG_ON(old_base->running_timer); for (i = 0; i < TVR_SIZE; i++) migrate_timer_list(new_base, old_base->tv1.vec + i); for (i = 0; i < TVN_SIZE; i++) { migrate_timer_list(new_base, old_base->tv2.vec + i); migrate_timer_list(new_base, old_base->tv3.vec + i); migrate_timer_list(new_base, old_base->tv4.vec + i); migrate_timer_list(new_base, old_base->tv5.vec + i); } spin_unlock(&old_base->lock); spin_unlock_irq(&new_base->lock); put_cpu_var(tvec_bases); } #endif /* CONFIG_HOTPLUG_CPU */ static int __cpuinit timer_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { long cpu = (long)hcpu; int err; switch(action) { case CPU_UP_PREPARE: case CPU_UP_PREPARE_FROZEN: err = init_timers_cpu(cpu); if (err < 0) return notifier_from_errno(err); break; #ifdef CONFIG_HOTPLUG_CPU case CPU_DEAD: case CPU_DEAD_FROZEN: migrate_timers(cpu); break; #endif default: break; } return NOTIFY_OK; } static struct notifier_block __cpuinitdata timers_nb = { .notifier_call = timer_cpu_notify, }; void __init init_timers(void) { int err; /* ensure there are enough low bits for flags in timer->base pointer */ BUILD_BUG_ON(__alignof__(struct tvec_base) & TIMER_FLAG_MASK); err = timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE, (void *)(long)smp_processor_id()); init_timer_stats(); BUG_ON(err != NOTIFY_OK); register_cpu_notifier(&timers_nb); open_softirq(TIMER_SOFTIRQ, run_timer_softirq); } /** * msleep - sleep safely even with waitqueue interruptions * @msecs: Time in milliseconds to sleep for */ void msleep(unsigned int msecs) { unsigned long timeout = msecs_to_jiffies(msecs) + 1; while (timeout) timeout = schedule_timeout_uninterruptible(timeout); } EXPORT_SYMBOL(msleep); /** * msleep_interruptible - sleep waiting for signals * @msecs: Time in milliseconds to sleep for */ unsigned long msleep_interruptible(unsigned int msecs) { unsigned long timeout = msecs_to_jiffies(msecs) + 1; while (timeout && !signal_pending(current)) timeout = schedule_timeout_interruptible(timeout); return jiffies_to_msecs(timeout); } EXPORT_SYMBOL(msleep_interruptible); static int __sched do_usleep_range(unsigned long min, unsigned long max) { ktime_t kmin; unsigned long delta; kmin = ktime_set(0, min * NSEC_PER_USEC); delta = (max - min) * NSEC_PER_USEC; return schedule_hrtimeout_range(&kmin, delta, HRTIMER_MODE_REL); } /** * usleep_range - Drop in replacement for udelay where wakeup is flexible * @min: Minimum time in usecs to sleep * @max: Maximum time in usecs to sleep */ void usleep_range(unsigned long min, unsigned long max) { __set_current_state(TASK_UNINTERRUPTIBLE); do_usleep_range(min, max); } EXPORT_SYMBOL(usleep_range);
gpl-2.0
thrasibule/mbedtls
programs/random/gen_random_ctr_drbg.c
3823
/** * \brief Use and generate random data into a file via the CTR_DBRG based on AES * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * * This file is part of mbed TLS (https://tls.mbed.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else #include <stdio.h> #define mbedtls_fprintf fprintf #define mbedtls_printf printf #endif #if defined(MBEDTLS_CTR_DRBG_C) && defined(MBEDTLS_ENTROPY_C) && \ defined(MBEDTLS_FS_IO) #include "mbedtls/entropy.h" #include "mbedtls/ctr_drbg.h" #include <stdio.h> #endif #if !defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_ENTROPY_C) || \ !defined(MBEDTLS_FS_IO) int main( void ) { mbedtls_printf("MBEDTLS_CTR_DRBG_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO not defined.\n"); return( 0 ); } #else int main( int argc, char *argv[] ) { FILE *f; int i, k, ret; mbedtls_ctr_drbg_context ctr_drbg; mbedtls_entropy_context entropy; unsigned char buf[1024]; mbedtls_ctr_drbg_init( &ctr_drbg ); if( argc < 2 ) { mbedtls_fprintf( stderr, "usage: %s <output filename>\n", argv[0] ); return( 1 ); } if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); return( 1 ); } mbedtls_entropy_init( &entropy ); ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, (const unsigned char *) "RANDOM_GEN", 10 ); if( ret != 0 ) { mbedtls_printf( "failed in mbedtls_ctr_drbg_seed: %d\n", ret ); goto cleanup; } mbedtls_ctr_drbg_set_prediction_resistance( &ctr_drbg, MBEDTLS_CTR_DRBG_PR_OFF ); #if defined(MBEDTLS_FS_IO) ret = mbedtls_ctr_drbg_update_seed_file( &ctr_drbg, "seedfile" ); if( ret == MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR ) { mbedtls_printf( "Failed to open seedfile. Generating one.\n" ); ret = mbedtls_ctr_drbg_write_seed_file( &ctr_drbg, "seedfile" ); if( ret != 0 ) { mbedtls_printf( "failed in mbedtls_ctr_drbg_write_seed_file: %d\n", ret ); goto cleanup; } } else if( ret != 0 ) { mbedtls_printf( "failed in mbedtls_ctr_drbg_update_seed_file: %d\n", ret ); goto cleanup; } #endif for( i = 0, k = 768; i < k; i++ ) { ret = mbedtls_ctr_drbg_random( &ctr_drbg, buf, sizeof( buf ) ); if( ret != 0 ) { mbedtls_printf("failed!\n"); goto cleanup; } fwrite( buf, 1, sizeof( buf ), f ); mbedtls_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } ret = 0; cleanup: mbedtls_printf("\n"); fclose( f ); mbedtls_ctr_drbg_free( &ctr_drbg ); mbedtls_entropy_free( &entropy ); return( ret ); } #endif /* MBEDTLS_CTR_DRBG_C && MBEDTLS_ENTROPY_C */
gpl-2.0
georges5/bcangular
wp-content/plugins/wp-lazysizes-master/js/lazysizes/plugins/custommedia/ls.custommedia.js
2072
/* html:after { display: none; content: '--small: (max-width: 500px) | --medium: (max-width: 1100px) | --large: (min-width: 1100px)'; } */ (function(window){ /*jshint eqnull:true */ 'use strict'; var docElem = document.documentElement; var create = function(){ if(!window.lazySizes || window.lazySizes.getCustomMedias){return;} var lazySizes = window.lazySizes; lazySizes.getCustomMedias = (function(){ var regCleanPseudos = /['"]/g; var regSplit = /\s*\|\s*/g; var regNamedQueries = /^([a-z0-9_-]+)\s*:\s*(.+)$/i; var getStyle = function(elem, pseudo){ return (getComputedStyle(elem, pseudo).getPropertyValue('content') || 'none').replace(regCleanPseudos, '').trim(); }; var parse = function(string, object){ string.split(regSplit).forEach(function(query){ if(query.match(regNamedQueries)){ object[RegExp.$1] = RegExp.$2; } }); }; return function(object, element){ object = object || lazySizes.cfg.customMedia; element = element || document.querySelector('html'); parse(getStyle(element, ':before'), object); parse(getStyle(element, ':after'), object); return object; }; })(); lazySizes.updateCustomMedia = function(){ var i, len, customMedia; var elems = docElem.querySelectorAll('source[media][data-media][srcset]'); lazySizes.getCustomMedias(); for(i = 0, len = elems.length; i < len; i++){ if( (customMedia = lazySizes.cfg.customMedia[elems[i].getAttribute('data-media') || elems[i].getAttribute('media')]) ){ elems[i].setAttribute('media', customMedia); } } if(!window.HTMLPictureElement){ elems = docElem.querySelector('source[media][data-media][srcset] ~ img'); for(i = 0, len = elems.length; i < len; i++){ lazySizes.uP(elems[i]); } } lazySizes.autoSizer.checkElems(); }; lazySizes.getCustomMedias(); docElem.removeEventListener('lazybeforeunveil', create); }; if(window.addEventListener){ docElem.addEventListener('lazybeforeunveil', create); create(); setTimeout(create); } })(window);
gpl-2.0
jbotos/wptheme
wp-content/themes/wptheme/css/orbit.css
3243
/* CSS for jQuery Orbit Plugin 1.2.3 * www.ZURB.com/playground * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php /* PUT IN YOUR SLIDER ID AND SIZE TO MAKE LOAD BEAUTIFULLY ================================================== */ #featured { width: 100%!important; margin-top: -70px; position: relative; z-index: 1; height: 650px!important; background: #000 url('../img/icons/loading.gif') no-repeat center center; overflow: hidden; } #featured>img, #featured>div, #featured>a { display: none; } html:not(.js) #featured { display: none; } /* CONTAINER ================================================== */ div.orbit-wrapper { width: 100%!important; height: 1px; top: 0px; z-index: 1; position: relative; } div.orbit { width: 1px; position: relative; overflow: hidden } div.orbit>img { position: absolute; top: 0; left: 0; display: none; } div.orbit > a { border: none; position: absolute; top: 0; left: 0; line-height: 0; display: none; } .orbit > div { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } /* Note: If your slider only uses content or anchors, you're going to want to put the width and height declarations on the ".orbit>div" and "div.orbit>a" tags in addition to just the .orbit-wrapper */ /* TIMER ================================================== */ div.timer { width: 40px; height: 40px; overflow: hidden; position: absolute; top: 40px; display: none; right: 10px; opacity: .6; cursor: pointer; z-index: 1001; } span.rotator { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: -20px; background: url(../img/orbit/rotator-black.png) no-repeat; z-index: 3; } span.mask { display: block; width: 20px; height: 40px; position: absolute; top: 0; right: 0; z-index: 2; overflow: hidden; } span.rotator.move { left: 0 } span.mask.move { width: 40px; left: 0; background: url(../img/orbit/timer-black.png) repeat 0 0; } span.pause { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: 0; background: url(../img/orbit/pause-black.png) no-repeat; z-index: 4; opacity: 0; } span.pause.active { background: url(../img/orbit/pause-black.png) no-repeat 0 -40px } div.timer:hover span.pause, span.pause.active { opacity: 1 } /* CAPTIONS ================================================== */ .orbit-caption { display: none; font-family: "HelveticaNeue", "Helvetica-Neue", Helvetica, Arial, sans-serif; } .orbit-wrapper .orbit-caption { background: #000; background: rgba(0,0,0,.6); z-index: 1000; color: #fff; text-align: center; padding: 7px 0; font-size: 13px; position: fixed; right: 0; bottom: 0; width: 100%; } /* DIRECTIONAL NAV ================================================== */ div.slider-nav { display: block } div.slider-nav span { position: fixed; z-index: 1000; text-indent: -9999px; cursor: pointer; }
gpl-2.0
SeeyaSia/www
web/libraries/ckeditor/plugins/list/lang/pt-br.js
262
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'list', 'pt-br', { bulletedlist: 'Lista sem números', numberedlist: 'Lista numerada' } );
gpl-2.0
heqiaoliu/Viral-Dark-Matter
tmp/install_4f20924cbb0a1/installation/views/license/tmpl/default.php
1877
<?php /** * @version $Id: default.php 21463 2011-06-06 15:28:10Z dextercowley $ * @package Joomla.Installation * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <div id="step"> <div class="far-right"> <?php if ($this->document->direction == 'ltr') : ?> <div class="button1-right"><div class="prev"><a href="index.php?view=preinstall" onclick="return Install.goToPage('preinstall');" rel="prev" title="<?php echo JText::_('JPREVIOUS'); ?>"><?php echo JText::_('JPREVIOUS'); ?></a></div></div> <div class="button1-left"><div class="next"><a href="index.php?view=database" onclick="return Install.goToPage('database');" rel="next" title="<?php echo JText::_('JNEXT'); ?>"><?php echo JText::_('JNEXT'); ?></a></div></div> <?php elseif ($this->document->direction == 'rtl') : ?> <div class="button1-right"><div class="prev"><a href="index.php?view=database" onclick="return Install.goToPage('database');" rel="next" title="<?php echo JText::_('JNEXT'); ?>"><?php echo JText::_('JNEXT'); ?></a></div></div> <div class="button1-left"><div class="next"><a href="index.php?view=preinstall" onclick="return Install.goToPage('preinstall');" rel="prev" title="<?php echo JText::_('JPREVIOUS'); ?>"><?php echo JText::_('JPREVIOUS'); ?></a></div></div> <?php endif; ?> </div> <span class="steptitle"><?php echo JText::_('INSTL_LICENSE'); ?></span> </div> <form action="index.php" method="post" id="adminForm" class="form-validate"> <div id="installer"> <div class="m"> <h2><?php echo JText::_('INSTL_GNU_GPL_LICENSE'); ?></h2> <iframe src="gpl.html" class="license" marginwidth="25" scrolling="auto"></iframe> </div> </div> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </form>
gpl-2.0
BetterBetterBetter/B3App
media/foundry/5.0/scripts/moment/ar-ma.js
2156
(function(){ // module factory: start var moduleFactory = function($) { // module body: start var module = this; $.require() .script("moment") .done(function() { var exports = function() { $.moment.lang('ar-ma', { months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"), monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"), weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), weekdaysShort : "احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"), weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"), longDateFormat : { LT : "HH:mm", L : "DD/MM/YYYY", LL : "D MMMM YYYY", LLL : "D MMMM YYYY LT", LLLL : "dddd D MMMM YYYY LT" }, calendar : { sameDay: "[اليوم على الساعة] LT", nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime : { future : "في %s", past : "منذ %s", s : "ثوان", m : "دقيقة", mm : "%d دقائق", h : "ساعة", hh : "%d ساعات", d : "يوم", dd : "%d أيام", M : "شهر", MM : "%d أشهر", y : "سنة", yy : "%d سنوات" }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 1st is the first week of the year. } }); }; exports(); module.resolveWith(exports); }); // module body: end }; // module factory: end FD50.module("moment/ar-ma", moduleFactory); }());
gpl-2.0
tomhughes/openstreetmap-website
test/controllers/api/traces_controller_test.rb
15842
require "test_helper" module Api class TracesControllerTest < ActionDispatch::IntegrationTest ## # test all routes which lead to this controller def test_routes assert_routing( { :path => "/api/0.6/gpx/create", :method => :post }, { :controller => "api/traces", :action => "create" } ) assert_routing( { :path => "/api/0.6/gpx/1", :method => :get }, { :controller => "api/traces", :action => "show", :id => "1" } ) assert_routing( { :path => "/api/0.6/gpx/1", :method => :put }, { :controller => "api/traces", :action => "update", :id => "1" } ) assert_routing( { :path => "/api/0.6/gpx/1", :method => :delete }, { :controller => "api/traces", :action => "destroy", :id => "1" } ) assert_recognizes( { :controller => "api/traces", :action => "show", :id => "1" }, { :path => "/api/0.6/gpx/1/details", :method => :get } ) assert_routing( { :path => "/api/0.6/gpx/1/data", :method => :get }, { :controller => "api/traces", :action => "data", :id => "1" } ) assert_routing( { :path => "/api/0.6/gpx/1/data.xml", :method => :get }, { :controller => "api/traces", :action => "data", :id => "1", :format => "xml" } ) end # Check getting a specific trace through the api def test_show public_trace_file = create(:trace, :visibility => "public") # First with no auth get api_trace_path(public_trace_file) assert_response :unauthorized # Now with some other user, which should work since the trace is public auth_header = basic_authorization_header create(:user).display_name, "test" get api_trace_path(public_trace_file), :headers => auth_header assert_response :success # And finally we should be able to do it with the owner of the trace auth_header = basic_authorization_header public_trace_file.user.display_name, "test" get api_trace_path(public_trace_file), :headers => auth_header assert_response :success end # Check an anonymous trace can't be specifically fetched by another user def test_show_anon anon_trace_file = create(:trace, :visibility => "private") # First with no auth get api_trace_path(anon_trace_file) assert_response :unauthorized # Now try with another user, which shouldn't work since the trace is anon auth_header = basic_authorization_header create(:user).display_name, "test" get api_trace_path(anon_trace_file), :headers => auth_header assert_response :forbidden # And finally we should be able to get the trace details with the trace owner auth_header = basic_authorization_header anon_trace_file.user.display_name, "test" get api_trace_path(anon_trace_file), :headers => auth_header assert_response :success end # Check the api details for a trace that doesn't exist def test_show_not_found deleted_trace_file = create(:trace, :deleted) # Try first with no auth, as it should require it get api_trace_path(:id => 0) assert_response :unauthorized # Login, and try again auth_header = basic_authorization_header deleted_trace_file.user.display_name, "test" get api_trace_path(:id => 0), :headers => auth_header assert_response :not_found # Now try a trace which did exist but has been deleted auth_header = basic_authorization_header deleted_trace_file.user.display_name, "test" get api_trace_path(deleted_trace_file), :headers => auth_header assert_response :not_found end # Test downloading a trace through the api def test_data public_trace_file = create(:trace, :visibility => "public", :fixture => "a") # First with no auth get api_trace_data_path(public_trace_file) assert_response :unauthorized # Now with some other user, which should work since the trace is public auth_header = basic_authorization_header create(:user).display_name, "test" get api_trace_data_path(public_trace_file), :headers => auth_header follow_redirect! follow_redirect! check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9" # And finally we should be able to do it with the owner of the trace auth_header = basic_authorization_header public_trace_file.user.display_name, "test" get api_trace_data_path(public_trace_file), :headers => auth_header follow_redirect! follow_redirect! check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9" end # Test downloading a compressed trace through the api def test_data_compressed identifiable_trace_file = create(:trace, :visibility => "identifiable", :fixture => "d") # Authenticate as the owner of the trace we will be using auth_header = basic_authorization_header identifiable_trace_file.user.display_name, "test" # First get the data as is get api_trace_data_path(identifiable_trace_file), :headers => auth_header follow_redirect! follow_redirect! check_trace_data identifiable_trace_file, "c6422a3d8750faae49ed70e7e8a51b93", "application/gzip", "gpx.gz" # Now ask explicitly for XML format get api_trace_data_path(identifiable_trace_file, :format => "xml"), :headers => auth_header check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d", "application/xml", "xml" # Now ask explicitly for GPX format get api_trace_data_path(identifiable_trace_file, :format => "gpx"), :headers => auth_header check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d" end # Check an anonymous trace can't be downloaded by another user through the api def test_data_anon anon_trace_file = create(:trace, :visibility => "private", :fixture => "b") # First with no auth get api_trace_data_path(anon_trace_file) assert_response :unauthorized # Now with some other user, which shouldn't work since the trace is anon auth_header = basic_authorization_header create(:user).display_name, "test" get api_trace_data_path(anon_trace_file), :headers => auth_header assert_response :forbidden # And finally we should be able to do it with the owner of the trace auth_header = basic_authorization_header anon_trace_file.user.display_name, "test" get api_trace_data_path(anon_trace_file), :headers => auth_header follow_redirect! follow_redirect! check_trace_data anon_trace_file, "db4cb5ed2d7d2b627b3b504296c4f701" end # Test downloading a trace that doesn't exist through the api def test_data_not_found deleted_trace_file = create(:trace, :deleted) # Try first with no auth, as it should require it get api_trace_data_path(:id => 0) assert_response :unauthorized # Login, and try again auth_header = basic_authorization_header create(:user).display_name, "test" get api_trace_data_path(:id => 0), :headers => auth_header assert_response :not_found # Now try a trace which did exist but has been deleted auth_header = basic_authorization_header deleted_trace_file.user.display_name, "test" get api_trace_data_path(deleted_trace_file), :headers => auth_header assert_response :not_found end # Test creating a trace through the api def test_create # Get file to use fixture = Rails.root.join("test/gpx/fixtures/a.gpx") file = Rack::Test::UploadedFile.new(fixture, "application/gpx+xml") user = create(:user) # First with no auth post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" } assert_response :unauthorized # Rewind the file file.rewind # Now authenticated create(:user_preference, :user => user, :k => "gps.trace.visibility", :v => "identifiable") assert_not_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v auth_header = basic_authorization_header user.display_name, "test" post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }, :headers => auth_header assert_response :success trace = Trace.find(response.body.to_i) assert_equal "a.gpx", trace.name assert_equal "New Trace", trace.description assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag) assert_equal "trackable", trace.visibility assert_not trace.inserted assert_equal File.new(fixture).read, trace.file.blob.download trace.destroy assert_equal "trackable", user.preferences.where(:k => "gps.trace.visibility").first.v # Rewind the file file.rewind # Now authenticated, with the legacy public flag assert_not_equal "public", user.preferences.where(:k => "gps.trace.visibility").first.v auth_header = basic_authorization_header user.display_name, "test" post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 1 }, :headers => auth_header assert_response :success trace = Trace.find(response.body.to_i) assert_equal "a.gpx", trace.name assert_equal "New Trace", trace.description assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag) assert_equal "public", trace.visibility assert_not trace.inserted assert_equal File.new(fixture).read, trace.file.blob.download trace.destroy assert_equal "public", user.preferences.where(:k => "gps.trace.visibility").first.v # Rewind the file file.rewind # Now authenticated, with the legacy private flag second_user = create(:user) assert_nil second_user.preferences.where(:k => "gps.trace.visibility").first auth_header = basic_authorization_header second_user.display_name, "test" post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }, :headers => auth_header assert_response :success trace = Trace.find(response.body.to_i) assert_equal "a.gpx", trace.name assert_equal "New Trace", trace.description assert_equal %w[new trace], trace.tags.order(:tag).collect(&:tag) assert_equal "private", trace.visibility assert_not trace.inserted assert_equal File.new(fixture).read, trace.file.blob.download trace.destroy assert_equal "private", second_user.preferences.where(:k => "gps.trace.visibility").first.v end # Check updating a trace through the api def test_update public_trace_file = create(:trace, :visibility => "public", :fixture => "a") deleted_trace_file = create(:trace, :deleted) anon_trace_file = create(:trace, :visibility => "private") # First with no auth put api_trace_path(public_trace_file), :params => create_trace_xml(public_trace_file) assert_response :unauthorized # Now with some other user, which should fail auth_header = basic_authorization_header create(:user).display_name, "test" put api_trace_path(public_trace_file), :params => create_trace_xml(public_trace_file), :headers => auth_header assert_response :forbidden # Now with a trace which doesn't exist auth_header = basic_authorization_header create(:user).display_name, "test" put api_trace_path(:id => 0), :params => create_trace_xml(public_trace_file), :headers => auth_header assert_response :not_found # Now with a trace which did exist but has been deleted auth_header = basic_authorization_header deleted_trace_file.user.display_name, "test" put api_trace_path(deleted_trace_file), :params => create_trace_xml(deleted_trace_file), :headers => auth_header assert_response :not_found # Now try an update with the wrong ID auth_header = basic_authorization_header public_trace_file.user.display_name, "test" put api_trace_path(public_trace_file), :params => create_trace_xml(anon_trace_file), :headers => auth_header assert_response :bad_request, "should not be able to update a trace with a different ID from the XML" # And finally try an update that should work auth_header = basic_authorization_header public_trace_file.user.display_name, "test" t = public_trace_file t.description = "Changed description" t.visibility = "private" put api_trace_path(t), :params => create_trace_xml(t), :headers => auth_header assert_response :success nt = Trace.find(t.id) assert_equal nt.description, t.description assert_equal nt.visibility, t.visibility end # Test that updating a trace doesn't duplicate the tags def test_update_tags tracetag = create(:tracetag) trace = tracetag.trace auth_header = basic_authorization_header trace.user.display_name, "test" put api_trace_path(trace), :params => create_trace_xml(trace), :headers => auth_header assert_response :success updated = Trace.find(trace.id) # Ensure there's only one tag in the database after updating assert_equal(1, Tracetag.count) # The new tag object might have a different id, so check the string representation assert_equal trace.tagstring, updated.tagstring end # Check deleting a trace through the api def test_destroy public_trace_file = create(:trace, :visibility => "public") # First with no auth delete api_trace_path(public_trace_file) assert_response :unauthorized # Now with some other user, which should fail auth_header = basic_authorization_header create(:user).display_name, "test" delete api_trace_path(public_trace_file), :headers => auth_header assert_response :forbidden # Now with a trace which doesn't exist auth_header = basic_authorization_header create(:user).display_name, "test" delete api_trace_path(:id => 0), :headers => auth_header assert_response :not_found # And finally we should be able to do it with the owner of the trace auth_header = basic_authorization_header public_trace_file.user.display_name, "test" delete api_trace_path(public_trace_file), :headers => auth_header assert_response :success # Try it a second time, which should fail auth_header = basic_authorization_header public_trace_file.user.display_name, "test" delete api_trace_path(public_trace_file), :headers => auth_header assert_response :not_found end private def check_trace_data(trace, digest, content_type = "application/gpx+xml", extension = "gpx") assert_response :success assert_equal digest, Digest::MD5.hexdigest(response.body) assert_equal content_type, response.media_type assert_equal "attachment; filename=\"#{trace.id}.#{extension}\"; filename*=UTF-8''#{trace.id}.#{extension}", @response.header["Content-Disposition"] end ## # build XML for traces # this builds a minimum viable XML for the tests in this suite def create_trace_xml(trace) root = XML::Document.new root.root = XML::Node.new "osm" trc = XML::Node.new "gpx_file" trc["id"] = trace.id.to_s trc["visibility"] = trace.visibility trc["visible"] = trace.visible.to_s desc = XML::Node.new "description" desc << trace.description trc << desc trace.tags.each do |tag| t = XML::Node.new "tag" t << tag.tag trc << t end root.root << trc root.to_s end end end
gpl-2.0
AICP/kernel_samsung_exynos5410
drivers/usb/serial/pl2303.c
24392
/* * Prolific PL2303 USB to serial adaptor driver * * Copyright (C) 2001-2007 Greg Kroah-Hartman ([email protected]) * Copyright (C) 2003 IBM Corp. * * Original driver for 2.2.x by anonymous * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 as published by the Free Software Foundation. * * See Documentation/usb/usb-serial.txt for more information on using this * driver * */ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/tty.h> #include <linux/tty_driver.h> #include <linux/tty_flip.h> #include <linux/serial.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/usb.h> #include <linux/usb/serial.h> #include "pl2303.h" /* * Version Information */ #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver" static bool debug; #define PL2303_CLOSING_WAIT (30*HZ) static const struct usb_device_id id_table[] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID_UCSGT) }, { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) }, { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) }, { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) }, { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) }, { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1) }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X75) }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_EF81) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_ID_S81) }, /* Benq/Siemens S81 */ { USB_DEVICE(SYNTECH_VENDOR_ID, SYNTECH_PRODUCT_ID) }, { USB_DEVICE(NOKIA_CA42_VENDOR_ID, NOKIA_CA42_PRODUCT_ID) }, { USB_DEVICE(CA_42_CA42_VENDOR_ID, CA_42_CA42_PRODUCT_ID) }, { USB_DEVICE(SAGEM_VENDOR_ID, SAGEM_PRODUCT_ID) }, { USB_DEVICE(LEADTEK_VENDOR_ID, LEADTEK_9531_PRODUCT_ID) }, { USB_DEVICE(SPEEDDRAGON_VENDOR_ID, SPEEDDRAGON_PRODUCT_ID) }, { USB_DEVICE(DATAPILOT_U2_VENDOR_ID, DATAPILOT_U2_PRODUCT_ID) }, { USB_DEVICE(BELKIN_VENDOR_ID, BELKIN_PRODUCT_ID) }, { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) }, { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) }, { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) }, { USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) }, { USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) }, { USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver pl2303_driver = { .name = "pl2303", .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, .suspend = usb_serial_suspend, .resume = usb_serial_resume, .supports_autosuspend = 1, }; #define SET_LINE_REQUEST_TYPE 0x21 #define SET_LINE_REQUEST 0x20 #define SET_CONTROL_REQUEST_TYPE 0x21 #define SET_CONTROL_REQUEST 0x22 #define CONTROL_DTR 0x01 #define CONTROL_RTS 0x02 #define BREAK_REQUEST_TYPE 0x21 #define BREAK_REQUEST 0x23 #define BREAK_ON 0xffff #define BREAK_OFF 0x0000 #define GET_LINE_REQUEST_TYPE 0xa1 #define GET_LINE_REQUEST 0x21 #define VENDOR_WRITE_REQUEST_TYPE 0x40 #define VENDOR_WRITE_REQUEST 0x01 #define VENDOR_READ_REQUEST_TYPE 0xc0 #define VENDOR_READ_REQUEST 0x01 #define UART_STATE 0x08 #define UART_STATE_TRANSIENT_MASK 0x74 #define UART_DCD 0x01 #define UART_DSR 0x02 #define UART_BREAK_ERROR 0x04 #define UART_RING 0x08 #define UART_FRAME_ERROR 0x10 #define UART_PARITY_ERROR 0x20 #define UART_OVERRUN_ERROR 0x40 #define UART_CTS 0x80 enum pl2303_type { type_0, /* don't know the difference between type 0 and */ type_1, /* type 1, until someone from prolific tells us... */ HX, /* HX version of the pl2303 chip */ }; struct pl2303_private { spinlock_t lock; u8 line_control; u8 line_status; enum pl2303_type type; }; static int pl2303_vendor_read(__u16 value, __u16 index, struct usb_serial *serial, unsigned char *buf) { int res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE, value, index, buf, 1, 100); dbg("0x%x:0x%x:0x%x:0x%x %d - %x", VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, value, index, res, buf[0]); return res; } static int pl2303_vendor_write(__u16 value, __u16 index, struct usb_serial *serial) { int res = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE, value, index, NULL, 0, 100); dbg("0x%x:0x%x:0x%x:0x%x %d", VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, value, index, res); return res; } static int pl2303_startup(struct usb_serial *serial) { struct pl2303_private *priv; enum pl2303_type type = type_0; unsigned char *buf; int i; buf = kmalloc(10, GFP_KERNEL); if (buf == NULL) return -ENOMEM; if (serial->dev->descriptor.bDeviceClass == 0x02) type = type_0; else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40) type = HX; else if (serial->dev->descriptor.bDeviceClass == 0x00) type = type_1; else if (serial->dev->descriptor.bDeviceClass == 0xFF) type = type_1; dbg("device type: %d", type); for (i = 0; i < serial->num_ports; ++i) { priv = kzalloc(sizeof(struct pl2303_private), GFP_KERNEL); if (!priv) goto cleanup; spin_lock_init(&priv->lock); priv->type = type; usb_set_serial_port_data(serial->port[i], priv); } pl2303_vendor_read(0x8484, 0, serial, buf); pl2303_vendor_write(0x0404, 0, serial); pl2303_vendor_read(0x8484, 0, serial, buf); pl2303_vendor_read(0x8383, 0, serial, buf); pl2303_vendor_read(0x8484, 0, serial, buf); pl2303_vendor_write(0x0404, 1, serial); pl2303_vendor_read(0x8484, 0, serial, buf); pl2303_vendor_read(0x8383, 0, serial, buf); pl2303_vendor_write(0, 1, serial); pl2303_vendor_write(1, 0, serial); if (type == HX) pl2303_vendor_write(2, 0x44, serial); else pl2303_vendor_write(2, 0x24, serial); kfree(buf); return 0; cleanup: kfree(buf); for (--i; i >= 0; --i) { priv = usb_get_serial_port_data(serial->port[i]); kfree(priv); usb_set_serial_port_data(serial->port[i], NULL); } return -ENOMEM; } static int set_control_lines(struct usb_device *dev, u8 value) { int retval; retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE, value, 0, NULL, 0, 100); dbg("%s - value = %d, retval = %d", __func__, value, retval); return retval; } static void pl2303_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct usb_serial *serial = port->serial; struct pl2303_private *priv = usb_get_serial_port_data(port); unsigned long flags; unsigned int cflag; unsigned char *buf; int baud; int i; u8 control; const int baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 230400, 460800, 614400, 921600, 1228800, 2457600, 3000000, 6000000 }; int baud_floor, baud_ceil; int k; dbg("%s - port %d", __func__, port->number); /* The PL2303 is reported to lose bytes if you change serial settings even to the same values as before. Thus we actually need to filter in this specific case */ if (old_termios && !tty_termios_hw_change(tty->termios, old_termios)) return; cflag = tty->termios->c_cflag; buf = kzalloc(7, GFP_KERNEL); if (!buf) { dev_err(&port->dev, "%s - out of memory.\n", __func__); /* Report back no change occurred */ if (old_termios) *tty->termios = *old_termios; return; } i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, 0, 0, buf, 7, 100); dbg("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); if (cflag & CSIZE) { switch (cflag & CSIZE) { case CS5: buf[6] = 5; break; case CS6: buf[6] = 6; break; case CS7: buf[6] = 7; break; default: case CS8: buf[6] = 8; break; } dbg("%s - data bits = %d", __func__, buf[6]); } /* For reference buf[0]:buf[3] baud rate value */ /* NOTE: Only the values defined in baud_sup are supported ! * => if unsupported values are set, the PL2303 seems to use * 9600 baud (at least my PL2303X always does) */ baud = tty_get_baud_rate(tty); dbg("%s - baud requested = %d", __func__, baud); if (baud) { /* Set baudrate to nearest supported value */ for (k=0; k<ARRAY_SIZE(baud_sup); k++) { if (baud_sup[k] / baud) { baud_ceil = baud_sup[k]; if (k==0) { baud = baud_ceil; } else { baud_floor = baud_sup[k-1]; if ((baud_ceil % baud) > (baud % baud_floor)) baud = baud_floor; else baud = baud_ceil; } break; } } if (baud > 1228800) { /* type_0, type_1 only support up to 1228800 baud */ if (priv->type != HX) baud = 1228800; else if (baud > 6000000) baud = 6000000; } dbg("%s - baud set = %d", __func__, baud); if (baud <= 115200) { buf[0] = baud & 0xff; buf[1] = (baud >> 8) & 0xff; buf[2] = (baud >> 16) & 0xff; buf[3] = (baud >> 24) & 0xff; } else { /* apparently the formula for higher speeds is: * baudrate = 12M * 32 / (2^buf[1]) / buf[0] */ unsigned tmp = 12*1000*1000*32 / baud; buf[3] = 0x80; buf[2] = 0; buf[1] = (tmp >= 256); while (tmp >= 256) { tmp >>= 2; buf[1] <<= 1; } buf[0] = tmp; } } /* For reference buf[4]=0 is 1 stop bits */ /* For reference buf[4]=1 is 1.5 stop bits */ /* For reference buf[4]=2 is 2 stop bits */ if (cflag & CSTOPB) { /* NOTE: Comply with "real" UARTs / RS232: * use 1.5 instead of 2 stop bits with 5 data bits */ if ((cflag & CSIZE) == CS5) { buf[4] = 1; dbg("%s - stop bits = 1.5", __func__); } else { buf[4] = 2; dbg("%s - stop bits = 2", __func__); } } else { buf[4] = 0; dbg("%s - stop bits = 1", __func__); } if (cflag & PARENB) { /* For reference buf[5]=0 is none parity */ /* For reference buf[5]=1 is odd parity */ /* For reference buf[5]=2 is even parity */ /* For reference buf[5]=3 is mark parity */ /* For reference buf[5]=4 is space parity */ if (cflag & PARODD) { if (cflag & CMSPAR) { buf[5] = 3; dbg("%s - parity = mark", __func__); } else { buf[5] = 1; dbg("%s - parity = odd", __func__); } } else { if (cflag & CMSPAR) { buf[5] = 4; dbg("%s - parity = space", __func__); } else { buf[5] = 2; dbg("%s - parity = even", __func__); } } } else { buf[5] = 0; dbg("%s - parity = none", __func__); } i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), SET_LINE_REQUEST, SET_LINE_REQUEST_TYPE, 0, 0, buf, 7, 100); dbg("0x21:0x20:0:0 %d", i); /* change control lines if we are switching to or from B0 */ spin_lock_irqsave(&priv->lock, flags); control = priv->line_control; if ((cflag & CBAUD) == B0) priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); else if (old_termios && (old_termios->c_cflag & CBAUD) == B0) priv->line_control |= (CONTROL_DTR | CONTROL_RTS); if (control != priv->line_control) { control = priv->line_control; spin_unlock_irqrestore(&priv->lock, flags); set_control_lines(serial->dev, control); } else { spin_unlock_irqrestore(&priv->lock, flags); } buf[0] = buf[1] = buf[2] = buf[3] = buf[4] = buf[5] = buf[6] = 0; i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, 0, 0, buf, 7, 100); dbg("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); if (cflag & CRTSCTS) { if (priv->type == HX) pl2303_vendor_write(0x0, 0x61, serial); else pl2303_vendor_write(0x0, 0x41, serial); } else { pl2303_vendor_write(0x0, 0x0, serial); } /* Save resulting baud rate */ if (baud) tty_encode_baud_rate(tty, baud, baud); kfree(buf); } static void pl2303_dtr_rts(struct usb_serial_port *port, int on) { struct pl2303_private *priv = usb_get_serial_port_data(port); unsigned long flags; u8 control; spin_lock_irqsave(&priv->lock, flags); /* Change DTR and RTS */ if (on) priv->line_control |= (CONTROL_DTR | CONTROL_RTS); else priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); control = priv->line_control; spin_unlock_irqrestore(&priv->lock, flags); set_control_lines(port->serial->dev, control); } static void pl2303_close(struct usb_serial_port *port) { dbg("%s - port %d", __func__, port->number); usb_serial_generic_close(port); usb_kill_urb(port->interrupt_in_urb); } static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) { struct usb_serial *serial = port->serial; struct pl2303_private *priv = usb_get_serial_port_data(port); int result; dbg("%s - port %d", __func__, port->number); if (priv->type != HX) { usb_clear_halt(serial->dev, port->write_urb->pipe); usb_clear_halt(serial->dev, port->read_urb->pipe); } else { /* reset upstream data pipes */ pl2303_vendor_write(8, 0, serial); pl2303_vendor_write(9, 0, serial); } /* Setup termios */ if (tty) pl2303_set_termios(tty, port, NULL); dbg("%s - submitting interrupt urb", __func__); result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); if (result) { dev_err(&port->dev, "%s - failed submitting interrupt urb," " error %d\n", __func__, result); return result; } result = usb_serial_generic_open(tty, port); if (result) { usb_kill_urb(port->interrupt_in_urb); return result; } port->port.drain_delay = 256; return 0; } static int pl2303_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) { struct usb_serial_port *port = tty->driver_data; struct pl2303_private *priv = usb_get_serial_port_data(port); unsigned long flags; u8 control; if (!usb_get_intfdata(port->serial->interface)) return -ENODEV; spin_lock_irqsave(&priv->lock, flags); if (set & TIOCM_RTS) priv->line_control |= CONTROL_RTS; if (set & TIOCM_DTR) priv->line_control |= CONTROL_DTR; if (clear & TIOCM_RTS) priv->line_control &= ~CONTROL_RTS; if (clear & TIOCM_DTR) priv->line_control &= ~CONTROL_DTR; control = priv->line_control; spin_unlock_irqrestore(&priv->lock, flags); return set_control_lines(port->serial->dev, control); } static int pl2303_tiocmget(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; struct pl2303_private *priv = usb_get_serial_port_data(port); unsigned long flags; unsigned int mcr; unsigned int status; unsigned int result; dbg("%s (%d)", __func__, port->number); if (!usb_get_intfdata(port->serial->interface)) return -ENODEV; spin_lock_irqsave(&priv->lock, flags); mcr = priv->line_control; status = priv->line_status; spin_unlock_irqrestore(&priv->lock, flags); result = ((mcr & CONTROL_DTR) ? TIOCM_DTR : 0) | ((mcr & CONTROL_RTS) ? TIOCM_RTS : 0) | ((status & UART_CTS) ? TIOCM_CTS : 0) | ((status & UART_DSR) ? TIOCM_DSR : 0) | ((status & UART_RING) ? TIOCM_RI : 0) | ((status & UART_DCD) ? TIOCM_CD : 0); dbg("%s - result = %x", __func__, result); return result; } static int pl2303_carrier_raised(struct usb_serial_port *port) { struct pl2303_private *priv = usb_get_serial_port_data(port); if (priv->line_status & UART_DCD) return 1; return 0; } static int wait_modem_info(struct usb_serial_port *port, unsigned int arg) { struct pl2303_private *priv = usb_get_serial_port_data(port); unsigned long flags; unsigned int prevstatus; unsigned int status; unsigned int changed; spin_lock_irqsave(&priv->lock, flags); prevstatus = priv->line_status; spin_unlock_irqrestore(&priv->lock, flags); while (1) { interruptible_sleep_on(&port->delta_msr_wait); /* see if a signal did it */ if (signal_pending(current)) return -ERESTARTSYS; if (port->serial->disconnected) return -EIO; spin_lock_irqsave(&priv->lock, flags); status = priv->line_status; spin_unlock_irqrestore(&priv->lock, flags); changed = prevstatus ^ status; if (((arg & TIOCM_RNG) && (changed & UART_RING)) || ((arg & TIOCM_DSR) && (changed & UART_DSR)) || ((arg & TIOCM_CD) && (changed & UART_DCD)) || ((arg & TIOCM_CTS) && (changed & UART_CTS))) { return 0; } prevstatus = status; } /* NOTREACHED */ return 0; } static int pl2303_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { struct serial_struct ser; struct usb_serial_port *port = tty->driver_data; dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); switch (cmd) { case TIOCGSERIAL: memset(&ser, 0, sizeof ser); ser.type = PORT_16654; ser.line = port->serial->minor; ser.port = port->number; ser.baud_base = 460800; if (copy_to_user((void __user *)arg, &ser, sizeof ser)) return -EFAULT; return 0; case TIOCMIWAIT: dbg("%s (%d) TIOCMIWAIT", __func__, port->number); return wait_modem_info(port, arg); default: dbg("%s not supported = 0x%04x", __func__, cmd); break; } return -ENOIOCTLCMD; } static void pl2303_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct usb_serial *serial = port->serial; u16 state; int result; dbg("%s - port %d", __func__, port->number); if (break_state == 0) state = BREAK_OFF; else state = BREAK_ON; dbg("%s - turning break %s", __func__, state == BREAK_OFF ? "off" : "on"); result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 0, NULL, 0, 100); if (result) dbg("%s - error sending break = %d", __func__, result); } static void pl2303_release(struct usb_serial *serial) { int i; struct pl2303_private *priv; dbg("%s", __func__); for (i = 0; i < serial->num_ports; ++i) { priv = usb_get_serial_port_data(serial->port[i]); kfree(priv); } } static void pl2303_update_line_status(struct usb_serial_port *port, unsigned char *data, unsigned int actual_length) { struct pl2303_private *priv = usb_get_serial_port_data(port); struct tty_struct *tty; unsigned long flags; u8 status_idx = UART_STATE; u8 length = UART_STATE + 1; u8 prev_line_status; u16 idv, idp; idv = le16_to_cpu(port->serial->dev->descriptor.idVendor); idp = le16_to_cpu(port->serial->dev->descriptor.idProduct); if (idv == SIEMENS_VENDOR_ID) { if (idp == SIEMENS_PRODUCT_ID_X65 || idp == SIEMENS_PRODUCT_ID_SX1 || idp == SIEMENS_PRODUCT_ID_X75) { length = 1; status_idx = 0; } } if (actual_length < length) return; /* Save off the uart status for others to look at */ spin_lock_irqsave(&priv->lock, flags); prev_line_status = priv->line_status; priv->line_status = data[status_idx]; spin_unlock_irqrestore(&priv->lock, flags); if (priv->line_status & UART_BREAK_ERROR) usb_serial_handle_break(port); wake_up_interruptible(&port->delta_msr_wait); tty = tty_port_tty_get(&port->port); if (!tty) return; if ((priv->line_status ^ prev_line_status) & UART_DCD) usb_serial_handle_dcd_change(port, tty, priv->line_status & UART_DCD); tty_kref_put(tty); } static void pl2303_read_int_callback(struct urb *urb) { struct usb_serial_port *port = urb->context; unsigned char *data = urb->transfer_buffer; unsigned int actual_length = urb->actual_length; int status = urb->status; int retval; dbg("%s (%d)", __func__, port->number); switch (status) { case 0: /* success */ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ dbg("%s - urb shutting down with status: %d", __func__, status); return; default: dbg("%s - nonzero urb status received: %d", __func__, status); goto exit; } usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, urb->transfer_buffer); pl2303_update_line_status(port, data, actual_length); exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } static void pl2303_process_read_urb(struct urb *urb) { struct usb_serial_port *port = urb->context; struct pl2303_private *priv = usb_get_serial_port_data(port); struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; char tty_flag = TTY_NORMAL; unsigned long flags; u8 line_status; int i; /* update line status */ spin_lock_irqsave(&priv->lock, flags); line_status = priv->line_status; priv->line_status &= ~UART_STATE_TRANSIENT_MASK; spin_unlock_irqrestore(&priv->lock, flags); wake_up_interruptible(&port->delta_msr_wait); if (!urb->actual_length) return; tty = tty_port_tty_get(&port->port); if (!tty) return; /* break takes precedence over parity, */ /* which takes precedence over framing errors */ if (line_status & UART_BREAK_ERROR) tty_flag = TTY_BREAK; else if (line_status & UART_PARITY_ERROR) tty_flag = TTY_PARITY; else if (line_status & UART_FRAME_ERROR) tty_flag = TTY_FRAME; dbg("%s - tty_flag = %d", __func__, tty_flag); /* overrun is special, not associated with a char */ if (line_status & UART_OVERRUN_ERROR) tty_insert_flip_char(tty, 0, TTY_OVERRUN); if (port->port.console && port->sysrq) { for (i = 0; i < urb->actual_length; ++i) if (!usb_serial_handle_sysrq_char(port, data[i])) tty_insert_flip_char(tty, data[i], tty_flag); } else { tty_insert_flip_string_fixed_flag(tty, data, tty_flag, urb->actual_length); } tty_flip_buffer_push(tty); tty_kref_put(tty); } /* All of the device info needed for the PL2303 SIO serial converter */ static struct usb_serial_driver pl2303_device = { .driver = { .owner = THIS_MODULE, .name = "pl2303", }, .id_table = id_table, .num_ports = 1, .bulk_in_size = 256, .bulk_out_size = 256, .open = pl2303_open, .close = pl2303_close, .dtr_rts = pl2303_dtr_rts, .carrier_raised = pl2303_carrier_raised, .ioctl = pl2303_ioctl, .break_ctl = pl2303_break_ctl, .set_termios = pl2303_set_termios, .tiocmget = pl2303_tiocmget, .tiocmset = pl2303_tiocmset, .process_read_urb = pl2303_process_read_urb, .read_int_callback = pl2303_read_int_callback, .attach = pl2303_startup, .release = pl2303_release, }; static struct usb_serial_driver * const serial_drivers[] = { &pl2303_device, NULL }; module_usb_serial_driver(pl2303_driver, serial_drivers); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debug enabled or not");
gpl-2.0
supertcy/mt_kernel
drivers/md/Makefile
1856
## Makefile for the kernel software RAID and LVM drivers. # dm-mod-y += dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \ dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o dm-multipath-y += dm-path-selector.o dm-mpath.o dm-snapshot-y += dm-snap.o dm-exception-store.o dm-snap-transient.o \ dm-snap-persistent.o dm-mirror-y += dm-raid1.o dm-log-userspace-y \ += dm-log-userspace-base.o dm-log-userspace-transfer.o dm-thin-pool-y += dm-thin.o dm-thin-metadata.o md-mod-y += md.o bitmap.o raid456-y += raid5.o # Note: link order is important. All raid personalities # and must come before md.o, as they each initialise # themselves, and md.o may use the personalities when it # auto-initialised. obj-$(CONFIG_MD_LINEAR) += linear.o obj-$(CONFIG_MD_RAID0) += raid0.o obj-$(CONFIG_MD_RAID1) += raid1.o obj-$(CONFIG_MD_RAID10) += raid10.o obj-$(CONFIG_MD_RAID456) += raid456.o obj-$(CONFIG_MD_MULTIPATH) += multipath.o obj-$(CONFIG_MD_FAULTY) += faulty.o obj-$(CONFIG_BLK_DEV_MD) += md-mod.o obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o obj-$(CONFIG_DM_BUFIO) += dm-bufio.o obj-$(CONFIG_DM_CRYPT) += dm-crypt.o obj-$(CONFIG_DM_DELAY) += dm-delay.o obj-$(CONFIG_DM_FLAKEY) += dm-flakey.o obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/ obj-$(CONFIG_DM_MIRROR) += dm-mirror.o dm-log.o dm-region-hash.o obj-$(CONFIG_DM_LOG_USERSPACE) += dm-log-userspace.o obj-$(CONFIG_DM_ZERO) += dm-zero.o obj-$(CONFIG_DM_RAID) += dm-raid.o obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o obj-$(CONFIG_DM_RAID45) += dm-raid45.o dm-log.o dm-memcache.o \ dm-region-hash.o ifeq ($(CONFIG_DM_UEVENT),y) dm-mod-objs += dm-uevent.o endif
gpl-2.0
BetterBetterBetter/B3App
components/com_easydiscuss/models/labels.php
6201
<?php /** * @package EasyDiscuss * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved. * @license GNU/GPL, see LICENSE.php * * EasyDiscuss is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Restricted access'); require_once dirname( __FILE__ ) . '/model.php'; class EasyDiscussModelLabels extends EasyDiscussModel { protected $_total = null; protected $_pagination = null; protected $_data = null; public function __construct() { parent::__construct( array() ); $app = JFactory::getApplication(); $limit = $app->getUserStateFromRequest( 'com_easydiscuss.labels.limit', 'limit', DiscussHelper::getListLimit(), 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $this->setState('limit' , $limit); $this->setState('limitstart', $limitstart); } /** * Method to get the total number of the labels * * @access public * @return integer */ public function getTotal() { // Lets load the content if it doesn't already exist if (empty($this->_total)) { $query = $this->_buildQuery(); $this->_total = $this->_getListCount($query); } return $this->_total; } /** * Method to get a pagination object for the labels * * @access public * @return integer */ public function getPagination() { // Lets load the content if it doesn't already exist if (empty($this->_pagination)) { jimport('joomla.html.pagination'); $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') ); } return $this->_pagination; } /** * Method to build the query for the labels * * @access private * @return string */ private function _buildQuery() { // Get the WHERE and ORDER BY clauses for the query $where = $this->_buildQueryWhere(); $orderby = $this->_buildQueryOrderBy(); $db = DiscussHelper::getDBO(); $query = 'SELECT * FROM ' . $db->nameQuote( '#__discuss_posts_labels' ) . $where . ' ' . $orderby; return $query; } private function _buildQueryWhere() { $app = JFactory::getApplication(); $db = DiscussHelper::getDBO(); $filter_state = $app->getUserStateFromRequest( 'com_easydiscuss.labels.filter_state', 'filter_state', '', 'word' ); $search = $app->getUserStateFromRequest( 'com_easydiscuss.labels.search', 'search', '', 'string' ); $search = $db->getEscaped( trim(JString::strtolower( $search ) ) ); $where = array(); if ( $filter_state ) { if ( $filter_state == 'P' ) { $where[] = $db->nameQuote( 'published' ) . '=' . $db->Quote( '1' ); } else if ($filter_state == 'U' ) { $where[] = $db->nameQuote( 'published' ) . '=' . $db->Quote( '0' ); } } if ($search) { $where[] = ' LOWER( title ) LIKE \'%' . $search . '%\' '; } $where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' ); return $where; } private function _buildQueryOrderBy() { $app = JFactory::getApplication(); $filter_order = $app->getUserStateFromRequest( 'com_easydiscuss.labels.filter_order', 'filter_order', 'ordering ASC' , 'int' ); $filter_order_Dir = $app->getUserStateFromRequest( 'com_easydiscuss.labels.filter_order_Dir', 'filter_order_Dir', '' , 'word' ); $orderby = ' ORDER BY '.$filter_order.' '.$filter_order_Dir; return $orderby; } /** * Method to get labels item data * * @access public * @return array */ public function getData() { // Lets load the content if it doesn't already exist if (empty($this->_data)) { $query = $this->_buildQuery(); $this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit')); } return $this->_data; } /** * Method to publish or unpublish labels * * @access public * @return boolean */ public function publish( $labels = array(), $publish = true ) { if( is_integer($labels) ) { $labels = array($labels); } elseif ( !is_array($labels) || count($labels) < 1 ) { return false; } $labels = implode( ',' , $labels ); $publish = $publish ? 1 : 0; $db = DiscussHelper::getDBO(); $query = 'UPDATE ' . $db->nameQuote( '#__discuss_posts_labels' ) . ' SET ' . $db->nameQuote( 'published' ) . '=' . $db->Quote( $publish ) . ' WHERE ' . $db->nameQuote( 'id' ) . ' IN (' . $labels . ')'; $db->setQuery( $query ); if( !$db->query() ) { $this->setError($this->_db->getErrorMsg()); return false; } return true; } public function searchLabel($title) { $db = DiscussHelper::getDBO(); $query = 'SELECT ' . $db->nameQuote('id') . ' ' . 'FROM ' . $db->nameQuote('#__discuss_posts_labels') . ' ' . 'WHERE ' . $db->nameQuote('title') . ' = ' . $db->quote($title) . ' ' . 'LIMIT 1'; $db->setQuery($query); $result = $db->loadObject(); return $result; } public function getLabelTitle($id) { $db = DiscussHelper::getDBO(); $query = 'SELECT ' . $db->nameQuote('title') . ' ' . 'FROM ' . $db->nameQuote('#__discuss_posts_labels') . ' ' . 'WHERE ' . $db->nameQuote('id') . ' = ' . $db->quote($id) . ' ' . 'LIMIT 1'; $db->setQuery($query); $result = $db->loadResult(); return $result; } /** * Method to get total labels * * @access public * @return integer */ public function getTotalLabels( $ignoreUnpublish = false ) { $db = DiscussHelper::getDBO(); $query = 'SELECT COUNT(1) FROM ' . $db->nameQuote( '#__discuss_posts_labels' ); $query .= $ignoreUnpublish ? '' : ' WHERE `published` = 1'; $db->setQuery( $query ); $result = $db->loadResult(); return (empty($result)) ? 0 : $result; } public function getLabels() { $db = DiscussHelper::getDBO(); $query = ' SELECT `id`, `title` ' . ' FROM #__discuss_posts_labels ' . ' WHERE `published` = 1 ' . ' ORDER BY `ordering`'; $db->setQuery($query); $result = $db->loadObjectList(); return $result; } }
gpl-2.0
ChubbyArse/Emby
MediaBrowser.WebDashboard/dashboard-ui/bower_components/hls.js/src/loader/playlist-loader.js
10482
/** * Playlist Loader */ import Event from '../events'; import EventHandler from '../event-handler'; import {ErrorTypes, ErrorDetails} from '../errors'; import URLHelper from '../utils/url'; import AttrList from '../utils/attr-list'; //import {logger} from '../utils/logger'; class PlaylistLoader extends EventHandler { constructor(hls) { super(hls, Event.MANIFEST_LOADING, Event.LEVEL_LOADING); } destroy() { if (this.loader) { this.loader.destroy(); this.loader = null; } this.url = this.id = null; EventHandler.prototype.destroy.call(this); } onManifestLoading(data) { this.load(data.url, null); } onLevelLoading(data) { this.load(data.url, data.level, data.id); } load(url, id1, id2) { var config = this.hls.config, retry, timeout, retryDelay; if (this.loading && this.loader) { if (this.url === url && this.id === id1 && this.id2 === id2) { // same request than last pending one, don't do anything return; } else { // one playlist load request is pending, but with different params, abort it before loading new playlist this.loader.abort(); } } this.url = url; this.id = id1; this.id2 = id2; if(this.id === null) { retry = config.manifestLoadingMaxRetry; timeout = config.manifestLoadingTimeOut; retryDelay = config.manifestLoadingRetryDelay; } else { retry = config.levelLoadingMaxRetry; timeout = config.levelLoadingTimeOut; retryDelay = config.levelLoadingRetryDelay; } this.loader = typeof(config.pLoader) !== 'undefined' ? new config.pLoader(config) : new config.loader(config); this.loading = true; this.loader.load(url, '', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), timeout, retry, retryDelay); } resolve(url, baseUrl) { return URLHelper.buildAbsoluteURL(baseUrl, url); } parseMasterPlaylist(string, baseurl) { let levels = [], result; // https://regex101.com is your friend const re = /#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g; while ((result = re.exec(string)) != null){ const level = {}; var attrs = level.attrs = new AttrList(result[1]); level.url = this.resolve(result[2], baseurl); var resolution = attrs.decimalResolution('RESOLUTION'); if(resolution) { level.width = resolution.width; level.height = resolution.height; } level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH'); level.name = attrs.NAME; var codecs = attrs.CODECS; if(codecs) { codecs = codecs.split(','); for (let i = 0; i < codecs.length; i++) { const codec = codecs[i]; if (codec.indexOf('avc1') !== -1) { level.videoCodec = this.avc1toavcoti(codec); } else { level.audioCodec = codec; } } } levels.push(level); } return levels; } avc1toavcoti(codec) { var result, avcdata = codec.split('.'); if (avcdata.length > 2) { result = avcdata.shift() + '.'; result += parseInt(avcdata.shift()).toString(16); result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4); } else { result = codec; } return result; } cloneObj(obj) { return JSON.parse(JSON.stringify(obj)); } parseLevelPlaylist(string, baseurl, id) { var currentSN = 0, totalduration = 0, level = {url: baseurl, fragments: [], live: true, startSN: 0}, levelkey = {method : null, key : null, iv : null, uri : null}, cc = 0, programDateTime = null, frag = null, result, regexp, byteRangeEndOffset, byteRangeStartOffset; regexp = /(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\d\.]+)[^\r\n]*([\r\n]+[^#|\r\n]+)?)|(?:#EXT-X-(BYTERANGE):([\d]+[@[\d]*)]*[\r\n]+([^#|\r\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g; while ((result = regexp.exec(string)) !== null) { result.shift(); result = result.filter(function(n) { return (n !== undefined); }); switch (result[0]) { case 'MEDIA-SEQUENCE': currentSN = level.startSN = parseInt(result[1]); break; case 'TARGETDURATION': level.targetduration = parseFloat(result[1]); break; case 'ENDLIST': level.live = false; break; case 'DIS': cc++; break; case 'BYTERANGE': var params = result[1].split('@'); if (params.length === 1) { byteRangeStartOffset = byteRangeEndOffset; } else { byteRangeStartOffset = parseInt(params[1]); } byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset; if (frag && !frag.url) { frag.byteRangeStartOffset = byteRangeStartOffset; frag.byteRangeEndOffset = byteRangeEndOffset; frag.url = this.resolve(result[2], baseurl); } break; case 'INF': var duration = parseFloat(result[1]); if (!isNaN(duration)) { var fragdecryptdata, sn = currentSN++; if (levelkey.method && levelkey.uri && !levelkey.iv) { fragdecryptdata = this.cloneObj(levelkey); var uint8View = new Uint8Array(16); for (var i = 12; i < 16; i++) { uint8View[i] = (sn >> 8*(15-i)) & 0xff; } fragdecryptdata.iv = uint8View; } else { fragdecryptdata = levelkey; } var url = result[2] ? this.resolve(result[2], baseurl) : null; frag = {url: url, duration: duration, start: totalduration, sn: sn, level: id, cc: cc, byteRangeStartOffset: byteRangeStartOffset, byteRangeEndOffset: byteRangeEndOffset, decryptdata : fragdecryptdata, programDateTime: programDateTime}; level.fragments.push(frag); totalduration += duration; byteRangeStartOffset = null; programDateTime = null; } break; case 'KEY': // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4 var decryptparams = result[1]; var keyAttrs = new AttrList(decryptparams); var decryptmethod = keyAttrs.enumeratedString('METHOD'), decrypturi = keyAttrs.URI, decryptiv = keyAttrs.hexadecimalInteger('IV'); if (decryptmethod) { levelkey = { method: null, key: null, iv: null, uri: null }; if ((decrypturi) && (decryptmethod === 'AES-128')) { levelkey.method = decryptmethod; // URI to get the key levelkey.uri = this.resolve(decrypturi, baseurl); levelkey.key = null; // Initialization Vector (IV) levelkey.iv = decryptiv; } } break; case 'PROGRAM-DATE-TIME': programDateTime = new Date(Date.parse(result[1])); break; default: break; } } //logger.log('found ' + level.fragments.length + ' fragments'); if(frag && !frag.url) { level.fragments.pop(); totalduration-=frag.duration; } level.totalduration = totalduration; level.endSN = currentSN - 1; return level; } loadsuccess(event, stats) { var target = event.currentTarget, string = target.responseText, url = target.responseURL, id = this.id, id2 = this.id2, hls = this.hls, levels; this.loading = false; // responseURL not supported on some browsers (it is used to detect URL redirection) if (url === undefined) { // fallback to initial URL url = this.url; } stats.tload = performance.now(); stats.mtime = new Date(target.getResponseHeader('Last-Modified')); if (string.indexOf('#EXTM3U') === 0) { if (string.indexOf('#EXTINF:') > 0) { // 1 level playlist // if first request, fire manifest loaded event, level will be reloaded afterwards // (this is to have a uniform logic for 1 level/multilevel playlists) if (this.id === null) { hls.trigger(Event.MANIFEST_LOADED, {levels: [{url: url}], url: url, stats: stats}); } else { var levelDetails = this.parseLevelPlaylist(string, url, id); stats.tparsed = performance.now(); hls.trigger(Event.LEVEL_LOADED, {details: levelDetails, level: id, id: id2, stats: stats}); } } else { levels = this.parseMasterPlaylist(string, url); // multi level playlist, parse level info if (levels.length) { hls.trigger(Event.MANIFEST_LOADED, {levels: levels, url: url, stats: stats}); } else { hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest'}); } } } else { hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter'}); } } loaderror(event) { var details, fatal; if (this.id === null) { details = ErrorDetails.MANIFEST_LOAD_ERROR; fatal = true; } else { details = ErrorDetails.LEVEL_LOAD_ERROR; fatal = false; } if (this.loader) { this.loader.abort(); } this.loading = false; this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, response: event.currentTarget, level: this.id, id: this.id2}); } loadtimeout() { var details, fatal; if (this.id === null) { details = ErrorDetails.MANIFEST_LOAD_TIMEOUT; fatal = true; } else { details = ErrorDetails.LEVEL_LOAD_TIMEOUT; fatal = false; } if (this.loader) { this.loader.abort(); } this.loading = false; this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, level: this.id, id: this.id2}); } } export default PlaylistLoader;
gpl-2.0
stevenmizuno/QGIS
src/app/qgsmapthemes.cpp
7007
/*************************************************************************** qgsmapthemes.cpp -------------------------------------- Date : September 2014 Copyright : (C) 2014 by Martin Dobias Email : wonder dot sk at gmail dot com *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "qgsmapthemes.h" #include "qgsmapthemecollection.h" #include "qgslayertree.h" #include "qgslayertreemapcanvasbridge.h" #include "qgslayertreemodel.h" #include "qgslayertreemodellegendnode.h" #include "qgslayertreeview.h" #include "qgsmaplayerstylemanager.h" #include "qgsproject.h" #include "qgsrenderer.h" #include "qgsvectorlayer.h" #include "qgisapp.h" #include "qgsnewnamedialog.h" #include <QInputDialog> #include <QMessageBox> QgsMapThemes *QgsMapThemes::sInstance; QgsMapThemes::QgsMapThemes() : mMenu( new QMenu ) { mMenu->addAction( QgisApp::instance()->actionShowAllLayers() ); mMenu->addAction( QgisApp::instance()->actionHideAllLayers() ); mMenu->addAction( QgisApp::instance()->actionShowSelectedLayers() ); mMenu->addAction( QgisApp::instance()->actionHideSelectedLayers() ); mMenu->addAction( QgisApp::instance()->actionHideDeselectedLayers() ); mMenu->addSeparator(); mReplaceMenu = new QMenu( tr( "Replace Theme" ) ); mMenu->addMenu( mReplaceMenu ); mActionAddPreset = mMenu->addAction( tr( "Add Theme…" ), this, SLOT( addPreset() ) ); mMenuSeparator = mMenu->addSeparator(); mActionRemoveCurrentPreset = mMenu->addAction( tr( "Remove Current Theme" ), this, SLOT( removeCurrentPreset() ) ); connect( mMenu, &QMenu::aboutToShow, this, &QgsMapThemes::menuAboutToShow ); } QgsMapThemeCollection::MapThemeRecord QgsMapThemes::currentState() { QgsLayerTreeGroup *root = QgsProject::instance()->layerTreeRoot(); QgsLayerTreeModel *model = QgisApp::instance()->layerTreeView()->layerTreeModel(); return QgsMapThemeCollection::createThemeFromCurrentState( root, model ); } QgsMapThemes *QgsMapThemes::instance() { if ( !sInstance ) sInstance = new QgsMapThemes(); return sInstance; } void QgsMapThemes::addPreset( const QString &name ) { QgsProject::instance()->mapThemeCollection()->insert( name, currentState() ); } void QgsMapThemes::updatePreset( const QString &name ) { QgsProject::instance()->mapThemeCollection()->update( name, currentState() ); } QList<QgsMapLayer *> QgsMapThemes::orderedPresetVisibleLayers( const QString &name ) const { QStringList visibleIds = QgsProject::instance()->mapThemeCollection()->mapThemeVisibleLayerIds( name ); // also make sure to order the layers according to map canvas order QList<QgsMapLayer *> lst; Q_FOREACH ( QgsMapLayer *layer, QgsProject::instance()->layerTreeRoot()->layerOrder() ) { if ( visibleIds.contains( layer->id() ) ) { lst << layer; } } return lst; } QMenu *QgsMapThemes::menu() { return mMenu; } void QgsMapThemes::addPreset() { QStringList existingNames = QgsProject::instance()->mapThemeCollection()->mapThemes(); QgsNewNameDialog dlg( tr( "theme" ), tr( "Theme" ), QStringList(), existingNames, QRegExp(), Qt::CaseInsensitive, mMenu ); dlg.setWindowTitle( tr( "Map Themes" ) ); dlg.setHintString( tr( "Name of the new theme" ) ); dlg.setOverwriteEnabled( false ); dlg.setConflictingNameWarning( tr( "A theme with this name already exists." ) ); if ( dlg.exec() != QDialog::Accepted || dlg.name().isEmpty() ) return; addPreset( dlg.name() ); } void QgsMapThemes::presetTriggered() { QAction *actionPreset = qobject_cast<QAction *>( sender() ); if ( !actionPreset ) return; applyState( actionPreset->text() ); } void QgsMapThemes::replaceTriggered() { QAction *actionPreset = qobject_cast<QAction *>( sender() ); if ( !actionPreset ) return; int res = QMessageBox::question( mMenu, tr( "Replace Theme" ), trUtf8( "Are you sure you want to replace the existing theme “%1”?" ).arg( actionPreset->text() ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ); if ( res != QMessageBox::Yes ) return; //adding preset with same name is effectively a replace addPreset( actionPreset->text() ); } void QgsMapThemes::applyState( const QString &presetName ) { if ( !QgsProject::instance()->mapThemeCollection()->hasMapTheme( presetName ) ) return; QgsLayerTreeGroup *root = QgsProject::instance()->layerTreeRoot(); QgsLayerTreeModel *model = QgisApp::instance()->layerTreeView()->layerTreeModel(); QgsProject::instance()->mapThemeCollection()->applyTheme( presetName, root, model ); } void QgsMapThemes::removeCurrentPreset() { for ( QAction *actionPreset : qgis::as_const( mMenuPresetActions ) ) { if ( actionPreset->isChecked() ) { int res = QMessageBox::question( mMenu, tr( "Remove Theme" ), trUtf8( "Are you sure you want to remove the existing theme “%1”?" ).arg( actionPreset->text() ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ); if ( res == QMessageBox::Yes ) QgsProject::instance()->mapThemeCollection()->removeMapTheme( actionPreset->text() ); break; } } } void QgsMapThemes::menuAboutToShow() { qDeleteAll( mMenuPresetActions ); mMenuPresetActions.clear(); mReplaceMenu->clear(); qDeleteAll( mMenuReplaceActions ); mMenuReplaceActions.clear(); QgsMapThemeCollection::MapThemeRecord rec = currentState(); bool hasCurrent = false; Q_FOREACH ( const QString &grpName, QgsProject::instance()->mapThemeCollection()->mapThemes() ) { QAction *a = new QAction( grpName, mMenu ); a->setCheckable( true ); if ( !hasCurrent && rec == QgsProject::instance()->mapThemeCollection()->mapThemeState( grpName ) ) { a->setChecked( true ); hasCurrent = true; } connect( a, &QAction::triggered, this, &QgsMapThemes::presetTriggered ); mMenuPresetActions.append( a ); QAction *replaceAction = new QAction( grpName, mReplaceMenu ); connect( replaceAction, &QAction::triggered, this, &QgsMapThemes::replaceTriggered ); mReplaceMenu->addAction( replaceAction ); } mMenu->insertActions( mMenuSeparator, mMenuPresetActions ); mReplaceMenu->addActions( mMenuReplaceActions ); mActionAddPreset->setEnabled( !hasCurrent ); mActionRemoveCurrentPreset->setEnabled( hasCurrent ); }
gpl-2.0
PPCDroid/external-gst-plugins-bad
ext/resindvd/gstmpegdemux.c
60728
/* * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * The Original Code is Fluendo MPEG Demuxer plugin. * * The Initial Developer of the Original Code is Fluendo, S.L. * Portions created by Fluendo, S.L. are Copyright (C) 2005 * Fluendo, S.L. All Rights Reserved. * * Contributor(s): Wim Taymans <[email protected]> * Jan Schmidt <[email protected]> */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <string.h> #include "gstmpegdefs.h" #include "gstmpegdemux.h" #define SEGMENT_THRESHOLD (GST_SECOND/2) /* The SCR_MUNGE value is used to offset the scr_adjust value, to avoid * ever generating a negative timestamp */ #define SCR_MUNGE (10 * GST_SECOND) /* We clamp scr delta with 0 so negative bytes won't be possible */ #define GSTTIME_TO_BYTES(time) \ ((time != -1) ? gst_util_uint64_scale (MAX(0,(gint64) (GSTTIME_TO_MPEGTIME(time) - demux->first_scr)), demux->scr_rate_n, demux->scr_rate_d) : -1) #define BYTES_TO_GSTTIME(bytes) ((bytes != -1) ? MPEGTIME_TO_GSTTIME(gst_util_uint64_scale (bytes, demux->scr_rate_d, demux->scr_rate_n)) : -1) #define ADAPTER_OFFSET_FLUSH(_bytes_) demux->adapter_offset += (_bytes_) GST_DEBUG_CATEGORY_STATIC (gstflupsdemux_debug); #define GST_CAT_DEFAULT (gstflupsdemux_debug) GST_DEBUG_CATEGORY_EXTERN (gstflupesfilter_debug); /* elementfactory information */ static GstElementDetails flups_demux_details = { "MPEG Program Demuxer", "Codec/Demuxer", "Demultiplexes MPEG Program Streams", "Wim Taymans <[email protected]>" }; /* MPEG2Demux signals and args */ enum { /* FILL ME */ LAST_SIGNAL }; enum { ARG_0, /* FILL ME */ }; static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-resin-dvd") ); static GstStaticPadTemplate video_template = GST_STATIC_PAD_TEMPLATE ("video_%02x", GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS ("video/mpeg, " "mpegversion = (int) { 1, 2, 4 }, " "systemstream = (boolean) FALSE;" "video/x-h264") ); static GstStaticPadTemplate audio_template = GST_STATIC_PAD_TEMPLATE ("audio_%02x", GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS ("audio/mpeg, " "mpegversion = (int) 1;" "audio/x-private1-lpcm; " "audio/x-private1-ac3;" "audio/x-private1-dts;" "audio/ac3") ); static GstStaticPadTemplate subpicture_template = GST_STATIC_PAD_TEMPLATE ("subpicture_%02x", GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS ("video/x-dvd-subpicture") ); static GstStaticPadTemplate private_template = GST_STATIC_PAD_TEMPLATE ("private_%d", GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS_ANY); static void gst_flups_demux_base_init (GstFluPSDemuxClass * klass); static void gst_flups_demux_class_init (GstFluPSDemuxClass * klass); static void gst_flups_demux_init (GstFluPSDemux * demux); static void gst_flups_demux_finalize (GstFluPSDemux * demux); static void gst_flups_demux_reset (GstFluPSDemux * demux); static gboolean gst_flups_demux_sink_event (GstPad * pad, GstEvent * event); static gboolean gst_flups_demux_src_event (GstPad * pad, GstEvent * event); static gboolean gst_flups_demux_src_query (GstPad * pad, GstQuery * query); static GstFlowReturn gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer); static GstStateChangeReturn gst_flups_demux_change_state (GstElement * element, GstStateChange transition); static GstElementClass *parent_class = NULL; /*static guint gst_flups_demux_signals[LAST_SIGNAL] = { 0 };*/ GType gst_flups_demux_get_type (void) { static GType flups_demux_type = 0; if (!flups_demux_type) { static const GTypeInfo flups_demux_info = { sizeof (GstFluPSDemuxClass), (GBaseInitFunc) gst_flups_demux_base_init, NULL, (GClassInitFunc) gst_flups_demux_class_init, NULL, NULL, sizeof (GstFluPSDemux), 0, (GInstanceInitFunc) gst_flups_demux_init, }; flups_demux_type = g_type_register_static (GST_TYPE_ELEMENT, "RsnDVDDemux", &flups_demux_info, 0); GST_DEBUG_CATEGORY_INIT (gstflupsdemux_debug, "rsndvddemux", 0, "MPEG program stream demultiplexer element"); } return flups_demux_type; } static void gst_flups_demux_base_init (GstFluPSDemuxClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); klass->sink_template = gst_static_pad_template_get (&sink_template); klass->video_template = gst_static_pad_template_get (&video_template); klass->audio_template = gst_static_pad_template_get (&audio_template); klass->subpicture_template = gst_static_pad_template_get (&subpicture_template); klass->private_template = gst_static_pad_template_get (&private_template); gst_element_class_add_pad_template (element_class, klass->video_template); gst_element_class_add_pad_template (element_class, klass->audio_template); gst_element_class_add_pad_template (element_class, klass->private_template); gst_element_class_add_pad_template (element_class, klass->subpicture_template); gst_element_class_add_pad_template (element_class, klass->sink_template); gst_element_class_set_details (element_class, &flups_demux_details); } static void gst_flups_demux_class_init (GstFluPSDemuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; parent_class = g_type_class_ref (GST_TYPE_ELEMENT); gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gobject_class->finalize = (GObjectFinalizeFunc) gst_flups_demux_finalize; gstelement_class->change_state = gst_flups_demux_change_state; } static void gst_flups_demux_init (GstFluPSDemux * demux) { GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux); demux->sinkpad = gst_pad_new_from_template (klass->sink_template, "sink"); gst_pad_set_event_function (demux->sinkpad, gst_flups_demux_sink_event); gst_pad_set_chain_function (demux->sinkpad, gst_flups_demux_chain); gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad); demux->streams = g_malloc0 (sizeof (GstFluPSStream *) * (GST_FLUPS_DEMUX_MAX_STREAMS)); demux->scr_adjust = GSTTIME_TO_MPEGTIME (SCR_MUNGE); } static void gst_flups_demux_finalize (GstFluPSDemux * demux) { gst_flups_demux_reset (demux); g_free (demux->streams); G_OBJECT_CLASS (parent_class)->finalize (G_OBJECT (demux)); } static void gst_flups_demux_reset (GstFluPSDemux * demux) { /* Clean up the streams and pads we allocated */ gint i; GstEvent **p_ev; for (i = 0; i < GST_FLUPS_DEMUX_MAX_STREAMS; i++) { GstFluPSStream *stream = demux->streams[i]; if (stream != NULL) { if (stream->pad) gst_element_remove_pad (GST_ELEMENT_CAST (demux), stream->pad); g_free (stream); demux->streams[i] = NULL; } } p_ev = &demux->lang_codes; gst_event_replace (p_ev, NULL); demux->scr_adjust = GSTTIME_TO_MPEGTIME (SCR_MUNGE); } static GstFluPSStream * gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) { GstFluPSStream *stream; GstPadTemplate *template; gchar *name; GstFluPSDemuxClass *klass = GST_FLUPS_DEMUX_GET_CLASS (demux); GstCaps *caps; name = NULL; template = NULL; caps = NULL; GST_DEBUG_OBJECT (demux, "create stream id 0x%02x, type 0x%02x", id, stream_type); switch (stream_type) { case ST_VIDEO_MPEG1: case ST_VIDEO_MPEG2: case ST_VIDEO_MPEG4: case ST_GST_VIDEO_MPEG1_OR_2: { gint mpeg_version = 1; if (stream_type == ST_VIDEO_MPEG2 || (stream_type == ST_GST_VIDEO_MPEG1_OR_2 && demux->is_mpeg2_pack)) { mpeg_version = 2; } if (stream_type == ST_VIDEO_MPEG4) { mpeg_version = 4; } template = klass->video_template; name = g_strdup_printf ("video_%02x", id); caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, mpeg_version, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); break; } case ST_AUDIO_MPEG1: case ST_AUDIO_MPEG2: template = klass->audio_template; name = g_strdup_printf ("audio_%02x", id); caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 1, NULL); break; case ST_PRIVATE_SECTIONS: case ST_PRIVATE_DATA: case ST_MHEG: case ST_DSMCC: case ST_AUDIO_AAC: break; case ST_VIDEO_H264: template = klass->video_template; name = g_strdup_printf ("video_%02x", id); caps = gst_caps_new_simple ("video/x-h264", NULL); break; case ST_PS_AUDIO_AC3: template = klass->audio_template; name = g_strdup_printf ("audio_%02x", id); caps = gst_caps_new_simple ("audio/x-private1-ac3", NULL); break; case ST_PS_AUDIO_DTS: template = klass->audio_template; name = g_strdup_printf ("audio_%02x", id); caps = gst_caps_new_simple ("audio/x-private1-dts", NULL); break; case ST_PS_AUDIO_LPCM: template = klass->audio_template; name = g_strdup_printf ("audio_%02x", id); caps = gst_caps_new_simple ("audio/x-private1-lpcm", NULL); break; case ST_PS_DVD_SUBPICTURE: template = klass->subpicture_template; name = g_strdup_printf ("subpicture_%02x", id); caps = gst_caps_new_simple ("video/x-dvd-subpicture", NULL); break; case ST_GST_AUDIO_RAWA52: template = klass->audio_template; name = g_strdup_printf ("audio_%02x", id); caps = gst_caps_new_simple ("audio/ac3", NULL); break; default: break; } if (name == NULL || template == NULL || caps == NULL) return NULL; stream = g_new0 (GstFluPSStream, 1); stream->id = id; stream->discont = TRUE; stream->notlinked = FALSE; stream->type = stream_type; stream->pad = gst_pad_new_from_template (template, name); gst_pad_set_event_function (stream->pad, gst_flups_demux_src_event); gst_pad_set_query_function (stream->pad, gst_flups_demux_src_query); gst_pad_use_fixed_caps (stream->pad); gst_pad_set_caps (stream->pad, caps); gst_caps_unref (caps); GST_DEBUG_OBJECT (demux, "create pad %s, caps %" GST_PTR_FORMAT, name, caps); g_free (name); return stream; } static GstFluPSStream * gst_flups_demux_get_stream (GstFluPSDemux * demux, gint id, gint type) { GstFluPSStream *stream = demux->streams[id]; if (stream == NULL) { if (!(stream = gst_flups_demux_create_stream (demux, id, type))) goto unknown_stream; GST_DEBUG_OBJECT (demux, "adding pad for stream id 0x%02x type 0x%02x", id, type); gst_pad_set_active (stream->pad, TRUE); gst_element_add_pad (GST_ELEMENT (demux), stream->pad); demux->streams[id] = stream; } return stream; /* ERROR */ unknown_stream: { GST_DEBUG_OBJECT (demux, "unknown stream id 0x%02x type 0x%02x", id, type); return NULL; } } static GstFlowReturn gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream, GstBuffer * buf) { GstFlowReturn result; guint64 timestamp; guint size; if (stream == NULL) goto no_stream; /* timestamps */ if (demux->next_pts != G_MAXUINT64) timestamp = MPEGTIME_TO_GSTTIME (demux->next_pts); else timestamp = GST_CLOCK_TIME_NONE; if (demux->current_scr != G_MAXUINT64) { GstClockTime cur_scr_time = MPEGTIME_TO_GSTTIME (demux->current_scr); if (stream->last_ts == GST_CLOCK_TIME_NONE || stream->last_ts < cur_scr_time) { #if 0 g_print ("last_ts update on pad %s to time %" GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), GST_TIME_ARGS (cur_scr_time)); #endif stream->last_ts = cur_scr_time; } } /* OK, sent new segment now prepare the buffer for sending */ /* caps */ gst_buffer_set_caps (buf, GST_PAD_CAPS (stream->pad)); GST_BUFFER_TIMESTAMP (buf) = timestamp; /* Set the buffer discont flag, and clear discont state on the stream */ if (stream->discont) { GST_DEBUG_OBJECT (demux, "discont buffer to pad %" GST_PTR_FORMAT " with TS %" GST_TIME_FORMAT "\n", stream->pad, GST_TIME_ARGS (timestamp)); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); stream->discont = FALSE; } size = GST_BUFFER_SIZE (buf); demux->next_pts = G_MAXUINT64; demux->next_dts = G_MAXUINT64; result = gst_pad_push (stream->pad, buf); GST_DEBUG_OBJECT (demux, "pushed stream id 0x%02x type 0x%02x, time: %" GST_TIME_FORMAT ", size %d. result: %s", stream->id, stream->type, GST_TIME_ARGS (timestamp), size, gst_flow_get_name (result)); return result; /* ERROR */ no_stream: { GST_DEBUG_OBJECT (demux, "no stream given"); gst_buffer_unref (buf); return GST_FLOW_OK; } } static void gst_flups_demux_mark_discont (GstFluPSDemux * demux) { gint id; /* mark discont on all streams */ for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; if (stream) { stream->discont = TRUE; GST_DEBUG_OBJECT (demux, "marked stream as discont %d", stream->discont); } } } static void gst_flups_demux_clear_times (GstFluPSDemux * demux) { gint id; /* Clear the last ts for all streams */ for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; if (stream) { stream->last_ts = GST_CLOCK_TIME_NONE; } } } static void gst_flups_demux_send_segment_updates (GstFluPSDemux * demux, GstClockTime new_time) { /* Advance all lagging streams by sending a segment update */ gint id; GstEvent *event = NULL; if (new_time > demux->src_segment.stop) return; for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; if (stream) { if (stream->last_ts == GST_CLOCK_TIME_NONE || stream->last_ts < demux->src_segment.start) stream->last_ts = demux->src_segment.start; if (stream->last_ts + SEGMENT_THRESHOLD < new_time) { #if 0 g_print ("Segment update to pad %s time %" GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), GST_TIME_ARGS (new_time)); #endif if (event == NULL) { event = gst_event_new_new_segment_full (TRUE, demux->src_segment.rate, demux->src_segment.applied_rate, GST_FORMAT_TIME, new_time, demux->src_segment.stop, demux->src_segment.time + (new_time - demux->src_segment.start)); } gst_event_ref (event); gst_pad_push_event (stream->pad, event); stream->last_ts = new_time; } } } if (event) gst_event_unref (event); } static void gst_flups_demux_send_segment_close (GstFluPSDemux * demux) { gint id; GstEvent *event = NULL; for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; if (stream) { if (stream->last_ts == GST_CLOCK_TIME_NONE || stream->last_ts < demux->src_segment.start) stream->last_ts = demux->src_segment.start; #if 0 g_print ("Segment update to pad %s start %" GST_TIME_FORMAT " stop %" GST_TIME_FORMAT "\n", GST_PAD_NAME (stream->pad), GST_TIME_ARGS (stream->last_ts), GST_TIME_ARGS (demux->src_segment.stop)); #endif event = gst_event_new_new_segment_full (TRUE, demux->src_segment.rate, demux->src_segment.applied_rate, GST_FORMAT_TIME, stream->last_ts, demux->src_segment.stop, demux->src_segment.time + (stream->last_ts - demux->src_segment.start)); gst_pad_push_event (stream->pad, event); } } } static gboolean gst_flups_demux_send_event (GstFluPSDemux * demux, GstEvent * event) { gint id; gboolean ret = FALSE; for (id = 0; id < GST_FLUPS_DEMUX_MAX_STREAMS; id++) { GstFluPSStream *stream = demux->streams[id]; if (stream && !stream->notlinked) { (void) gst_event_ref (event); if (!gst_pad_push_event (stream->pad, event)) { GST_DEBUG_OBJECT (stream, "event %s was not handled correctly by pad %" GST_PTR_FORMAT, GST_EVENT_TYPE_NAME (event), stream->pad); } else { /* If at least one push returns TRUE, then we return TRUE. */ GST_DEBUG_OBJECT (stream, "event %s was handled correctly by pad %" GST_PTR_FORMAT, GST_EVENT_TYPE_NAME (event), stream->pad); ret = TRUE; } } } gst_event_unref (event); return ret; } static gboolean gst_flups_demux_handle_dvd_event (GstFluPSDemux * demux, GstEvent * event) { const GstStructure *structure = gst_event_get_structure (event); const char *type = gst_structure_get_string (structure, "event"); gint i; gchar cur_stream_name[32]; GstFluPSStream *temp; gboolean ret = TRUE; if (strcmp (type, "dvd-lang-codes") == 0) { GstEvent **p_ev; /* Store the language codes event on the element, then iterate over the * streams it specifies and retrieve them. The stream creation code then * creates the pad appropriately and sends tag events as needed */ p_ev = &demux->lang_codes; gst_event_replace (p_ev, event); GST_DEBUG_OBJECT (demux, "Handling language codes event"); /* Create a video pad to ensure it exists before emit no more pads */ temp = gst_flups_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2); /* Send a video format event downstream */ { gboolean is_widescreen, is_pal; if (gst_structure_get_boolean (structure, "video-widescreen", &is_widescreen) && gst_structure_get_boolean (structure, "video-pal-format", &is_pal)) { GstEvent *v_format; GstStructure *v_struct; v_struct = gst_structure_new ("application/x-gst-dvd", "event", G_TYPE_STRING, "dvd-video-format", "video-widescreen", G_TYPE_BOOLEAN, is_widescreen, "video-pal-format", G_TYPE_BOOLEAN, is_pal, NULL); v_format = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, v_struct); gst_pad_push_event (temp->pad, v_format); } } /* Read out the languages for audio streams and request each one that * is present */ for (i = 0; i < MAX_DVD_AUDIO_STREAMS; i++) { gint stream_format; gint stream_id; g_snprintf (cur_stream_name, 32, "audio-%d-format", i); if (!gst_structure_get_int (structure, cur_stream_name, &stream_format)) continue; demux->audio_stream_types[i] = stream_format; switch (stream_format) { case 0x0: /* AC3 */ stream_id = 0x80 + i; temp = gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_AC3); break; case 0x2: case 0x3: /* MPEG audio without and with extension stream are * treated the same */ stream_id = 0xC0 + i; temp = gst_flups_demux_get_stream (demux, stream_id, ST_AUDIO_MPEG1); break; case 0x4: /* LPCM */ stream_id = 0xA0 + i; temp = gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_LPCM); break; case 0x6: /* DTS */ stream_id = 0x88 + i; temp = gst_flups_demux_get_stream (demux, stream_id, ST_PS_AUDIO_DTS); break; case 0x7: /* FIXME: What range is SDDS? */ break; default: GST_WARNING_OBJECT (demux, "Unknown audio stream format in language code event: %d", stream_format); break; } } /* And subtitle streams */ for (i = 0; i < MAX_DVD_SUBPICTURE_STREAMS; i++) { gint stream_format; g_snprintf (cur_stream_name, 32, "subpicture-%d-format", i); if (!gst_structure_get_int (structure, cur_stream_name, &stream_format)) continue; /* Retrieve the subpicture stream to force pad creation */ temp = gst_flups_demux_get_stream (demux, 0x20 + i, ST_PS_DVD_SUBPICTURE); } GST_DEBUG_OBJECT (demux, "Created all pads from Language Codes event, " "signalling no-more-pads"); gst_element_no_more_pads (GST_ELEMENT (demux)); demux->need_no_more_pads = FALSE; gst_event_unref (event); } else if (strcmp (type, "dvd-set-subpicture-track") == 0) { gint stream_id; gboolean forced_only; gst_structure_get_boolean (structure, "forced-only", &forced_only); if (gst_structure_get_int (structure, "physical-id", &stream_id)) { temp = demux->streams[0x20 + stream_id]; if (temp != NULL && temp->pad != NULL) { /* Send event to the selector to activate the desired pad */ GstStructure *s = gst_structure_new ("application/x-gst-dvd", "event", G_TYPE_STRING, "select-pad", NULL); GstEvent *sel_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); gst_pad_push_event (temp->pad, sel_event); gst_event_ref (event); ret = gst_pad_push_event (temp->pad, event); g_print ("Subpicture physical ID change to %d, forced %d\n", stream_id, forced_only); } } gst_event_unref (event); } else if (strcmp (type, "dvd-set-audio-track") == 0) { gint stream_id; if (gst_structure_get_int (structure, "physical-id", &stream_id)) { gint aud_type; stream_id %= MAX_DVD_AUDIO_STREAMS; aud_type = demux->audio_stream_types[stream_id % MAX_DVD_AUDIO_STREAMS]; switch (aud_type) { case 0x0: /* AC3 */ stream_id += 0x80; temp = demux->streams[stream_id]; break; #if 0 /* FIXME: Ignore non AC-3 requests until the decoder bin can handle them */ case 0x2: case 0x3: /* MPEG audio without and with extension stream are * treated the same */ stream_id = 0xC0 + i; temp = demux->streams[stream_id]; break; case 0x4: /* LPCM */ stream_id = 0xA0 + i; temp = demux->streams[stream_id]; break; case 0x6: /* DTS */ stream_id = 0x88 + i; temp = demux->streams[stream_id]; break; case 0x7: /* FIXME: What range is SDDS? */ break; #endif default: temp = NULL; break; } if (temp != NULL && temp->pad != NULL) { /* Send event to the selector to activate the desired pad */ GstStructure *s = gst_structure_new ("application/x-gst-dvd", "event", G_TYPE_STRING, "select-pad", NULL); GstEvent *sel_event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, s); gst_pad_push_event (temp->pad, sel_event); g_print ("Audio physical ID change to %d\n", stream_id); gst_event_ref (event); ret = gst_pad_push_event (temp->pad, event); } } ret = gst_flups_demux_send_event (demux, event); } else { ret = gst_flups_demux_send_event (demux, event); } return ret; } static gboolean gst_flups_demux_sink_event (GstPad * pad, GstEvent * event) { gboolean res = TRUE; GstFluPSDemux *demux; demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: gst_flups_demux_send_event (demux, event); break; case GST_EVENT_FLUSH_STOP: gst_flups_demux_send_event (demux, event); gst_segment_init (&demux->sink_segment, GST_FORMAT_UNDEFINED); gst_segment_init (&demux->src_segment, GST_FORMAT_TIME); gst_adapter_clear (demux->adapter); gst_adapter_clear (demux->rev_adapter); demux->adapter_offset = G_MAXUINT64; gst_pes_filter_drain (&demux->filter); demux->current_scr = G_MAXUINT64; demux->bytes_since_scr = 0; demux->scr_adjust = GSTTIME_TO_MPEGTIME (SCR_MUNGE); gst_flups_demux_clear_times (demux); break; case GST_EVENT_NEWSEGMENT: { gboolean update; gdouble rate; GstFormat format; gint64 start, stop, time; gint64 accum, dur; gdouble arate; GstClockTimeDiff adjust; gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format, &start, &stop, &time); if (format != GST_FORMAT_TIME) return FALSE; dur = stop - start; demux->first_scr = GSTTIME_TO_MPEGTIME (start); demux->current_scr = demux->first_scr + demux->scr_adjust; demux->base_time = time; demux->bytes_since_scr = 0; gst_segment_set_newsegment_full (&demux->sink_segment, update, rate, arate, format, start, stop, time); g_print ("demux: got segment update %d start %" G_GINT64_FORMAT " stop %" G_GINT64_FORMAT " time %" G_GINT64_FORMAT "\n", update, start, stop, time); accum = demux->sink_segment.accum; start = demux->sink_segment.start; stop = demux->sink_segment.stop; adjust = accum - start + SCR_MUNGE; start = accum + SCR_MUNGE; if (adjust >= 0) demux->scr_adjust = GSTTIME_TO_MPEGTIME (adjust); else demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust); if (stop != -1) stop = start + dur; GST_INFO_OBJECT (demux, "sending new segment: rate %g " "format %d, start: %" G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT ", time: %" G_GINT64_FORMAT, rate, format, start, stop, time); g_print ("sending new segment: update %d rate %g format %d, start: %" G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT ", time: %" G_GINT64_FORMAT " scr_adjust: %" G_GINT64_FORMAT "(%" GST_TIME_FORMAT ")\n", update, rate, format, start, stop, time, demux->scr_adjust, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->scr_adjust))); gst_segment_set_newsegment_full (&demux->src_segment, update, rate, arate, format, start, stop, time); gst_event_unref (event); if (update) { /* Segment closing, send it as per-pad updates to manage the accum * properly */ gst_flups_demux_send_segment_close (demux); } else { event = gst_event_new_new_segment_full (update, rate, arate, GST_FORMAT_TIME, start, stop, time); gst_flups_demux_send_event (demux, event); } break; } case GST_EVENT_EOS: GST_INFO_OBJECT (demux, "Received EOS"); if (!gst_flups_demux_send_event (demux, event)) { GST_WARNING_OBJECT (demux, "failed pushing EOS on streams"); GST_ELEMENT_ERROR (demux, STREAM, FAILED, ("Internal data stream error."), ("Can't push EOS downstream")); } break; case GST_EVENT_CUSTOM_DOWNSTREAM: case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: { const GstStructure *structure = gst_event_get_structure (event); if (structure != NULL && gst_structure_has_name (structure, "application/x-gst-dvd")) { res = gst_flups_demux_handle_dvd_event (demux, event); } else { gst_flups_demux_send_event (demux, event); } break; } default: gst_flups_demux_send_event (demux, event); break; } gst_object_unref (demux); return res; } static gboolean gst_flups_demux_src_event (GstPad * pad, GstEvent * event) { gboolean res = FALSE; GstFluPSDemux *demux; demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: { gdouble rate; GstFormat format; GstSeekFlags flags; GstSeekType start_type, stop_type; gint64 start, stop; gint64 bstart, bstop; GstEvent *bevent; gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start, &stop_type, &stop); GST_DEBUG_OBJECT (demux, "seek event, rate: %f start: %" GST_TIME_FORMAT " stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); if (format == GST_FORMAT_BYTES) { GST_DEBUG_OBJECT (demux, "seek not supported on format %d", format); goto not_supported; } GST_DEBUG_OBJECT (demux, "seek - trying directly upstream first"); /* first try original format seek */ (void) gst_event_ref (event); if ((res = gst_pad_push_event (demux->sinkpad, event))) goto done; if (format != GST_FORMAT_TIME) { /* From here down, we only support time based seeks */ GST_DEBUG_OBJECT (demux, "seek not supported on format %d", format); goto not_supported; } /* We need to convert to byte based seek and we need a scr_rate for that. */ if (demux->scr_rate_n == G_MAXUINT64 || demux->scr_rate_d == G_MAXUINT64) { GST_DEBUG_OBJECT (demux, "seek not possible, no scr_rate"); goto not_supported; } GST_DEBUG_OBJECT (demux, "try with scr_rate interpolation"); bstart = GSTTIME_TO_BYTES (start); bstop = GSTTIME_TO_BYTES (stop); GST_DEBUG_OBJECT (demux, "in bytes bstart %" G_GINT64_FORMAT " bstop %" G_GINT64_FORMAT, bstart, bstop); bevent = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, start_type, bstart, stop_type, bstop); res = gst_pad_push_event (demux->sinkpad, bevent); done: gst_event_unref (event); break; } default: res = gst_pad_push_event (demux->sinkpad, event); break; } gst_object_unref (demux); return res; not_supported: { gst_object_unref (demux); gst_event_unref (event); return FALSE; } } static gboolean gst_flups_demux_src_query (GstPad * pad, GstQuery * query) { gboolean res = FALSE; GstFluPSDemux *demux; demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); GST_LOG_OBJECT (demux, "Have query of type %d on pad %" GST_PTR_FORMAT, GST_QUERY_TYPE (query), pad); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: { GstPad *peer; GstFormat format; gint64 position; gst_query_parse_position (query, &format, NULL); if ((peer = gst_pad_get_peer (demux->sinkpad)) != NULL) { res = gst_pad_query (peer, query); gst_object_unref (peer); if (res) break; } if (format != GST_FORMAT_TIME) { GST_DEBUG_OBJECT (demux, "position not supported for format %d", format); goto not_supported; } position = demux->base_time; if (demux->current_scr != G_MAXUINT64 && demux->first_scr != G_MAXUINT64) { position += MPEGTIME_TO_GSTTIME (demux->current_scr - demux->scr_adjust - demux->first_scr); } GST_LOG_OBJECT (demux, "Position at GStreamer Time:%" GST_TIME_FORMAT, GST_TIME_ARGS (position)); gst_query_set_position (query, format, position); res = TRUE; break; } case GST_QUERY_DURATION: { GstFormat format; gint64 duration; GstPad *peer; gst_query_parse_duration (query, &format, NULL); if ((peer = gst_pad_get_peer (demux->sinkpad)) == NULL) { GST_DEBUG_OBJECT (demux, "duration not possible, no peer"); goto not_supported; } /* For any format other than bytes, see if upstream knows first */ if (format == GST_FORMAT_BYTES) { GST_DEBUG_OBJECT (demux, "duration not supported for format %d", format); gst_object_unref (peer); goto not_supported; } if (gst_pad_query (peer, query)) { gst_object_unref (peer); res = TRUE; break; } /* Upstream didn't know, so we can only answer TIME queries from * here on */ if (format != GST_FORMAT_TIME) { GST_DEBUG_OBJECT (demux, "duration not supported for format %d", format); gst_object_unref (peer); goto not_supported; } if (demux->mux_rate == -1) { GST_DEBUG_OBJECT (demux, "duration not possible, no mux_rate"); gst_object_unref (peer); goto not_supported; } gst_query_set_duration (query, GST_FORMAT_BYTES, -1); if (!gst_pad_query (peer, query)) { GST_LOG_OBJECT (demux, "query on peer pad failed"); gst_object_unref (peer); goto not_supported; } gst_object_unref (peer); gst_query_parse_duration (query, &format, &duration); duration = BYTES_TO_GSTTIME (duration); gst_query_set_duration (query, GST_FORMAT_TIME, duration); res = TRUE; break; } default: res = gst_pad_query_default (pad, query); break; } gst_object_unref (demux); return res; not_supported: { gst_object_unref (demux); return FALSE; } } static void gst_flups_demux_reset_psm (GstFluPSDemux * demux) { gint i; #define FILL_TYPE(start, stop, type) \ for (i=start; i <= stop; i++) \ demux->psm[i] = type; FILL_TYPE (0x00, 0x1f, -1); FILL_TYPE (0x20, 0x3f, ST_PS_DVD_SUBPICTURE); FILL_TYPE (0x40, 0x7f, -1); FILL_TYPE (0x80, 0x87, ST_PS_AUDIO_AC3); FILL_TYPE (0x88, 0x9f, ST_PS_AUDIO_DTS); FILL_TYPE (0xa0, 0xbf, ST_PS_AUDIO_LPCM); FILL_TYPE (0xbd, 0xbd, -1); FILL_TYPE (0xc0, 0xdf, ST_AUDIO_MPEG1); FILL_TYPE (0xe0, 0xef, ST_GST_VIDEO_MPEG1_OR_2); FILL_TYPE (0xf0, 0xff, -1); #undef FILL_TYPE } static GstFlowReturn gst_flups_demux_parse_pack_start (GstFluPSDemux * demux) { const guint8 *data; guint length; guint32 scr1, scr2; guint64 scr, scr_adjusted, new_rate; GstClockTime new_time; GST_DEBUG ("parsing pack start"); /* fixed length to begin with, start code and two scr values */ length = 8 + 4; if (!(data = gst_adapter_peek (demux->adapter, length))) goto need_more_data; /* skip start code */ data += 4; scr1 = GUINT32_FROM_BE (*(guint32 *) data); scr2 = GUINT32_FROM_BE (*(guint32 *) (data + 4)); /* start parsing the stream */ if ((*data & 0xc0) == 0x40) { guint32 scr_ext; guint32 next32; guint8 stuffing_bytes; GST_DEBUG ("Found MPEG2 stream"); demux->is_mpeg2_pack = TRUE; /* mpeg2 has more data */ length += 2; if (gst_adapter_available (demux->adapter) < length) goto need_more_data; /* :2=01 ! scr:3 ! marker:1==1 ! scr:15 ! marker:1==1 ! scr:15 */ /* check markers */ if ((scr1 & 0xc4000400) != 0x44000400) goto lost_sync; scr = ((guint64) scr1 & 0x38000000) << 3; scr |= ((guint64) scr1 & 0x03fff800) << 4; scr |= ((guint64) scr1 & 0x000003ff) << 5; scr |= ((guint64) scr2 & 0xf8000000) >> 27; /* marker:1==1 ! scr_ext:9 ! marker:1==1 */ if ((scr2 & 0x04010000) != 0x04010000) goto lost_sync; scr_ext = (scr2 & 0x03fe0000) >> 17; /* We keep the offset of this scr */ demux->last_scr_offset = demux->adapter_offset + 12; GST_DEBUG_OBJECT (demux, "SCR: 0x%08x SCRE: 0x%08x", scr, scr_ext); if (scr_ext) { scr = (scr * 300 + scr_ext % 300) / 300; } /* SCR has been converted into units of 90Khz ticks to make it comparable to DTS/PTS, that also implies 1 tick rounding error */ data += 6; /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */ next32 = (GUINT32_FROM_BE ((*(guint32 *) data))); if ((next32 & 0x00000300) != 0x00000300) goto lost_sync; new_rate = (next32 & 0xfffffc00) >> 10; stuffing_bytes = (next32 & 0x07); GST_DEBUG_OBJECT (demux, "stuffing bytes: %d", stuffing_bytes); data += 4; while (stuffing_bytes--) { if (*data++ != 0xff) goto lost_sync; } } else { GST_DEBUG ("Found MPEG1 stream"); demux->is_mpeg2_pack = FALSE; /* check markers */ if ((scr1 & 0xf1000100) != 0x21000100) goto lost_sync; if ((scr2 & 0x01800001) != 0x01800001) goto lost_sync; /* :4=0010 ! scr:3 ! marker:1==1 ! scr:15 ! marker:1==1 ! scr:15 ! marker:1==1 */ scr = ((guint64) scr1 & 0x0e000000) << 5; scr |= ((guint64) scr1 & 0x00fffe00) << 6; scr |= ((guint64) scr1 & 0x000000ff) << 7; scr |= ((guint64) scr2 & 0xfe000000) >> 25; /* We keep the offset of this scr */ demux->last_scr_offset = demux->adapter_offset + 8; /* marker:1==1 ! mux_rate:22 ! marker:1==1 */ new_rate = (scr2 & 0x007ffffe) >> 1; data += 8; } new_rate *= MPEG_MUX_RATE_MULT; /* scr adjusted is the new scr found + the colected adjustment */ scr_adjusted = scr + demux->scr_adjust; /* keep the first src in order to calculate delta time */ if (demux->first_scr == G_MAXUINT64) { demux->first_scr = scr; demux->first_scr_offset = demux->last_scr_offset; if (demux->sink_segment.format == GST_FORMAT_TIME) { demux->base_time = demux->sink_segment.time; } else { demux->base_time = MPEGTIME_TO_GSTTIME (demux->first_scr); } /* at begin consider the new_rate as the scr rate, bytes/clock ticks */ demux->scr_rate_n = new_rate; demux->scr_rate_d = CLOCK_FREQ; } else if (demux->first_scr_offset != demux->last_scr_offset) { /* estimate byte rate related to the SCR */ demux->scr_rate_n = demux->last_scr_offset - demux->first_scr_offset; demux->scr_rate_d = scr - demux->first_scr; } GST_DEBUG_OBJECT (demux, "SCR: %" G_GINT64_FORMAT " (%" G_GINT64_FORMAT "), mux_rate %" G_GINT64_FORMAT ", GStreamer Time:%" GST_TIME_FORMAT, scr, scr_adjusted, new_rate, GST_TIME_ARGS (MPEGTIME_TO_GSTTIME ((guint64) scr - demux->first_scr))); GST_DEBUG_OBJECT (demux, "%s mode scr: %" G_GUINT64_FORMAT " at %" G_GUINT64_FORMAT ", first scr: %" G_GUINT64_FORMAT " at %" G_GUINT64_FORMAT ", scr rate: %" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT "(%f)", ((demux->sink_segment.rate >= 0.0) ? "forward" : "backward"), scr, demux->last_scr_offset, demux->first_scr, demux->first_scr_offset, demux->scr_rate_n, demux->scr_rate_d, (float) demux->scr_rate_n / demux->scr_rate_d); /* adjustment of the SCR */ if (demux->current_scr != G_MAXUINT64) { gint64 diff; guint64 old_scr, old_mux_rate, bss, adjust; /* keep SCR of the previous packet */ old_scr = demux->current_scr; old_mux_rate = demux->mux_rate; /* Bytes since SCR is the amount we placed in the adapter since then * (demux->bytes_since_scr) minus the amount remaining in the adapter, * clamped to >= 0 */ bss = MAX (0, (gint) (demux->bytes_since_scr - gst_adapter_available (demux->adapter))); /* estimate the new SCR using the previous one according the notes on point 2.5.2.2 of the ISO/IEC 13818-1 document */ adjust = (bss * CLOCK_FREQ) / old_mux_rate; if (demux->sink_segment.rate >= 0.0) demux->next_scr = old_scr + adjust; else demux->next_scr = old_scr - adjust; GST_DEBUG_OBJECT (demux, "bss: %" G_GUINT64_FORMAT ", next_scr: %" G_GUINT64_FORMAT ", old_scr: %" G_GUINT64_FORMAT ", scr: %" G_GUINT64_FORMAT, bss, demux->next_scr, old_scr, scr_adjusted); /* calculate the absolute deference between the last scr and the new one */ if (old_scr > scr_adjusted) diff = old_scr - scr_adjusted; else diff = scr_adjusted - old_scr; /* if the difference is more than 1 second we need to reconfigure adjustment */ if (diff > CLOCK_FREQ) { #if 0 demux->scr_adjust = demux->next_scr - scr; GST_DEBUG_OBJECT (demux, "discont found, diff: %" G_GINT64_FORMAT ", adjust %" G_GINT64_FORMAT, diff, demux->scr_adjust); scr_adjusted = demux->next_scr; #else g_print ("Unexpected SCR diff of %" G_GINT64_FORMAT "\n", diff); #endif } else { demux->next_scr = scr_adjusted; } } /* update the current_scr and rate members */ demux->mux_rate = new_rate; demux->current_scr = scr_adjusted; new_time = MPEGTIME_TO_GSTTIME (scr_adjusted); if (new_time != GST_CLOCK_TIME_NONE) { // g_print ("SCR now %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (new_time)); gst_flups_demux_send_segment_updates (demux, new_time); demux->src_segment.last_stop = new_time; } /* Reset the bytes_since_scr value to count the data remaining in the * adapter */ demux->bytes_since_scr = gst_adapter_available (demux->adapter); gst_adapter_flush (demux->adapter, length); ADAPTER_OFFSET_FLUSH (length); return GST_FLOW_OK; lost_sync: { GST_DEBUG_OBJECT (demux, "lost sync"); return GST_FLOW_LOST_SYNC; } need_more_data: { GST_DEBUG_OBJECT (demux, "need more data"); return GST_FLOW_NEED_MORE_DATA; } } static GstFlowReturn gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) { guint16 length; const guint8 *data; gboolean csps; /* start code + length */ if (!(data = gst_adapter_peek (demux->adapter, 6))) goto need_more_data; /* skip start code */ data += 4; length = GST_READ_UINT16_BE (data); GST_DEBUG_OBJECT (demux, "length %d", length); length += 6; if (!(data = gst_adapter_peek (demux->adapter, length))) goto need_more_data; /* skip start code and length */ data += 6; /* marker:1==1 ! rate_bound:22 | marker:1==1 */ if ((*data & 0x80) != 0x80) goto marker_expected; { guint32 rate_bound; if ((data[2] & 0x01) != 0x01) goto marker_expected; rate_bound = ((guint32) data[0] & 0x7f) << 15; rate_bound |= ((guint32) data[1]) << 7; rate_bound |= ((guint32) data[2] & 0xfe) >> 1; rate_bound *= MPEG_MUX_RATE_MULT; GST_DEBUG_OBJECT (demux, "rate bound %u", rate_bound); data += 3; } /* audio_bound:6==1 ! fixed:1 | constrained:1 */ { guint8 audio_bound; gboolean fixed; /* max number of simultaneous audio streams active */ audio_bound = (data[0] & 0xfc) >> 2; /* fixed or variable bitrate */ fixed = (data[0] & 0x02) == 0x02; /* meeting constraints */ csps = (data[0] & 0x01) == 0x01; GST_DEBUG_OBJECT (demux, "audio_bound %d, fixed %d, constrained %d", audio_bound, fixed, csps); data += 1; } /* audio_lock:1 | video_lock:1 | marker:1==1 | video_bound:5 */ { gboolean audio_lock; gboolean video_lock; guint8 video_bound; audio_lock = (data[0] & 0x80) == 0x80; video_lock = (data[0] & 0x40) == 0x40; if ((data[0] & 0x20) != 0x20) goto marker_expected; /* max number of simultaneous video streams active */ video_bound = (data[0] & 0x1f); GST_DEBUG_OBJECT (demux, "audio_lock %d, video_lock %d, video_bound %d", audio_lock, video_lock, video_bound); data += 1; } /* packet_rate_restriction:1 | reserved:7==0x7F */ { gboolean packet_rate_restriction; if ((data[0] & 0x7f) != 0x7f) goto marker_expected; /* only valid if csps is set */ if (csps) { packet_rate_restriction = (data[0] & 0x80) == 0x80; GST_DEBUG_OBJECT (demux, "packet_rate_restriction %d", packet_rate_restriction); } } data += 1; { gint stream_count = (length - 12) / 3; gint i; GST_DEBUG_OBJECT (demux, "number of streams: %d ", stream_count); for (i = 0; i < stream_count; i++) { guint8 stream_id; gboolean STD_buffer_bound_scale; guint16 STD_buffer_size_bound; guint32 buf_byte_size_bound; stream_id = *data++; if (!(stream_id & 0x80)) goto sys_len_error; /* check marker bits */ if ((*data & 0xC0) != 0xC0) goto no_placeholder_bits; STD_buffer_bound_scale = *data & 0x20; STD_buffer_size_bound = ((guint16) (*data++ & 0x1F)) << 8; STD_buffer_size_bound |= *data++; if (STD_buffer_bound_scale == 0) { buf_byte_size_bound = STD_buffer_size_bound * 128; } else { buf_byte_size_bound = STD_buffer_size_bound * 1024; } GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", STD_buffer_bound_scale); GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", STD_buffer_size_bound, buf_byte_size_bound); } } gst_adapter_flush (demux->adapter, length); ADAPTER_OFFSET_FLUSH (length); return GST_FLOW_OK; /* ERRORS */ marker_expected: { GST_DEBUG_OBJECT (demux, "expecting marker"); return GST_FLOW_LOST_SYNC; } no_placeholder_bits: { GST_DEBUG_OBJECT (demux, "expecting placeholder bit values" " '11' after stream id"); return GST_FLOW_LOST_SYNC; } sys_len_error: { GST_DEBUG_OBJECT (demux, "error in system header length"); return GST_FLOW_LOST_SYNC; } need_more_data: { GST_DEBUG_OBJECT (demux, "need more data"); return GST_FLOW_NEED_MORE_DATA; } } static GstFlowReturn gst_flups_demux_parse_psm (GstFluPSDemux * demux) { guint16 length = 0, info_length = 0, es_map_length = 0; guint8 psm_version = 0; const guint8 *data, *es_map_base; gboolean applicable; /* start code + length */ if (!(data = gst_adapter_peek (demux->adapter, 6))) goto need_more_data; /* skip start code */ data += 4; length = GST_READ_UINT16_BE (data); GST_DEBUG_OBJECT (demux, "length %u", length); if (G_UNLIKELY (length > 0x3FA)) goto psm_len_error; length += 6; if (!(data = gst_adapter_peek (demux->adapter, length))) goto need_more_data; /* skip start code and length */ data += 6; /* Read PSM applicable bit together with version */ psm_version = GST_READ_UINT8 (data); applicable = (psm_version & 0x80) >> 7; psm_version &= 0x1F; GST_DEBUG_OBJECT (demux, "PSM version %u (applicable now %u)", psm_version, applicable); /* Jump over version and marker bit */ data += 2; /* Read PS info length */ info_length = GST_READ_UINT16_BE (data); /* Cap it to PSM length - needed bytes for ES map length and CRC */ info_length = MIN (length - 16, info_length); GST_DEBUG_OBJECT (demux, "PS info length %u bytes", info_length); /* Jump over that section */ data += (2 + info_length); /* Read ES map length */ es_map_length = GST_READ_UINT16_BE (data); /* Cap it to PSM remaining length - CRC */ es_map_length = MIN (length - (16 + info_length), es_map_length); GST_DEBUG_OBJECT (demux, "ES map length %u bytes", es_map_length); /* Jump over the size */ data += 2; /* Now read the ES map */ es_map_base = data; while (es_map_base + 4 <= data + es_map_length) { guint8 stream_type = 0, stream_id = 0; guint16 stream_info_length = 0; stream_type = GST_READ_UINT8 (es_map_base); es_map_base++; stream_id = GST_READ_UINT8 (es_map_base); es_map_base++; stream_info_length = GST_READ_UINT16_BE (es_map_base); es_map_base += 2; /* Cap stream_info_length */ stream_info_length = MIN (data + es_map_length - es_map_base, stream_info_length); GST_DEBUG_OBJECT (demux, "Stream type %02X with id %02X and %u bytes info", stream_type, stream_id, stream_info_length); demux->psm[stream_id] = stream_type; es_map_base += stream_info_length; } gst_adapter_flush (demux->adapter, length); ADAPTER_OFFSET_FLUSH (length); return GST_FLOW_OK; psm_len_error: { GST_DEBUG_OBJECT (demux, "error in PSM length"); return GST_FLOW_LOST_SYNC; } need_more_data: { GST_DEBUG_OBJECT (demux, "need more data"); return GST_FLOW_NEED_MORE_DATA; } } static void gst_flups_demux_resync_cb (GstPESFilter * filter, GstFluPSDemux * demux) { } static GstFlowReturn gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first, GstBuffer * buffer, GstFluPSDemux * demux) { GstBuffer *out_buf; GstFlowReturn ret = GST_FLOW_OK; gint stream_type; guint32 start_code; guint8 id; guint8 *data; guint datalen; guint offset = 0; data = GST_BUFFER_DATA (buffer); datalen = GST_BUFFER_SIZE (buffer); start_code = filter->start_code; id = filter->id; if (first) { /* find the stream type */ stream_type = demux->psm[id]; if (stream_type == -1) { /* no stream type, if PS1, get the new id */ if (start_code == ID_PRIVATE_STREAM_1 && datalen >= 2) { guint8 nframes; /* VDR writes A52 streams without any header bytes * (see ftp://ftp.mplayerhq.hu/MPlayer/samples/MPEG-VOB/vdr-AC3) */ if (datalen >= 4) { guint hdr = GST_READ_UINT32_BE (data); if (G_UNLIKELY ((hdr & 0xffff0000) == AC3_SYNC_WORD)) { id = 0x80; stream_type = demux->psm[id] = ST_GST_AUDIO_RAWA52; GST_DEBUG_OBJECT (demux, "Found VDR raw A52 stream"); } } if (G_LIKELY (stream_type == -1)) { /* new id is in the first byte */ id = data[offset++]; datalen--; /* and remap */ stream_type = demux->psm[id]; /* Now, if it's a subpicture stream - no more, otherwise * take the first byte too, since it's the frame count in audio * streams and our backwards compat convention is to strip it off */ if (stream_type != ST_PS_DVD_SUBPICTURE) { /* Number of audio frames in this packet */ nframes = data[offset++]; datalen--; GST_DEBUG_OBJECT (demux, "private type 0x%02x, %d frames", id, nframes); } else { GST_DEBUG_OBJECT (demux, "private type 0x%02x, stream type %d", id, stream_type); } } } if (stream_type == -1) goto unknown_stream_type; } if (filter->pts != -1) { demux->next_pts = filter->pts + demux->scr_adjust; GST_DEBUG_OBJECT (demux, "PTS = %" G_GUINT64_FORMAT "(%" G_GUINT64_FORMAT ")", filter->pts, demux->next_pts); } else demux->next_pts = G_MAXUINT64; if (filter->dts != -1) { demux->next_dts = filter->dts + demux->scr_adjust; } else { demux->next_dts = demux->next_pts; } GST_DEBUG_OBJECT (demux, "DTS = orig %" G_GUINT64_FORMAT " (%" G_GUINT64_FORMAT ")", filter->dts, demux->next_dts); demux->current_stream = gst_flups_demux_get_stream (demux, id, stream_type); } if (demux->current_stream == NULL) { GST_DEBUG_OBJECT (demux, "Dropping buffer for unknown stream id 0x%02x", id); goto done; } /* After 2 seconds of bitstream emit no more pads */ if (demux->need_no_more_pads && (demux->current_scr - demux->first_scr - demux->scr_adjust) > 2 * CLOCK_FREQ) { GST_DEBUG_OBJECT (demux, "no more pads, notifying"); gst_element_no_more_pads (GST_ELEMENT_CAST (demux)); demux->need_no_more_pads = FALSE; } /* If the stream is not-linked, don't bother creating a sub-buffer * to send to it, unless we're processing a discont (which resets * the not-linked status and tries again */ if (demux->current_stream->discont) { GST_DEBUG_OBJECT (demux, "stream is discont"); demux->current_stream->notlinked = FALSE; } if (demux->current_stream->notlinked == FALSE) { out_buf = gst_buffer_create_sub (buffer, offset, datalen); ret = gst_flups_demux_send_data (demux, demux->current_stream, out_buf); if (ret == GST_FLOW_NOT_LINKED) { demux->current_stream->notlinked = TRUE; ret = GST_FLOW_OK; } } done: gst_buffer_unref (buffer); return ret; /* ERRORS */ unknown_stream_type: { GST_DEBUG_OBJECT (demux, "unknown stream type %02x", id); ret = GST_FLOW_OK; goto done; } } static gboolean gst_flups_demux_resync (GstFluPSDemux * demux, gboolean save) { const guint8 *data; gint avail; guint32 code; gint offset; gboolean found; avail = gst_adapter_available (demux->adapter); if (avail < 4) goto need_data; /* Common case, read 4 bytes an check it */ data = gst_adapter_peek (demux->adapter, 4); /* read currect code */ code = GST_READ_UINT32_BE (data); /* The common case is that the sync code is at 0 bytes offset */ if (G_LIKELY ((code & 0xffffff00) == 0x100L)) { GST_LOG_OBJECT (demux, "Found resync code %08x after 0 bytes", code); demux->last_sync_code = code; return TRUE; } /* Otherwise, we are starting at byte 4 and we need to search the sync code in all available data in the adapter */ offset = 4; if (offset >= avail) goto need_data; /* Not enough data to find sync */ data = gst_adapter_peek (demux->adapter, avail); do { code = (code << 8) | data[offset++]; found = (code & 0xffffff00) == 0x100L; } while (offset < avail && !found); if (!save || demux->sink_segment.rate >= 0.0) { GST_LOG_OBJECT (demux, "flushing %d bytes", offset - 4); /* forward playback, we can discard and flush the skipped bytes */ gst_adapter_flush (demux->adapter, offset - 4); ADAPTER_OFFSET_FLUSH (offset - 4); } else { if (found) { GST_LOG_OBJECT (demux, "reverse saving %d bytes", offset - 4); /* reverse playback, we keep the flushed bytes and we will append them to * the next buffer in the chain function, which is the previous buffer in * the stream. */ gst_adapter_push (demux->rev_adapter, gst_adapter_take_buffer (demux->adapter, offset - 4)); } else { GST_LOG_OBJECT (demux, "reverse saving %d bytes", avail); /* nothing found, keep all bytes */ gst_adapter_push (demux->rev_adapter, gst_adapter_take_buffer (demux->adapter, avail)); } } if (found) { GST_LOG_OBJECT (demux, "Found resync code %08x after %d bytes", code, offset - 4); demux->last_sync_code = code; } else { GST_LOG_OBJECT (demux, "No resync after skipping %d", offset); } return found; need_data: { GST_LOG_OBJECT (demux, "we need more data for resync %d", avail); return FALSE; } } static gboolean gst_flups_demux_is_pes_sync (guint32 sync) { return ((sync & 0xfc) == 0xbc) || ((sync & 0xe0) == 0xc0) || ((sync & 0xf0) == 0xe0); } static GstFlowReturn gst_flups_demux_chain (GstPad * pad, GstBuffer * buffer) { GstFluPSDemux *demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); GstFlowReturn ret = GST_FLOW_OK; guint32 avail; gboolean save, discont; discont = GST_BUFFER_IS_DISCONT (buffer); if (discont) { GST_LOG_OBJECT (demux, "Received buffer with discont flag and" " offset %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buffer)); gst_pes_filter_drain (&demux->filter); gst_flups_demux_mark_discont (demux); /* mark discont on all streams */ if (demux->sink_segment.rate >= 0.0) { demux->current_scr = G_MAXUINT64; demux->bytes_since_scr = 0; } } else { GST_LOG_OBJECT (demux, "Received buffer with offset %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buffer)); } /* We keep the offset to interpolate SCR */ demux->adapter_offset = GST_BUFFER_OFFSET (buffer); gst_adapter_push (demux->adapter, buffer); demux->bytes_since_scr += GST_BUFFER_SIZE (buffer); avail = gst_adapter_available (demux->rev_adapter); if (avail > 0) { GST_LOG_OBJECT (demux, "appending %u saved bytes", avail); /* if we have a previous reverse chunk, append this now */ /* FIXME this code assumes we receive discont buffers all thei * time */ gst_adapter_push (demux->adapter, gst_adapter_take_buffer (demux->rev_adapter, avail)); } avail = gst_adapter_available (demux->adapter); GST_LOG_OBJECT (demux, "avail now: %d, state %d", avail, demux->filter.state); switch (demux->filter.state) { case STATE_DATA_SKIP: case STATE_DATA_PUSH: ret = gst_pes_filter_process (&demux->filter); break; case STATE_HEADER_PARSE: break; default: break; } switch (ret) { case GST_FLOW_NEED_MORE_DATA: /* Go and get more data */ ret = GST_FLOW_OK; goto done; case GST_FLOW_LOST_SYNC: /* for FLOW_OK or lost-sync, carry onto resync */ ret = GST_FLOW_OK; break; case GST_FLOW_OK: break; default: /* Any other return value should be sent upstream immediately */ goto done; } /* align adapter data to sync boundary, we keep the data up to the next sync * point. */ save = TRUE; while (gst_flups_demux_resync (demux, save)) { gboolean ps_sync = TRUE; /* now switch on last synced byte */ switch (demux->last_sync_code) { case ID_PS_PACK_START_CODE: ret = gst_flups_demux_parse_pack_start (demux); break; case ID_PS_SYSTEM_HEADER_START_CODE: ret = gst_flups_demux_parse_sys_head (demux); break; case ID_PS_END_CODE: ret = GST_FLOW_OK; goto done; case ID_PS_PROGRAM_STREAM_MAP: ret = gst_flups_demux_parse_psm (demux); break; default: if (gst_flups_demux_is_pes_sync (demux->last_sync_code)) { ret = gst_pes_filter_process (&demux->filter); } else { GST_DEBUG_OBJECT (demux, "sync_code=%08x, non PES sync found" ", continuing", demux->last_sync_code); ps_sync = FALSE; ret = GST_FLOW_LOST_SYNC; } break; } /* if we found a ps sync, we stop saving the data, any non-ps sync gets * saved up to the next ps sync. */ if (ps_sync) save = FALSE; switch (ret) { case GST_FLOW_NEED_MORE_DATA: GST_DEBUG_OBJECT (demux, "need more data"); ret = GST_FLOW_OK; goto done; case GST_FLOW_LOST_SYNC: if (!save || demux->sink_segment.rate >= 0.0) { GST_DEBUG_OBJECT (demux, "flushing 3 bytes"); gst_adapter_flush (demux->adapter, 3); ADAPTER_OFFSET_FLUSH (3); } else { GST_DEBUG_OBJECT (demux, "saving 3 bytes"); gst_adapter_push (demux->rev_adapter, gst_adapter_take_buffer (demux->adapter, 3)); } ret = GST_FLOW_OK; break; default: break; } } done: gst_object_unref (demux); return ret; } static GstStateChangeReturn gst_flups_demux_change_state (GstElement * element, GstStateChange transition) { GstFluPSDemux *demux = GST_FLUPS_DEMUX (element); GstStateChangeReturn result; switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: demux->adapter = gst_adapter_new (); demux->rev_adapter = gst_adapter_new (); demux->adapter_offset = G_MAXUINT64; gst_pes_filter_init (&demux->filter, demux->adapter, &demux->adapter_offset); gst_pes_filter_set_callbacks (&demux->filter, (GstPESFilterData) gst_flups_demux_data_cb, (GstPESFilterResync) gst_flups_demux_resync_cb, demux); demux->filter.gather_pes = TRUE; demux->first_scr = G_MAXUINT64; demux->bytes_since_scr = 0; demux->current_scr = G_MAXUINT64; demux->base_time = G_MAXUINT64; demux->scr_rate_n = G_MAXUINT64; demux->scr_rate_d = G_MAXUINT64; break; case GST_STATE_CHANGE_READY_TO_PAUSED: demux->current_scr = G_MAXUINT64; demux->mux_rate = G_MAXUINT64; demux->next_pts = G_MAXUINT64; demux->next_dts = G_MAXUINT64; demux->first_scr = G_MAXUINT64; demux->bytes_since_scr = 0; demux->base_time = G_MAXUINT64; demux->scr_rate_n = G_MAXUINT64; demux->scr_rate_d = G_MAXUINT64; demux->need_no_more_pads = TRUE; gst_flups_demux_reset_psm (demux); gst_segment_init (&demux->sink_segment, GST_FORMAT_UNDEFINED); gst_segment_init (&demux->src_segment, GST_FORMAT_TIME); break; default: break; } result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: gst_flups_demux_reset (demux); break; case GST_STATE_CHANGE_READY_TO_NULL: gst_pes_filter_uninit (&demux->filter); g_object_unref (demux->adapter); demux->adapter = NULL; g_object_unref (demux->rev_adapter); demux->rev_adapter = NULL; break; default: break; } return result; } gboolean gst_flups_demux_plugin_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (gstflupesfilter_debug, "rsnpesfilter", 0, "MPEG program stream PES filter debug"); GST_DEBUG_CATEGORY_INIT (gstflupsdemux_debug, "rsndvddemux", 0, "MPEG program stream demuxer debug"); return TRUE; }
gpl-2.0
tectronics/tyres-wordpress
wp-content/plugins/directory/libraries/PayPal-PHP-SDK/lib/PayPal/Api/Currency.php
1453
<?php namespace PayPal\Api; use PayPal\Common\PPModel; use PayPal\Common\FormatConverter; use PayPal\Validation\NumericValidator; /** * Class Currency * * Base object for all financial value related fields (balance, payment due, etc.) * * @package PayPal\Api * * @property string currency * @property string value */ class Currency extends PPModel { /** * 3 letter currency code as defined by ISO 4217. * * @param string $currency * * @return $this */ public function setCurrency($currency) { $this->currency = $currency; return $this; } /** * 3 letter currency code as defined by ISO 4217. * * @return string */ public function getCurrency() { return $this->currency; } /** * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code. * * @param string|double $value * * @return $this */ public function setValue($value) { NumericValidator::validate($value, "Value"); $value = FormatConverter::formatToTwoDecimalPlaces($value); $this->value = $value; return $this; } /** * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code. * * @return string */ public function getValue() { return $this->value; } }
gpl-2.0
Belthazor2008/googulator
public_html/lib/pushbullet.js
3181
(function(){ var PushBullet = {}; PushBullet.init = function(clientId, redirectUri){ this.clientId = clientId; this.redirectUri = redirectUri; this.accessToken = localStorage.pushBulletAccessToken; }; //tests if we are authorized PushBullet.checkAuth = function(callback){ request("https://api.pushbullet.com/v2/users/me",true,function(results){ callback(results != null); }); }; //attempts to obtain a working accessToken, once Obtained it callsback with true PushBullet.doAuth = function(callback){ var popup = window.open("https://www.pushbullet.com/authorize?client_id=" + encodeURIComponent(PushBullet.clientId) + "&redirect_uri=" + encodeURIComponent(this.redirectUri) + "&response_type=token", "_blank","height=600,width=500,left=" + Math.round($(document).width() / 2 - 250) + ",top=" + Math.round($(document).height() / 2 - 300)); function onClosed(){ PushBullet.accessToken = localStorage.pushBulletAccessToken; PushBullet.checkAuth(callback); } var popupInterval = setInterval(function(){ if (popup == null || popup.closed){ clearInterval(popupInterval); onClosed(); } },50); }; PushBullet.Note = function(title, body){ this.type = "note"; this.title = title; this.body = body; }; PushBullet.Link = function(title,body,url){ this.type = "link"; this.title = title; this.body = body; this.url = url; }; PushBullet.CheckList = function(title,items){ this.type = "list"; this.title = title; this.items = items; } PushBullet.pushToChannel = function (channelName,pushBulletMessage){ var params = { channel_tag: channelName }; for (var param in pushBulletMessage){ params[param] = pushBulletMessage[param]; } post("https://api.pushbullet.com/v2/pushes",true,params,function(results){ console.log(results); }); } function request(url, useAuth,callback){ var options = {}; if (useAuth && PushBullet.accessToken != null){ options.headers = { 'Authorization': 'Bearer ' + PushBullet.accessToken }; } options.success = function(response){ callback(response); }; options.error = function(){ callback(null); } $.ajax(url,options); } function post(url,useAuth,params,callback){ var options = {}; if (useAuth && PushBullet.accessToken != null){ options.headers = { 'Authorization': 'Bearer ' + PushBullet.accessToken }; } options.type = "POST"; options.data = params; options.success = function(response){ callback(response); }; options.error = function(){ callback(null); } $.ajax(url,options); } window.PushBullet = PushBullet; })();
gpl-3.0
vineodd/PIMSim
GEM5Simulation/gem5/src/dev/net/etherbus.cc
3498
/* * Copyright (c) 2002-2005 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer; * redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution; * neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Authors: Nathan Binkert */ /* @file * Device module for modelling an ethernet hub */ #include "dev/net/etherbus.hh" #include <cmath> #include <deque> #include <string> #include <vector> #include "base/logging.hh" #include "base/trace.hh" #include "debug/Ethernet.hh" #include "debug/EthernetData.hh" #include "dev/net/etherdump.hh" #include "dev/net/etherint.hh" #include "dev/net/etherpkt.hh" #include "params/EtherBus.hh" #include "sim/core.hh" using namespace std; EtherBus::EtherBus(const Params *p) : EtherObject(p), ticksPerByte(p->speed), loopback(p->loopback), event([this]{ txDone(); }, "ethernet bus completion"), sender(0), dump(p->dump) { } void EtherBus::txDone() { devlist_t::iterator i = devlist.begin(); devlist_t::iterator end = devlist.end(); DPRINTF(Ethernet, "ethernet packet received: length=%d\n", packet->length); DDUMP(EthernetData, packet->data, packet->length); while (i != end) { if (loopback || *i != sender) (*i)->sendPacket(packet); ++i; } sender->sendDone(); if (dump) dump->dump(packet); sender = 0; packet = 0; } EtherInt* EtherBus::getEthPort(const std::string &if_name, int idx) { panic("Etherbus doesn't work\n"); } bool EtherBus::send(EtherInt *sndr, EthPacketPtr &pkt) { if (busy()) { DPRINTF(Ethernet, "ethernet packet not sent, bus busy\n", curTick()); return false; } DPRINTF(Ethernet, "ethernet packet sent: length=%d\n", pkt->length); DDUMP(EthernetData, pkt->data, pkt->length); packet = pkt; sender = sndr; int delay = (int)ceil(((double)pkt->simLength * ticksPerByte) + 1.0); DPRINTF(Ethernet, "scheduling packet: delay=%d, (rate=%f)\n", delay, ticksPerByte); schedule(event, curTick() + delay); return true; } EtherBus * EtherBusParams::create() { return new EtherBus(this); }
gpl-3.0
piersharding/mahara
htdocs/blocktype/newviews/lib.php
3184
<?php /** * * @package mahara * @subpackage blocktype-newviews * @author Catalyst IT Ltd * @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later * @copyright For copyright information on Mahara, please see the README file distributed with this software. * */ defined('INTERNAL') || die(); class PluginBlocktypeNewViews extends MaharaCoreBlocktype { public static function get_title() { return get_string('title1', 'blocktype.newviews'); } public static function get_description() { return get_string('description2', 'blocktype.newviews'); } public static function get_categories() { return array('general' => 21000); } public static function get_viewtypes() { return array('dashboard'); } public static function render_instance(BlockInstance $instance, $editing=false) { global $USER; require_once('view.php'); $configdata = $instance->get('configdata'); $nviews = isset($configdata['limit']) ? intval($configdata['limit']) : 5; $view = $instance->get_view(); $sort = array(array('column' => 'mtime', 'desc' => true)); $views = View::view_search( null, // $query null, // $ownerquery null, // $ownedby null, // $copyableby $nviews, // $limit 0, // $offset true, // $extra $sort, // $sort array('portfolio'), // $types null, // $collection null, // $accesstypes null, // $tag null, // $viewid $view->get('owner'), // $excludeowner true // $groupbycollection ); $smarty = smarty_core(); $smarty->assign('loggedin', $USER->is_logged_in()); $smarty->assign('views', $views->data); return $smarty->fetch('blocktype:newviews:newviews.tpl'); } public static function has_instance_config() { return true; } public static function instance_config_form(BlockInstance $instance) { $configdata = $instance->get('configdata'); return array('limit' => array( 'type' => 'text', 'title' => get_string('viewstoshow1', 'blocktype.newviews'), 'description' => get_string('viewstoshowdescription', 'blocktype.newviews'), 'defaultvalue' => (isset($configdata['limit'])) ? intval($configdata['limit']) : 5, 'size' => 3, 'minvalue' => 1, 'maxvalue' => 100, )); } public static function default_copy_type() { return 'shallow'; } public static function get_instance_title(BlockInstance $instance) { return get_string('title1', 'blocktype.newviews'); } public static function should_ajaxify() { return true; } /** * Shouldn't be linked to any artefacts via the view_artefacts table. * * @param BlockInstance $instance * @return multitype: */ public static function get_artefacts(BlockInstance $instance) { return array(); } }
gpl-3.0
nanakisan/vintagecraft
src/main/java/at/tyron/vintagecraft/Block/Utility/BlockCokeOvenDoor.java
7072
package at.tyron.vintagecraft.Block.Utility; import at.tyron.vintagecraft.VintageCraft; import at.tyron.vintagecraft.Block.BlockContainerVC; import at.tyron.vintagecraft.TileEntity.TECokeOvenDoor; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockCokeOvenDoor extends BlockContainerVC { public static PropertyBool OPENED = PropertyBool.create("opened"); public static PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); public BlockCokeOvenDoor() { super(Material.iron); setCreativeTab(VintageCraft.craftedBlocksTab); setDefaultState(blockState.getBaseState().withProperty(OPENED, false).withProperty(FACING, EnumFacing.NORTH)); } @Override public int getRenderType() { return 3; } @Override public String getSubType(ItemStack stack) { return null; } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TECokeOvenDoor(); } public IBlockState getStateFromMeta(int meta) { EnumFacing enumfacing = EnumFacing.getFront(meta >> 1); if (enumfacing.getAxis() == EnumFacing.Axis.Y) { enumfacing = EnumFacing.NORTH; } boolean opened = (meta & 1) > 0; return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(OPENED, opened); } public int getMetaFromState(IBlockState state) { boolean opened = (Boolean)state.getValue(OPENED); return (((EnumFacing)state.getValue(FACING)).getIndex() << 1) + (opened ? 1 : 0); } protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {OPENED, FACING}); } @Override public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) { EnumFacing facing = (EnumFacing) state.getValue(FACING); // if (!suitableGround(world, pos.down())) { // world.destroyBlock(pos, true); // } } @Override public int damageDropped(IBlockState state) { return 0; } @Override public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) { return true; //this.canPlaceBlockAt(world, pos) && suitableGround(world, pos.down()); } @Override public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side) { return false; } @Override public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) { return true; } public boolean isFullCube() { return false; } @Override public boolean isOpaqueCube() { return false; } public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { boolean opened = (Boolean)state.getValue(OPENED); worldIn.setBlockState(pos, state.withProperty(OPENED, !opened)); if (opened) { worldIn.playSound(pos.getX(), pos.getY(), pos.getZ(), "vintagecraft:ironstovedoor_close", 1f, 1f, false); } else { worldIn.playSound(pos.getX(), pos.getY(), pos.getZ(), "vintagecraft:ironstovedoor_open", 1f, 1f, false); } worldIn.getBlockState(pos).getBlock().setBlockBoundsBasedOnState(worldIn, pos); // TECokeOvenDoor te = (TECokeOvenDoor)worldIn.getTileEntity(pos); // if (te != null) { // System.out.println("valid: " + te.isValidCokeOven()); // } return super.onBlockActivated(worldIn, pos, state, playerIn, side, hitX, hitY, hitZ); } @Override public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) { EnumFacing face = (EnumFacing) state.getValue(FACING); boolean opened = (Boolean)state.getValue(OPENED); if (opened) { switch (face) { case NORTH: return AxisAlignedBB.fromBounds(pos.getX() + 1f, pos.getY(), pos.getZ() - 0.8125f, pos.getX() + 0.8125f, pos.getY() + 1f, pos.getZ() + 0.1875f); case SOUTH: return AxisAlignedBB.fromBounds(pos.getX(), pos.getY(), pos.getZ() + 0.8125f, pos.getX() + 0.1875f, pos.getY() + 1f, pos.getZ() + 1.8125f); case WEST: return AxisAlignedBB.fromBounds(pos.getX() - 0.8125f, pos.getY(), pos.getZ(), pos.getX() + 0.1875f, pos.getY() + 1f, pos.getZ() + 0.1875f); case EAST: return AxisAlignedBB.fromBounds(pos.getX() + 0.8125f, pos.getY(), pos.getZ() + 0.8125f, pos.getX() + 1.8125f, pos.getY() + 1f, pos.getZ() + 1f); default: return null; } } else { switch (face) { case NORTH: return AxisAlignedBB.fromBounds(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1f, pos.getY() + 1f, pos.getZ() + 0.1875f); case SOUTH: return AxisAlignedBB.fromBounds(pos.getX(), pos.getY(), pos.getZ() + 0.8125f, pos.getX() + 1f, pos.getY() + 1f, pos.getZ() + 1f); case WEST: return AxisAlignedBB.fromBounds(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 0.1875f, pos.getY() + 1f, pos.getZ() + 1f); case EAST: return AxisAlignedBB.fromBounds(pos.getX() + 0.8125f, pos.getY(), pos.getZ(), pos.getX() + 1f, pos.getY() + 1f, pos.getZ() + 1f); default: return null; } } } @Override public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) { AxisAlignedBB bounds = getCollisionBoundingBox(null, pos, worldIn.getBlockState(pos)); setBlockBounds((float)bounds.minX - pos.getX(), (float)bounds.minY - pos.getY(), (float)bounds.minZ - pos.getZ(), (float)bounds.maxX - pos.getX(), (float)bounds.maxY - pos.getY(), (float)bounds.maxZ - pos.getZ()); } @Override public AxisAlignedBB getSelectedBoundingBox(World worldIn, BlockPos pos) { return getCollisionBoundingBox(worldIn, pos, worldIn.getBlockState(pos)); } }
gpl-3.0
Severed-Infinity/technium
build/tmp/recompileMc/sources/net/minecraft/world/chunk/BlockStatePaletteLinear.java
2268
package net.minecraft.world.chunk; import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.network.PacketBuffer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockStatePaletteLinear implements IBlockStatePalette { private final IBlockState[] states; private final IBlockStatePaletteResizer resizeHandler; private final int bits; private int arraySize; public BlockStatePaletteLinear(int bitsIn, IBlockStatePaletteResizer resizeHandlerIn) { this.states = new IBlockState[1 << bitsIn]; this.bits = bitsIn; this.resizeHandler = resizeHandlerIn; } public int idFor(IBlockState state) { for (int i = 0; i < this.arraySize; ++i) { if (this.states[i] == state) { return i; } } int j = this.arraySize; if (j < this.states.length) { this.states[j] = state; ++this.arraySize; return j; } else { return this.resizeHandler.onResize(this.bits + 1, state); } } /** * Gets the block state by the palette id. */ @Nullable public IBlockState getBlockState(int indexKey) { return indexKey >= 0 && indexKey < this.arraySize ? this.states[indexKey] : null; } @SideOnly(Side.CLIENT) public void read(PacketBuffer buf) { this.arraySize = buf.readVarInt(); for (int i = 0; i < this.arraySize; ++i) { this.states[i] = Block.BLOCK_STATE_IDS.getByValue(buf.readVarInt()); } } public void write(PacketBuffer buf) { buf.writeVarInt(this.arraySize); for (int i = 0; i < this.arraySize; ++i) { buf.writeVarInt(Block.BLOCK_STATE_IDS.get(this.states[i])); } } public int getSerializedSize() { int i = PacketBuffer.getVarIntSize(this.arraySize); for (int j = 0; j < this.arraySize; ++j) { i += PacketBuffer.getVarIntSize(Block.BLOCK_STATE_IDS.get(this.states[j])); } return i; } }
gpl-3.0
ovilab/atomify
libs/lammps/src/KOKKOS/neigh_list_kokkos.cpp
1894
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, [email protected] Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "neigh_list_kokkos.h" #include "atom.h" #include "memory.h" using namespace LAMMPS_NS; enum{NSQ,BIN,MULTI}; /* ---------------------------------------------------------------------- */ template<class Device> NeighListKokkos<Device>::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp) { _stride = 1; maxneighs = 16; kokkos = 1; maxatoms = 0; execution_space = ExecutionSpaceFromDevice<Device>::space; }; /* ---------------------------------------------------------------------- */ template<class Device> void NeighListKokkos<Device>::grow(int nmax) { // skip if this list is already long enough to store nmax atoms if (nmax <= maxatoms) return; maxatoms = nmax; k_ilist = DAT::tdual_int_1d("neighlist:ilist",maxatoms); d_ilist = k_ilist.view<Device>(); d_numneigh = typename ArrayTypes<Device>::t_int_1d("neighlist:numneigh",maxatoms); d_neighbors = typename ArrayTypes<Device>::t_neighbors_2d("neighlist:neighbors", maxatoms,maxneighs); } /* ---------------------------------------------------------------------- */ namespace LAMMPS_NS { template class NeighListKokkos<LMPDeviceType>; #ifdef KOKKOS_HAVE_CUDA template class NeighListKokkos<LMPHostType>; #endif }
gpl-3.0
OpenGenus/cosmos
code/mathematical_algorithms/src/modular_inverse/modular_inverse.cpp
1064
#include <stdio.h> int modularInverse(int number, int mod); void extendedEuclid(int, int, int* d, int* x, int* y); int main() { int number, mod; scanf("%d %d", &number, &mod); int ans = modularInverse(number, mod); if (ans == -1) fprintf(stderr, "Couldn't calculate modular inverse!\n"); else printf("%d", ans); } int modularInverse(int number, int mod) { if (1 <= number && number <= mod - 1) { int x, y, d; extendedEuclid(number, mod, &d, &x, &y); if (d == 1) { while (x < 0) x += mod; return x; } else fprintf(stderr, "The number and mod need to be coprime\n"); } else fprintf(stderr, "Number needs to be between 1 and mod!\n"); return -1; } void extendedEuclid(int a, int b, int* d, int* x, int* y) { if (b == 0) { *x = 1; *y = 0; *d = a; return; } int x0, y0; extendedEuclid(b, a % b, d, &x0, &y0); *x = y0; *y = x0 - (a / b) * y0; }
gpl-3.0
arjunaari/tweater
javadoc/edu/umd/cs/dmonner/tweater/class-use/QueryItemTime.html
12740
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_22) on Fri Sep 30 14:21:09 EDT 2011 --> <TITLE> Uses of Class edu.umd.cs.dmonner.tweater.QueryItemTime </TITLE> <META NAME="date" CONTENT="2011-09-30"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class edu.umd.cs.dmonner.tweater.QueryItemTime"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?edu/umd/cs/dmonner/tweater//class-useQueryItemTime.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="QueryItemTime.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>edu.umd.cs.dmonner.tweater.QueryItemTime</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#edu.umd.cs.dmonner.tweater"><B>edu.umd.cs.dmonner.tweater</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#edu.umd.cs.dmonner.tweater.csv"><B>edu.umd.cs.dmonner.tweater.csv</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#edu.umd.cs.dmonner.tweater.mysql"><B>edu.umd.cs.dmonner.tweater.mysql</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="edu.umd.cs.dmonner.tweater"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A> in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/package-summary.html">edu.umd.cs.dmonner.tweater</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/package-summary.html">edu.umd.cs.dmonner.tweater</A> that return types with arguments of type <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract &nbsp;java.util.List&lt;<A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A>&gt;</CODE></FONT></TD> <TD><CODE><B>QueryBuilder.</B><B><A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryBuilder.html#update()">update</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all query information from the data source and returns it, without regard to the information that the query builder currently knows; this will be computed by <code>set</code> separately.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/package-summary.html">edu.umd.cs.dmonner.tweater</A> with type arguments of type <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>QueryBuilder.</B><B><A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryBuilder.html#set(java.util.List)">set</A></B>(java.util.List&lt;<A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A>&gt;&nbsp;all)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses the most recent query information from the data source to intelligently update the query builder's timeline.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="edu.umd.cs.dmonner.tweater.csv"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A> in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/csv/package-summary.html">edu.umd.cs.dmonner.tweater.csv</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/csv/package-summary.html">edu.umd.cs.dmonner.tweater.csv</A> that return types with arguments of type <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A>&gt;</CODE></FONT></TD> <TD><CODE><B>CSVQueryBuilder.</B><B><A HREF="../../../../../../edu/umd/cs/dmonner/tweater/csv/CSVQueryBuilder.html#update()">update</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="edu.umd.cs.dmonner.tweater.mysql"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A> in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/mysql/package-summary.html">edu.umd.cs.dmonner.tweater.mysql</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/mysql/package-summary.html">edu.umd.cs.dmonner.tweater.mysql</A> that return types with arguments of type <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater">QueryItemTime</A>&gt;</CODE></FONT></TD> <TD><CODE><B>MySQLQueryBuilder.</B><B><A HREF="../../../../../../edu/umd/cs/dmonner/tweater/mysql/MySQLQueryBuilder.html#update()">update</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../edu/umd/cs/dmonner/tweater/QueryItemTime.html" title="class in edu.umd.cs.dmonner.tweater"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?edu/umd/cs/dmonner/tweater//class-useQueryItemTime.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="QueryItemTime.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
gpl-3.0
malin1993ml/h-store
third_party/cpp/berkeleydb/docs/api_reference/C/set_blob_dir.html
6733
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>DB-&gt;set_blob_dir()</title> <link rel="stylesheet" href="apiReference.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> <link rel="start" href="index.html" title="Berkeley DB C API Reference" /> <link rel="up" href="blob.html" title="Chapter 13.  Binary Large Objects" /> <link rel="prev" href="get_blob_threshold.html" title="DB-&gt;get_blob_threshold()" /> <link rel="next" href="set_blob_threshold.html" title="DB-&gt;set_blob_threshold()" /> </head> <body> <div xmlns="" class="navheader"> <div class="libver"> <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">DB-&gt;set_blob_dir()</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="get_blob_threshold.html">Prev</a> </td> <th width="60%" align="center">Chapter 13.  Binary Large Objects </th> <td width="20%" align="right"> <a accesskey="n" href="set_blob_threshold.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="set_blob_dir"></a>DB-&gt;set_blob_dir()</h2> </div> </div> </div> <pre class="programlisting">#include &lt;db.h&gt; int DB-&gt;set_blob_dir(DB *db, const char *dir); </pre> <p> The <code class="methodname">DB-&gt;set_blob_dir()</code> method sets the directory where BLOB data is stored. Use this method if the database is not opened within an encompassing environment. If an environment is in use, use <a class="xref" href="envset_blob_dir.html" title="DB_ENV-&gt;set_blob_dir()">DB_ENV-&gt;set_blob_dir()</a> instead. </p> <p> By default, if this method is not called then BLOB data is placed in a directory local to the current working directory. </p> <p> Use <a class="xref" href="get_blob_dir.html" title="DB-&gt;get_blob_dir()">DB-&gt;get_blob_dir()</a> to identify the current storage location used for BLOB data. </p> <p> This method configures operations performed using the specified <a class="link" href="db.html" title="Chapter 2.  The DB Handle">DB</a> handle, not all operations performed on the underlying database. </p> <p> This method may not be called after <a class="xref" href="dbopen.html" title="DB-&gt;open()">DB-&gt;open()</a> is called. </p> <p> Unless otherwise specified, the <code class="methodname">DB-&gt;set_blob_dir()</code> <span> <span> method returns a non-zero error value on failure and 0 on success. </span> </span> </p> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp4993456"></a>Parameters</h3> </div> </div> </div> <div class="sect3" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h4 class="title"><a id="idp4997088"></a>dir</h4> </div> </div> </div> <p> Provides the name of the directory where BLOB data is to be stored. If an absolute path is not provided, then the directory identified here is relative to the current working directory. </p> </div> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp5010384"></a>Errors</h3> </div> </div> </div> <p> The <code class="methodname">DB-&gt;set_blob_dir()</code> <span> <span> method may fail and return one of the following non-zero errors: </span> </span> </p> <div class="sect3" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h4 class="title"><a id="idp5008024"></a>EINVAL</h4> </div> </div> </div> <p> If the database was opened within a named environment; or if the method was called after <a class="xref" href="dbopen.html" title="DB-&gt;open()">DB-&gt;open()</a> was called; or if an invalid parameter was specified. </p> </div> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp5016768"></a>Class</h3> </div> </div> </div> <p> <a class="link" href="db.html" title="Chapter 2.  The DB Handle">DB</a> </p> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp5018312"></a>See Also</h3> </div> </div> </div> <p> <a class="xref" href="blob.html#bloblist" title="BLOBs and Related Methods">BLOBs and Related Methods</a> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="get_blob_threshold.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="blob.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="set_blob_threshold.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">DB-&gt;get_blob_threshold() </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> DB-&gt;set_blob_threshold()</td> </tr> </table> </div> </body> </html>
gpl-3.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtdeclarative/src/qml/qml/qqmldelayedcallqueue.cpp
7883
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or (at your option) the GNU General ** Public license version 3 or any later version approved by the KDE Free ** Qt Foundation. The licenses are as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-2.0.html and ** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qqmldelayedcallqueue_p.h" #include <private/qv8engine_p.h> #include <private/qqmlengine_p.h> #include <private/qqmljavascriptexpression_p.h> #include <private/qv4value_p.h> #include <private/qv4qobjectwrapper_p.h> #include <QQmlError> QT_BEGIN_NAMESPACE // // struct QQmlDelayedCallQueue::DelayedFunctionCall // void QQmlDelayedCallQueue::DelayedFunctionCall::execute(QV4::ExecutionEngine *engine) const { if (!m_guarded || (!m_objectGuard.isNull() && !QQmlData::wasDeleted(m_objectGuard) && QQmlData::get(m_objectGuard) && !QQmlData::get(m_objectGuard)->isQueuedForDeletion)) { QV4::Scope scope(engine); QV4::ArrayObject *array = m_args.as<QV4::ArrayObject>(); const int argCount = array ? array->getLength() : 0; QV4::ScopedCallData callData(scope, argCount); callData->thisObject = QV4::Encode::undefined(); for (int i = 0; i < argCount; i++) { callData->args[i] = array->getIndexed(i); } const QV4::FunctionObject *callback = m_function.as<QV4::FunctionObject>(); Q_ASSERT(callback); callback->call(scope, callData); if (scope.engine->hasException) { QQmlError error = scope.engine->catchExceptionAsQmlError(); error.setDescription(error.description() + QLatin1String(" (exception occurred during delayed function evaluation)")); QQmlEnginePrivate::warning(QQmlEnginePrivate::get(scope.engine->qmlEngine()), error); } } } // // class QQmlDelayedCallQueue // QQmlDelayedCallQueue::QQmlDelayedCallQueue() : QObject(0), m_engine(0), m_callbackOutstanding(false) { } QQmlDelayedCallQueue::~QQmlDelayedCallQueue() { } void QQmlDelayedCallQueue::init(QV4::ExecutionEngine* engine) { m_engine = engine; const QMetaObject &metaObject = QQmlDelayedCallQueue::staticMetaObject; int methodIndex = metaObject.indexOfSlot("ticked()"); m_tickedMethod = metaObject.method(methodIndex); } void QQmlDelayedCallQueue::addUniquelyAndExecuteLater(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) { if (callData->argc == 0) THROW_GENERIC_ERROR("Qt.callLater: no arguments given"); const QV4::FunctionObject *func = callData->args[0].as<QV4::FunctionObject>(); if (!func) THROW_GENERIC_ERROR("Qt.callLater: first argument not a function or signal"); QPair<QObject *, int> functionData = QV4::QObjectMethod::extractQtMethod(func); QVector<DelayedFunctionCall>::Iterator iter; if (functionData.second != -1) { // This is a QObject function wrapper iter = m_delayedFunctionCalls.begin(); while (iter != m_delayedFunctionCalls.end()) { DelayedFunctionCall& dfc = *iter; QPair<QObject *, int> storedFunctionData = QV4::QObjectMethod::extractQtMethod(dfc.m_function.as<QV4::FunctionObject>()); if (storedFunctionData == functionData) { break; // Already stored! } ++iter; } } else { // This is a JavaScript function (dynamic slot on VMEMO) iter = m_delayedFunctionCalls.begin(); while (iter != m_delayedFunctionCalls.end()) { DelayedFunctionCall& dfc = *iter; if (callData->argument(0) == dfc.m_function.value()) { break; // Already stored! } ++iter; } } const bool functionAlreadyStored = (iter != m_delayedFunctionCalls.end()); if (functionAlreadyStored) { DelayedFunctionCall dfc = *iter; m_delayedFunctionCalls.erase(iter); m_delayedFunctionCalls.append(dfc); } else { m_delayedFunctionCalls.append(QV4::PersistentValue(m_engine, callData->argument(0))); } DelayedFunctionCall& dfc = m_delayedFunctionCalls.last(); if (dfc.m_objectGuard.isNull()) { if (functionData.second != -1) { // if it's a qobject function wrapper, guard against qobject deletion dfc.m_objectGuard = QQmlGuard<QObject>(functionData.first); dfc.m_guarded = true; } else if (func->scope()->type == QV4::Heap::ExecutionContext::Type_QmlContext) { QV4::QmlContext::Data *g = static_cast<QV4::QmlContext::Data *>(func->scope()); Q_ASSERT(g->qml->scopeObject); dfc.m_objectGuard = QQmlGuard<QObject>(g->qml->scopeObject); dfc.m_guarded = true; } } storeAnyArguments(dfc, callData, 1, m_engine); if (!m_callbackOutstanding) { m_tickedMethod.invoke(this, Qt::QueuedConnection); m_callbackOutstanding = true; } scope.result = QV4::Encode::undefined(); } void QQmlDelayedCallQueue::storeAnyArguments(DelayedFunctionCall &dfc, const QV4::CallData *callData, int offset, QV4::ExecutionEngine *engine) { const int length = callData->argc - offset; if (length == 0) { dfc.m_args.clear(); return; } QV4::Scope scope(engine); QV4::ScopedArrayObject array(scope, engine->newArrayObject(length)); int i = 0; for (int j = offset; j < callData->argc; ++i, ++j) { array->putIndexed(i, callData->args[j]); } dfc.m_args.set(engine, array); } void QQmlDelayedCallQueue::executeAllExpired_Later() { // Make a local copy of the list and clear m_delayedFunctionCalls // This ensures correct behavior in the case of recursive calls to Qt.callLater() QVector<DelayedFunctionCall> delayedCalls = m_delayedFunctionCalls; m_delayedFunctionCalls.clear(); QVector<DelayedFunctionCall>::Iterator iter = delayedCalls.begin(); while (iter != delayedCalls.end()) { DelayedFunctionCall& dfc = *iter; dfc.execute(m_engine); ++iter; } } void QQmlDelayedCallQueue::ticked() { m_callbackOutstanding = false; executeAllExpired_Later(); } QT_END_NAMESPACE #include "moc_qqmldelayedcallqueue_p.cpp"
gpl-3.0
gauravsitlani/programming
prime_factors/prime_factors.py
315
import math def PrimeFactors(num): primeFactors = [] for i in range(2, int(math.sqrt(num)) + 1): while num % i == 0: primeFactors.append(i) num //= i if num > 2: primeFactors.append(num) return primeFactors def main(): factors = PrimeFactors(36) print(factors) if __name__ == '__main__': main()
gpl-3.0
patrick246/tdesktop
Telegram/SourceFiles/boxes/aboutbox.h
1404
/* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once #include "abstractbox.h" #include "ui/flatlabel.h" class AboutBox : public AbstractBox { Q_OBJECT public: AboutBox(); void resizeEvent(QResizeEvent *e); void keyPressEvent(QKeyEvent *e); void paintEvent(QPaintEvent *e); void dragEnterEvent(QDragEnterEvent *e); void dropEvent(QDropEvent *e); public slots: void onVersion(); protected: void hideAll(); void showAll(); private: LinkButton _version; FlatLabel _text1, _text2, _text3; BoxButton _done; }; QString telegramFaqLink();
gpl-3.0
dymkowsk/mantid
MantidPlot/test/MantidPlotMdiSubWindowTest.py
922
""" Test of basic 1D plotting methods in MantidPlot """ import mantidplottests from mantidplottests import * from mantidplot import * from PyQt4 import QtGui, QtCore class MantidPlotMdiSubWindowTest(unittest.TestCase): def test_table(self): self.doTest( newTable() ) def test_graph(self): self.doTest( newGraph() ) def doTest(self, w): if w.isFloating(): w.dock() self.assertFalse( w.isFloating() ) self.assertTrue( w.isDocked() ) size = w.size() w.undock() self.assertTrue( w.isFloating() ) self.assertFalse( w.isDocked() ) w.dock() self.assertFalse( w.isFloating() ) self.assertTrue( w.isDocked() ) # TODO: sizes are not equal. Should we fix it? # self.assertEqual( size, w.size() ) w.close() # Run the unit tests mantidplottests.runTests(MantidPlotMdiSubWindowTest)
gpl-3.0
areeves/openfisma
library/Zend/Pdf/Filter/Compression.php
15570
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_Pdf * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Pdf_Filter_Interface */ require_once 'Zend/Pdf/Filter/Interface.php'; /** * ASCII85 stream filter * * @package Zend_Pdf * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Pdf_Filter_Compression implements Zend_Pdf_Filter_Interface { /** * Paeth prediction function * * @param integer $a * @param integer $b * @param integer $c * @return integer */ private static function _paeth($a, $b, $c) { // $a - left, $b - above, $c - upper left $p = $a + $b - $c; // initial estimate $pa = abs($p - $a); // distances to a, b, c $pb = abs($p - $b); $pc = abs($p - $c); // return nearest of a,b,c, // breaking ties in order a,b,c. if ($pa <= $pb && $pa <= $pc) { return $a; } else if ($pb <= $pc) { return $b; } else { return $c; } } /** * Get Predictor decode param value * * @param array $params * @return integer * @throws Zend_Pdf_Exception */ private static function _getPredictorValue(&$params) { if (isset($params['Predictor'])) { $predictor = $params['Predictor']; if ($predictor != 1 && $predictor != 2 && $predictor != 10 && $predictor != 11 && $predictor != 12 && $predictor != 13 && $predictor != 14 && $predictor != 15) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Invalid value of \'Predictor\' decode param - ' . $predictor . '.' ); } return $predictor; } else { return 1; } } /** * Get Colors decode param value * * @param array $params * @return integer * @throws Zend_Pdf_Exception */ private static function _getColorsValue(&$params) { if (isset($params['Colors'])) { $colors = $params['Colors']; if ($colors != 1 && $colors != 2 && $colors != 3 && $colors != 4) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Invalid value of \'Color\' decode param - ' . $colors . '.' ); } return $colors; } else { return 1; } } /** * Get BitsPerComponent decode param value * * @param array $params * @return integer * @throws Zend_Pdf_Exception */ private static function _getBitsPerComponentValue(&$params) { if (isset($params['BitsPerComponent'])) { $bitsPerComponent = $params['BitsPerComponent']; if ($bitsPerComponent != 1 && $bitsPerComponent != 2 && $bitsPerComponent != 4 && $bitsPerComponent != 8 && $bitsPerComponent != 16 ) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Invalid value of \'BitsPerComponent\' decode param - ' . $bitsPerComponent . '.' ); } return $bitsPerComponent; } else { return 8; } } /** * Get Columns decode param value * * @param array $params * @return integer */ private static function _getColumnsValue(&$params) { if (isset($params['Columns'])) { return $params['Columns']; } else { return 1; } } /** * Convert stream data according to the filter params set before encoding. * * @param string $data * @param array $params * @return string * @throws Zend_Pdf_Exception */ protected static function _applyEncodeParams($data, $params) { $predictor = self::_getPredictorValue($params); $colors = self::_getColorsValue($params); $bitsPerComponent = self::_getBitsPerComponentValue($params); $columns = self::_getColumnsValue($params); /** None of prediction */ if ($predictor == 1) { return $data; } /** TIFF Predictor 2 */ if ($predictor == 2) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Not implemented yet' ); } /** Optimal PNG prediction */ if ($predictor == 15) { /** Use Paeth prediction as optimal */ $predictor = 14; } /** PNG prediction */ if ($predictor == 10 || /** None of prediction */ $predictor == 11 || /** Sub prediction */ $predictor == 12 || /** Up prediction */ $predictor == 13 || /** Average prediction */ $predictor == 14 /** Paeth prediction */ ) { $predictor -= 10; if($bitsPerComponent == 16) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception("PNG Prediction with bit depth greater than 8 not yet supported."); } $bitsPerSample = $bitsPerComponent*$colors; $bytesPerSample = (int)(($bitsPerSample + 7)/8); // (int)ceil(...) emulation $bytesPerRow = (int)(($bitsPerSample*$columns + 7)/8); // (int)ceil(...) emulation $rows = strlen($data)/$bytesPerRow; $output = ''; $offset = 0; if (!is_integer($rows)) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Wrong data length.'); } switch ($predictor) { case 0: // None of prediction for ($count = 0; $count < $rows; $count++) { $output .= chr($predictor); $output .= substr($data, $offset, $bytesPerRow); $offset += $bytesPerRow; } break; case 1: // Sub prediction for ($count = 0; $count < $rows; $count++) { $output .= chr($predictor); $lastSample = array_fill(0, $bytesPerSample, 0); for ($count2 = 0; $count2 < $bytesPerRow; $count2++) { $newByte = ord($data[$offset++]); // Note. chr() automatically cuts input to 8 bit $output .= chr($newByte - $lastSample[$count2 % $bytesPerSample]); $lastSample[$count2 % $bytesPerSample] = $newByte; } } break; case 2: // Up prediction $lastRow = array_fill(0, $bytesPerRow, 0); for ($count = 0; $count < $rows; $count++) { $output .= chr($predictor); for ($count2 = 0; $count2 < $bytesPerRow; $count2++) { $newByte = ord($data[$offset++]); // Note. chr() automatically cuts input to 8 bit $output .= chr($newByte - $lastRow[$count2]); $lastRow[$count2] = $newByte; } } break; case 3: // Average prediction $lastRow = array_fill(0, $bytesPerRow, 0); for ($count = 0; $count < $rows; $count++) { $output .= chr($predictor); $lastSample = array_fill(0, $bytesPerSample, 0); for ($count2 = 0; $count2 < $bytesPerRow; $count2++) { $newByte = ord($data[$offset++]); // Note. chr() automatically cuts input to 8 bit $output .= chr($newByte - floor(( $lastSample[$count2 % $bytesPerSample] + $lastRow[$count2])/2)); $lastSample[$count2 % $bytesPerSample] = $lastRow[$count2] = $newByte; } } break; case 4: // Paeth prediction $lastRow = array_fill(0, $bytesPerRow, 0); $currentRow = array(); for ($count = 0; $count < $rows; $count++) { $output .= chr($predictor); $lastSample = array_fill(0, $bytesPerSample, 0); for ($count2 = 0; $count2 < $bytesPerRow; $count2++) { $newByte = ord($data[$offset++]); // Note. chr() automatically cuts input to 8 bit $output .= chr($newByte - self::_paeth( $lastSample[$count2 % $bytesPerSample], $lastRow[$count2], ($count2 - $bytesPerSample < 0)? 0 : $lastRow[$count2 - $bytesPerSample] )); $lastSample[$count2 % $bytesPerSample] = $currentRow[$count2] = $newByte; } $lastRow = $currentRow; } break; } return $output; } require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Unknown prediction algorithm - ' . $predictor . '.' ); } /** * Convert stream data according to the filter params set after decoding. * * @param string $data * @param array $params * @return string */ protected static function _applyDecodeParams($data, $params) { $predictor = self::_getPredictorValue($params); $colors = self::_getColorsValue($params); $bitsPerComponent = self::_getBitsPerComponentValue($params); $columns = self::_getColumnsValue($params); /** None of prediction */ if ($predictor == 1) { return $data; } /** TIFF Predictor 2 */ if ($predictor == 2) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Not implemented yet' ); } /** * PNG prediction * Prediction code is duplicated on each row. * Thus all cases can be brought to one */ if ($predictor == 10 || /** None of prediction */ $predictor == 11 || /** Sub prediction */ $predictor == 12 || /** Up prediction */ $predictor == 13 || /** Average prediction */ $predictor == 14 || /** Paeth prediction */ $predictor == 15 /** Optimal prediction */) { $bitsPerSample = $bitsPerComponent*$colors; $bytesPerSample = ceil($bitsPerSample/8); $bytesPerRow = ceil($bitsPerSample*$columns/8); $rows = ceil(strlen($data)/($bytesPerRow + 1)); $output = ''; $offset = 0; $lastRow = array_fill(0, $bytesPerRow, 0); for ($count = 0; $count < $rows; $count++) { $lastSample = array_fill(0, $bytesPerSample, 0); switch (ord($data[$offset++])) { case 0: // None of prediction $output .= substr($data, $offset, $bytesPerRow); for ($count2 = 0; $count2 < $bytesPerRow && $offset < strlen($data); $count2++) { $lastSample[$count2 % $bytesPerSample] = $lastRow[$count2] = ord($data[$offset++]); } break; case 1: // Sub prediction for ($count2 = 0; $count2 < $bytesPerRow && $offset < strlen($data); $count2++) { $decodedByte = (ord($data[$offset++]) + $lastSample[$count2 % $bytesPerSample]) & 0xFF; $lastSample[$count2 % $bytesPerSample] = $lastRow[$count2] = $decodedByte; $output .= chr($decodedByte); } break; case 2: // Up prediction for ($count2 = 0; $count2 < $bytesPerRow && $offset < strlen($data); $count2++) { $decodedByte = (ord($data[$offset++]) + $lastRow[$count2]) & 0xFF; $lastSample[$count2 % $bytesPerSample] = $lastRow[$count2] = $decodedByte; $output .= chr($decodedByte); } break; case 3: // Average prediction for ($count2 = 0; $count2 < $bytesPerRow && $offset < strlen($data); $count2++) { $decodedByte = (ord($data[$offset++]) + floor(( $lastSample[$count2 % $bytesPerSample] + $lastRow[$count2])/2) ) & 0xFF; $lastSample[$count2 % $bytesPerSample] = $lastRow[$count2] = $decodedByte; $output .= chr($decodedByte); } break; case 4: // Paeth prediction $currentRow = array(); for ($count2 = 0; $count2 < $bytesPerRow && $offset < strlen($data); $count2++) { $decodedByte = (ord($data[$offset++]) + self::_paeth($lastSample[$count2 % $bytesPerSample], $lastRow[$count2], ($count2 - $bytesPerSample < 0)? 0 : $lastRow[$count2 - $bytesPerSample]) ) & 0xFF; $lastSample[$count2 % $bytesPerSample] = $currentRow[$count2] = $decodedByte; $output .= chr($decodedByte); } $lastRow = $currentRow; break; default: require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Unknown prediction tag.'); } } return $output; } require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception('Unknown prediction algorithm - ' . $predictor . '.' ); } }
gpl-3.0
E3V3A/snoopsnitch
contrib/libosmo-asn1-rrc/src/FrequencyInfoTDD.c
1902
/* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "InformationElements" * found in "../asn/InformationElements.asn" * `asn1c -fcompound-names -fnative-types` */ #include "FrequencyInfoTDD.h" static asn_TYPE_member_t asn_MBR_FrequencyInfoTDD_1[] = { { ATF_NOFLAGS, 0, offsetof(struct FrequencyInfoTDD, uarfcn_Nt), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UARFCN, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "uarfcn-Nt" }, }; static ber_tlv_tag_t asn_DEF_FrequencyInfoTDD_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_FrequencyInfoTDD_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* uarfcn-Nt at 8759 */ }; static asn_SEQUENCE_specifics_t asn_SPC_FrequencyInfoTDD_specs_1 = { sizeof(struct FrequencyInfoTDD), offsetof(struct FrequencyInfoTDD, _asn_ctx), asn_MAP_FrequencyInfoTDD_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; asn_TYPE_descriptor_t asn_DEF_FrequencyInfoTDD = { "FrequencyInfoTDD", "FrequencyInfoTDD", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_FrequencyInfoTDD_tags_1, sizeof(asn_DEF_FrequencyInfoTDD_tags_1) /sizeof(asn_DEF_FrequencyInfoTDD_tags_1[0]), /* 1 */ asn_DEF_FrequencyInfoTDD_tags_1, /* Same as above */ sizeof(asn_DEF_FrequencyInfoTDD_tags_1) /sizeof(asn_DEF_FrequencyInfoTDD_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ asn_MBR_FrequencyInfoTDD_1, 1, /* Elements count */ &asn_SPC_FrequencyInfoTDD_specs_1 /* Additional specs */ };
gpl-3.0
neo4j/neo4j-browser
src/browser/components/buttons/style.css
202
.tooltip { position: absolute; background-color: grey; } .action { padding: 0px !important; font-size: 0.8em !important; min-width: 50px !important; } .remove { color: #bcc0c9 !important; }
gpl-3.0
inovex/zax
src/main/java/com/inovex/zabbixmobile/widget/PackageReplacedReceiver.java
1490
/* This file is part of ZAX. ZAX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ZAX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ZAX. If not, see <http://www.gnu.org/licenses/>. */ package com.inovex.zabbixmobile.widget; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; /** * This broadcast receiver listens for replacements of the application package. * If the package receives an update, widget update alarm needs to be set again. * */ public class PackageReplacedReceiver extends BroadcastReceiver { private static final String TAG = PackageReplacedReceiver.class .getSimpleName(); @Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "package replaced. Sending widget update broadcast."); Intent broadcastIntent = new Intent(context, WidgetUpdateBroadcastReceiver.class); broadcastIntent.putExtra(WidgetUpdateBroadcastReceiver.REFRESH_RATE_CHANGED, true); context.sendBroadcast(broadcastIntent); } }
gpl-3.0
stefangs/NetHomeServer
home-items/web-items/src/main/java/nu/nethome/home/items/web/servergui/HomeItemError.java
1950
/** * Copyright (C) 2005-2013, Stefan Strömberg <[email protected]> * * This file is part of OpenNetHome (http://www.nethome.nu) * * OpenNetHome is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenNetHome is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @author Peter Lagerhem * * History: * 2010-10-27 pela Created. * */ package nu.nethome.home.items.web.servergui; import nu.nethome.home.item.Attribute; /** * This class can be used to collect errors of home item attributes. You could * typically use it where IllegalFormat (and alike) exceptions are caught and * you want to record the cause for the error and the attribute. * * The printPage() method of the EditItemPage class uses this class for * displaying the attribute errors. */ public class HomeItemError { private Attribute attribute; private String errorMessage; public ErrorType type; public enum ErrorType { general, attribute } /** * @return the attribute */ public Attribute getAttribute() { return attribute; } /** * @return the errorMessage */ public String getErrorMessage() { return errorMessage; } public HomeItemError(Attribute attribute, String errorMessage) { this.attribute = attribute; this.errorMessage = errorMessage; type = ErrorType.attribute; } public HomeItemError(String errorMessage) { this.errorMessage = errorMessage; type = ErrorType.general; } }
gpl-3.0
SGKhmCs/wBoard
src/main/webapp/app/admin/admin.route.ts
659
import { Routes } from '@angular/router'; import { auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, metricsRoute, trackerRoute, userMgmtRoute, userDialogRoute } from './'; import { UserRouteAccessService } from '../shared'; const ADMIN_ROUTES = [ auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, trackerRoute, ...userMgmtRoute, metricsRoute ]; export const adminState: Routes = [{ path: '', data: { authorities: ['ROLE_ADMIN'] }, canActivate: [UserRouteAccessService], children: ADMIN_ROUTES }, ...userDialogRoute ];
gpl-3.0
knarfS/libsigrok
src/input/csv.c
57420
/* * This file is part of the libsigrok project. * * Copyright (C) 2013 Marc Schink <[email protected]> * Copyright (C) 2019 Gerhard Sittig <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" #include <ctype.h> #include <glib.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <libsigrok/libsigrok.h> #include "libsigrok-internal.h" #include "scpi.h" /* String un-quote for channel name from header line. */ #define LOG_PREFIX "input/csv" #define CHUNK_SIZE (4 * 1024 * 1024) /* * The CSV input module has the following options: * * column_formats: Specifies the data formats and channel counts for the * input file's text columns. Accepts a comma separated list of tuples * with: an optional column repeat count ('*' as a wildcard meaning * "all remaining columns", only applicable to the last field), a format * specifying character ('x' hexadecimal, 'o' octal, 'b' binary, 'l' * single-bit logic), and an optional bit count (translating to: logic * channels communicated in that column). The 'a' format marks analog * data, an optionally following number is the digits count (resolution). * The 't' format marks timestamp values, which could help in automatic * determination of the input stream's samplerate. This "column_formats" * option is most versatile, other forms of specifying the column layout * only exist for backwards compatibility, and are rather limited. They * exclusively support logic input data in strictly adjacent columns, * with further constraints on column layout for multi-bit data. * * single_column: Specifies the column number which contains the logic data * for single-column mode. All logic data is taken from several bits * which all are kept within that one column. Only exists for backwards * compatibility, see "column_formats" for more flexibility. * * first_column: Specifies the number of the first column with logic data * in simple multi-column mode. Only exists for backwards compatibility, * see "column_formats" for more flexibility. * * logic_channels: Specifies the number of logic channels. Is required in * simple single-column mode. Is optional in simple multi-column mode * (and defaults to all remaining columns). Only exists for backwards * compatibility, see "column_formats" for more flexibility. * * single_format: Specifies the format of the input text in simple single- * column mode. Available formats are: 'bin' (default), 'hex' and 'oct'. * Simple multi-column mode always uses single-bit data per column. * Only exists for backwards compatibility, see "column_formats" for * more flexibility. * * start_line: Specifies at which line to start processing the input file. * Allows to skip leading lines which neither are header nor data lines. * By default all of the input file gets processed. * * header: Boolean option, controls whether the first processed line is used * to determine channel names. Off by default. Generic channel names are * used in the absence of header line content. * * samplerate: Specifies the samplerate of the input data. Defaults to 0. * User specs take precedence over data which optionally gets derived * from input data. * * column_separator: Specifies the sequence which separates the text file * columns. Cannot be empty. Defaults to comma. * * comment_leader: Specifies the sequence which starts comments that run * up to the end of the current text line. Can be empty to disable * comment support. Defaults to semicolon. * * Typical examples of using these options: * - ... -I csv:column_formats=*l ... * All columns are single-bit logic data. Identical to the previous * multi-column mode (the default when no options were given at all). * - ... -I csv:column_formats=3-,*l ... * Ignore the first three columns, get single-bit logic data from all * remaining lines (multi-column mode with first-column above 1). * - ... -I csv:column_formats=3-,4l,x8 ... * Ignore the first three columns, get single-bit logic data from the * next four columns, then eight-bit data in hex format from the next * column. More columns may follow in the input text but won't get * processed. (Mix of previous multi-column as well as single-column * modes.) * - ... -I csv:column_formats=4x8,b16,5l ... * Get eight-bit data in hex format from the first four columns, then * sixteen-bit data in binary format, then five times single-bit data. * - ... -I csv:single_column=2:single_format=bin:logic_channels=8 ... * Get eight logic bits in binary format from column 2. (Simple * single-column mode, corresponds to the "-,b8" format.) * - ... -I csv:first_column=6:logic_channels=4 ... * Get four single-bit logic channels from columns 6 to 9 respectively. * (Simple multi-column mode, corresponds to the "5-,4b" format.) * - ... -I csv:start_line=20:header=yes:... * Skip the first 19 text lines. Use line 20 to derive channel names. * Data starts at line 21. * - ... -I csv:column_formats=*a6 ... * Each column contains an analog value with six significant digits * after the decimal period. * - ... -I csv:column_formats=t,2a ... * The first column contains timestamps, the next two columns contain * analog values. The capture's samplerate could get determined from * the timestamp values if not provided by the user by means of the * 'samplerate' option. This assumes a mere number in units of seconds, * and equidistant rows, there is no fancy support for textual unit * suffixes nor gaps in the stream of samples nor other non-linearity, * just '-' ignore the column if the format is not supported). * * IMPORTANT! Make sure the .format_match() logic matches the default * values for the input module's options. Ideally the format match test * shall pass for all input data that is supported by default. */ /* * TODO * * - Add a test suite for input modules in general, and CSV in specific? * Becomes more important with the multitude of options and their * interaction. Could cover edge cases (BOM presence, line termination * absence, etc) and auto-stuff as well (channel names, channel counts, * samplerates, etc). */ typedef double csv_analog_t; /* Single column formats. */ enum single_col_format { FORMAT_NONE, /* Ignore this column. */ FORMAT_BIN, /* Bin digits for a set of bits (or just one bit). */ FORMAT_HEX, /* Hex digits for a set of bits. */ FORMAT_OCT, /* Oct digits for a set of bits. */ FORMAT_ANALOG, /* Floating point number for an analog channel. */ FORMAT_TIME, /* Timestamps. */ }; static const char *col_format_text[] = { [FORMAT_NONE] = "unknown", [FORMAT_BIN] = "binary", [FORMAT_HEX] = "hexadecimal", [FORMAT_OCT] = "octal", [FORMAT_ANALOG] = "analog", [FORMAT_TIME] = "timestamp", }; static const char col_format_char[] = { [FORMAT_NONE] = '?', [FORMAT_BIN] = 'b', [FORMAT_HEX] = 'x', [FORMAT_OCT] = 'o', [FORMAT_ANALOG] = 'a', [FORMAT_TIME] = 't', }; static gboolean format_is_ignore(enum single_col_format fmt) { return fmt == FORMAT_NONE; } static gboolean format_is_logic(enum single_col_format fmt) { return fmt >= FORMAT_BIN && fmt <= FORMAT_OCT; } static gboolean format_is_analog(enum single_col_format fmt) { return fmt == FORMAT_ANALOG; } static gboolean format_is_timestamp(enum single_col_format fmt) { return fmt == FORMAT_TIME; } struct column_details { size_t col_nr; enum single_col_format text_format; size_t channel_offset; size_t channel_count; int analog_digits; GString **channel_names; }; struct context { gboolean started; /* Current samplerate, optionally determined from input data. */ uint64_t samplerate; uint64_t calc_samplerate; double prev_timestamp; gboolean samplerate_sent; /* Number of channels. */ size_t logic_channels; size_t analog_channels; /* Column delimiter (actually separator), comment leader, EOL sequence. */ GString *delimiter; GString *comment; char *termination; /* Format specs for input columns, and processing state. */ size_t column_seen_count; const char *column_formats; size_t column_want_count; struct column_details *column_details; /* Line number to start processing. */ size_t start_line; /* * Determines if the first line should be treated as header and used for * channel names in multi column mode. */ gboolean use_header; gboolean header_seen; size_t sample_unit_size; /**!< Byte count for a single sample. */ uint8_t *sample_buffer; /**!< Buffer for a single sample. */ csv_analog_t *analog_sample_buffer; /**!< Buffer for one set of analog values. */ uint8_t *datafeed_buffer; /**!< Queue for datafeed submission. */ size_t datafeed_buf_size; size_t datafeed_buf_fill; /* "Striped" layout, M samples for N channels each. */ csv_analog_t *analog_datafeed_buffer; /**!< Queue for analog datafeed. */ size_t analog_datafeed_buf_size; size_t analog_datafeed_buf_fill; int *analog_datafeed_digits; GSList **analog_datafeed_channels; /* Current line number. */ size_t line_number; /* List of previously created sigrok channels. */ GSList *prev_sr_channels; GSList **prev_df_channels; }; /* * Primitive operations to handle sample sets: * - Keep a buffer for datafeed submission, capable of holding many * samples (reduces call overhead, improves throughput). * - Have a "current sample set" pointer reference one position in that * large samples buffer. * - Clear the current sample set before text line inspection, then set * the bits which are found active in the current line of text input. * Phrase the API such that call sites can be kept simple. Advance to * the next sample set between lines, flush the larger buffer as needed * (when it is full, or upon EOF). */ static int flush_samplerate(const struct sr_input *in) { struct context *inc; inc = in->priv; if (!inc->calc_samplerate && inc->samplerate) inc->calc_samplerate = inc->samplerate; if (inc->calc_samplerate && !inc->samplerate_sent) { (void)sr_session_send_meta(in->sdi, SR_CONF_SAMPLERATE, g_variant_new_uint64(inc->calc_samplerate)); inc->samplerate_sent = TRUE; } return SR_OK; } static void clear_logic_samples(struct context *inc) { if (!inc->logic_channels) return; inc->sample_buffer = &inc->datafeed_buffer[inc->datafeed_buf_fill]; memset(inc->sample_buffer, 0, inc->sample_unit_size); } static void set_logic_level(struct context *inc, size_t ch_idx, int on) { size_t byte_idx, bit_idx; uint8_t bit_mask; if (ch_idx >= inc->logic_channels) return; if (!on) return; byte_idx = ch_idx / 8; bit_idx = ch_idx % 8; bit_mask = 1 << bit_idx; inc->sample_buffer[byte_idx] |= bit_mask; } static int flush_logic_samples(const struct sr_input *in) { struct context *inc; struct sr_datafeed_packet packet; struct sr_datafeed_logic logic; int rc; inc = in->priv; if (!inc->datafeed_buf_fill) return SR_OK; rc = flush_samplerate(in); if (rc != SR_OK) return rc; memset(&packet, 0, sizeof(packet)); memset(&logic, 0, sizeof(logic)); packet.type = SR_DF_LOGIC; packet.payload = &logic; logic.unitsize = inc->sample_unit_size; logic.length = inc->datafeed_buf_fill; logic.data = inc->datafeed_buffer; rc = sr_session_send(in->sdi, &packet); if (rc != SR_OK) return rc; inc->datafeed_buf_fill = 0; return SR_OK; } static int queue_logic_samples(const struct sr_input *in) { struct context *inc; int rc; inc = in->priv; if (!inc->logic_channels) return SR_OK; inc->datafeed_buf_fill += inc->sample_unit_size; if (inc->datafeed_buf_fill == inc->datafeed_buf_size) { rc = flush_logic_samples(in); if (rc != SR_OK) return rc; } return SR_OK; } static void set_analog_value(struct context *inc, size_t ch_idx, csv_analog_t value); static void clear_analog_samples(struct context *inc) { size_t idx; if (!inc->analog_channels) return; inc->analog_sample_buffer = &inc->analog_datafeed_buffer[inc->analog_datafeed_buf_fill]; for (idx = 0; idx < inc->analog_channels; idx++) set_analog_value(inc, idx, 0.0); } static void set_analog_value(struct context *inc, size_t ch_idx, csv_analog_t value) { if (ch_idx >= inc->analog_channels) return; if (!value) return; inc->analog_sample_buffer[ch_idx * inc->analog_datafeed_buf_size] = value; } static int flush_analog_samples(const struct sr_input *in) { struct context *inc; struct sr_datafeed_packet packet; struct sr_datafeed_analog analog; struct sr_analog_encoding encoding; struct sr_analog_meaning meaning; struct sr_analog_spec spec; csv_analog_t *samples; size_t ch_idx; int digits; int rc; inc = in->priv; if (!inc->analog_datafeed_buf_fill) return SR_OK; rc = flush_samplerate(in); if (rc != SR_OK) return rc; samples = inc->analog_datafeed_buffer; for (ch_idx = 0; ch_idx < inc->analog_channels; ch_idx++) { digits = inc->analog_datafeed_digits[ch_idx]; sr_analog_init(&analog, &encoding, &meaning, &spec, digits); memset(&packet, 0, sizeof(packet)); packet.type = SR_DF_ANALOG; packet.payload = &analog; analog.num_samples = inc->analog_datafeed_buf_fill; analog.data = samples; analog.meaning->channels = inc->analog_datafeed_channels[ch_idx]; analog.meaning->mq = 0; analog.meaning->mqflags = 0; analog.meaning->unit = 0; analog.encoding->unitsize = sizeof(samples[0]); analog.encoding->is_signed = TRUE; analog.encoding->is_float = TRUE; #ifdef WORDS_BIGENDIAN analog.encoding->is_bigendian = TRUE; #else analog.encoding->is_bigendian = FALSE; #endif analog.encoding->digits = spec.spec_digits; rc = sr_session_send(in->sdi, &packet); if (rc != SR_OK) return rc; samples += inc->analog_datafeed_buf_size; } inc->analog_datafeed_buf_fill = 0; return SR_OK; } static int queue_analog_samples(const struct sr_input *in) { struct context *inc; int rc; inc = in->priv; if (!inc->analog_channels) return SR_OK; inc->analog_datafeed_buf_fill++; if (inc->analog_datafeed_buf_fill == inc->analog_datafeed_buf_size) { rc = flush_analog_samples(in); if (rc != SR_OK) return rc; } return SR_OK; } /* Helpers for "column processing". */ static int split_column_format(const char *spec, size_t *column_count, enum single_col_format *format, size_t *bit_count) { size_t count; char *endp, format_char; enum single_col_format format_code; if (!spec || !*spec) return SR_ERR_ARG; /* Get the (optional, decimal, default 1) column count. Accept '*'. */ endp = NULL; if (*spec == '*') { /* Workaround, strtoul("*") won't always yield expected endp. */ count = 0; endp = (char *)&spec[1]; } else { count = strtoul(spec, &endp, 10); } if (!endp) return SR_ERR_ARG; if (endp == spec) count = 1; if (column_count) *column_count = count; spec = endp; /* Get the (mandatory, single letter) type spec (-/xob/l). */ format_char = *spec++; switch (format_char) { case '-': case '/': format_char = '-'; format_code = FORMAT_NONE; break; case 'x': format_code = FORMAT_HEX; break; case 'o': format_code = FORMAT_OCT; break; case 'b': case 'l': format_code = FORMAT_BIN; break; case 'a': format_code = FORMAT_ANALOG; break; case 't': format_code = FORMAT_TIME; break; default: /* includes NUL */ return SR_ERR_ARG; } if (format) *format = format_code; /* Get the (optional, decimal, default 1) bit count. */ endp = NULL; count = strtoul(spec, &endp, 10); if (!endp) return SR_ERR_ARG; if (endp == spec) count = format_is_analog(format_code) ? 3 : 1; if (format_is_ignore(format_code)) count = 0; if (format_char == 'l') count = 1; if (bit_count) *bit_count = count; spec = endp; /* Input spec must have been exhausted. */ if (*spec) return SR_ERR_ARG; return SR_OK; } static int make_column_details_from_format(const struct sr_input *in, const char *column_format, char **column_texts) { struct context *inc; char **formats, *format; size_t format_count, column_count, logic_count, analog_count; size_t auto_column_count; size_t format_idx, c, b, column_idx, channel_idx, analog_idx; enum single_col_format f; struct column_details *detail; GString *channel_name; size_t create_idx; char *column; const char *caption; int channel_type, channel_sdi_nr; void *channel; int ret; inc = in->priv; inc->column_seen_count = g_strv_length(column_texts); /* Split the input spec, count involved columns and channels. */ formats = g_strsplit(column_format, ",", 0); if (!formats) { sr_err("Cannot parse columns format %s (comma split).", column_format); return SR_ERR_ARG; } format_count = g_strv_length(formats); if (!format_count) { sr_err("Cannot parse columns format %s (field count).", column_format); g_strfreev(formats); return SR_ERR_ARG; } column_count = logic_count = analog_count = 0; auto_column_count = 0; for (format_idx = 0; format_idx < format_count; format_idx++) { format = formats[format_idx]; ret = split_column_format(format, &c, &f, &b); sr_dbg("fmt %s -> %zu cols, %s fmt, %zu bits, rc %d", format, c, col_format_text[f], b, ret); if (ret != SR_OK) { sr_err("Cannot parse columns format %s (field split, %s).", column_format, format); g_strfreev(formats); return SR_ERR_ARG; } if (f && !c) { /* User requested "auto-count", must be last format. */ if (formats[format_idx + 1]) { sr_err("Auto column count must be last format field."); g_strfreev(formats); return SR_ERR_ARG; } auto_column_count = inc->column_seen_count - column_count; c = auto_column_count; } column_count += c; if (format_is_analog(f)) analog_count += c; else if (format_is_logic(f)) logic_count += c * b; } sr_dbg("Column format %s -> %zu columns, %zu logic, %zu analog channels.", column_format, column_count, logic_count, analog_count); /* Allocate and fill in "column processing" details. */ inc->column_want_count = column_count; if (inc->column_seen_count < inc->column_want_count) { sr_err("Insufficient input text width for desired data amount, got %zu but want %zu columns.", inc->column_seen_count, inc->column_want_count); g_strfreev(formats); return SR_ERR_ARG; } inc->logic_channels = logic_count; inc->analog_channels = analog_count; inc->analog_datafeed_digits = g_malloc0(inc->analog_channels * sizeof(inc->analog_datafeed_digits[0])); inc->analog_datafeed_channels = g_malloc0(inc->analog_channels * sizeof(inc->analog_datafeed_channels[0])); inc->column_details = g_malloc0_n(column_count, sizeof(inc->column_details[0])); column_idx = channel_idx = analog_idx = 0; channel_name = g_string_sized_new(64); for (format_idx = 0; format_idx < format_count; format_idx++) { /* Process a format field, which can span multiple columns. */ format = formats[format_idx]; (void)split_column_format(format, &c, &f, &b); if (f && !c) c = auto_column_count; while (c-- > 0) { /* Fill in a column's processing details. */ detail = &inc->column_details[column_idx++]; detail->col_nr = column_idx; detail->text_format = f; if (format_is_analog(detail->text_format)) { detail->channel_offset = analog_idx; detail->channel_count = 1; detail->analog_digits = b; analog_idx += detail->channel_count; } else if (format_is_logic(detail->text_format)) { detail->channel_offset = channel_idx; detail->channel_count = b; channel_idx += detail->channel_count; } else if (format_is_ignore(detail->text_format)) { /* EMPTY */ continue; } else { /* * Neither logic nor analog data, nor ignore. * Format was noted. No channel creation involved. */ continue; } /* * Pick most appropriate channel names. Optionally * use text from a header line (when requested by the * user). In the absence of header text, channels are * assigned rather generic names. * * Manipulation of the column's caption (when a header * line is seen) is acceptable, because this header * line won't get processed another time. */ column = column_texts[detail->col_nr - 1]; if (inc->use_header && column && *column) { column = g_strstrip(column); caption = sr_scpi_unquote_string(column); } else { caption = NULL; } if (!caption || !*caption) caption = NULL; /* * Collect channel creation details here, but defer * actual creation of the channels such that all * logic channels can get created first and analog * channels only get created afterwards. */ detail->channel_names = g_malloc0(detail->channel_count * sizeof(detail->channel_names[0])); for (create_idx = 0; create_idx < detail->channel_count; create_idx++) { if (caption && detail->channel_count == 1) { g_string_assign(channel_name, caption); } else if (caption) { g_string_printf(channel_name, "%s[%zu]", caption, create_idx); } else { g_string_printf(channel_name, "%zu", detail->channel_offset + create_idx); } detail->channel_names[create_idx] = g_string_new_len(channel_name->str, channel_name->len); } } } g_string_free(channel_name, TRUE); g_strfreev(formats); /* Create channels in strict logic to analog order. */ channel_type = SR_CHANNEL_LOGIC; for (column_idx = 0; column_idx < inc->column_want_count; column_idx++) { detail = &inc->column_details[column_idx]; if (!format_is_logic(detail->text_format)) continue; for (create_idx = 0; create_idx < detail->channel_count; create_idx++) { caption = detail->channel_names[create_idx]->str; channel_sdi_nr = g_slist_length(in->sdi->channels); sr_channel_new(in->sdi, channel_sdi_nr, channel_type, TRUE, caption); } } channel_type = SR_CHANNEL_ANALOG; for (column_idx = 0; column_idx < inc->column_want_count; column_idx++) { detail = &inc->column_details[column_idx]; if (!format_is_analog(detail->text_format)) continue; caption = detail->channel_names[0]->str; channel_sdi_nr = g_slist_length(in->sdi->channels); channel = sr_channel_new(in->sdi, channel_sdi_nr, channel_type, TRUE, caption); channel_idx = channel_sdi_nr - inc->logic_channels; inc->analog_datafeed_digits[channel_idx] = detail->analog_digits; inc->analog_datafeed_channels[channel_idx] = g_slist_append(NULL, channel); } return SR_OK; } static const struct column_details *lookup_column_details(struct context *inc, size_t nr) { if (!inc || !inc->column_details) return NULL; if (!nr || nr > inc->column_want_count) return NULL; return &inc->column_details[nr - 1]; } /* * Primitive operations for text input: Strip comments off text lines. * Split text lines into columns. Process input text for individual * columns. */ static void strip_comment(char *buf, const GString *prefix) { char *ptr; if (!prefix->len) return; if ((ptr = strstr(buf, prefix->str))) { *ptr = '\0'; g_strstrip(buf); } } /** * Splits a text line into a set of columns. * * @param[in] buf The input text line to split. * @param[in] inc The input module's context. * * @returns An array of strings, representing the columns' text. * * This routine splits a text line on previously determined separators. */ static char **split_line(char *buf, struct context *inc) { char **fields, *f; size_t l; fields = g_strsplit(buf, inc->delimiter->str, 0); if (!fields) return NULL; l = g_strv_length(fields); while (l--) { f = fields[l]; g_strchomp(f); } return fields; } /** * Parse a multi-bit field into several logic channels. * * @param[in] column The input text, a run of bin/hex/oct digits. * @param[in] inc The input module's context. * @param[in] details The column processing details. * * @retval SR_OK Success. * @retval SR_ERR Invalid input data (empty, or format error). * * This routine modifies the logic levels in the current sample set, * based on the text input and a user provided format spec. */ static int parse_logic(const char *column, struct context *inc, const struct column_details *details) { size_t length, ch_rem, ch_idx, ch_inc; const char *rdptr; char c; gboolean valid; const char *type_text; uint8_t bits; /* * Prepare to read the digits from the text end towards the start. * A digit corresponds to a variable number of channels (depending * on the value's radix). Prepare the mapping of text digits to * (a number of) logic channels. */ length = strlen(column); if (!length) { sr_err("Column %zu in line %zu is empty.", details->col_nr, inc->line_number); return SR_ERR; } rdptr = &column[length]; ch_idx = details->channel_offset; ch_rem = details->channel_count; /* * Get another digit and derive up to four logic channels' state from * it. Make sure to not process more bits than the column has channels * associated with it. */ while (rdptr > column && ch_rem) { /* Check for valid digits according to the input radix. */ c = *(--rdptr); switch (details->text_format) { case FORMAT_BIN: valid = g_ascii_isxdigit(c) && c < '2'; ch_inc = 1; break; case FORMAT_OCT: valid = g_ascii_isxdigit(c) && c < '8'; ch_inc = 3; break; case FORMAT_HEX: valid = g_ascii_isxdigit(c); ch_inc = 4; break; default: valid = FALSE; break; } if (!valid) { type_text = col_format_text[details->text_format]; sr_err("Invalid text '%s' in %s type column %zu in line %zu.", column, type_text, details->col_nr, inc->line_number); return SR_ERR; } /* Use the digit's bits for logic channels' data. */ bits = g_ascii_xdigit_value(c); switch (details->text_format) { case FORMAT_HEX: if (ch_rem >= 4) { ch_rem--; set_logic_level(inc, ch_idx + 3, bits & (1 << 3)); } /* FALLTHROUGH */ case FORMAT_OCT: if (ch_rem >= 3) { ch_rem--; set_logic_level(inc, ch_idx + 2, bits & (1 << 2)); } if (ch_rem >= 2) { ch_rem--; set_logic_level(inc, ch_idx + 1, bits & (1 << 1)); } /* FALLTHROUGH */ case FORMAT_BIN: ch_rem--; set_logic_level(inc, ch_idx + 0, bits & (1 << 0)); break; default: /* ShouldNotHappen(TM), but silences compiler warning. */ return SR_ERR; } ch_idx += ch_inc; } /* * TODO Determine whether the availability of extra input data * for unhandled logic channels is worth warning here. In this * implementation users are in control, and can have the more * significant bits ignored (which can be considered a feature * and not really a limitation). */ return SR_OK; } /** * Parse a floating point text into an analog value. * * @param[in] column The input text, a floating point number. * @param[in] inc The input module's context. * @param[in] details The column processing details. * * @retval SR_OK Success. * @retval SR_ERR Invalid input data (empty, or format error). * * This routine modifies the analog values in the current sample set, * based on the text input and a user provided format spec. */ static int parse_analog(const char *column, struct context *inc, const struct column_details *details) { size_t length; double dvalue; float fvalue; csv_analog_t value; int ret; if (!format_is_analog(details->text_format)) return SR_ERR_BUG; length = strlen(column); if (!length) { sr_err("Column %zu in line %zu is empty.", details->col_nr, inc->line_number); return SR_ERR; } if (sizeof(value) == sizeof(double)) { ret = sr_atod_ascii(column, &dvalue); value = dvalue; } else if (sizeof(value) == sizeof(float)) { ret = sr_atof_ascii(column, &fvalue); value = fvalue; } else { ret = SR_ERR_BUG; } if (ret != SR_OK) { sr_err("Cannot parse analog text %s in column %zu in line %zu.", column, details->col_nr, inc->line_number); return SR_ERR_DATA; } set_analog_value(inc, details->channel_offset, value); return SR_OK; } /** * Parse a timestamp text, auto-determine samplerate. * * @param[in] column The input text, a floating point number. * @param[in] inc The input module's context. * @param[in] details The column processing details. * * @retval SR_OK Success. * @retval SR_ERR Invalid input data (empty, or format error). * * This routine attempts to automatically determine the input data's * samplerate from text rows' timestamp values. Only simple formats are * supported, user provided values always take precedence. */ static int parse_timestamp(const char *column, struct context *inc, const struct column_details *details) { double ts, rate; int ret; if (!format_is_timestamp(details->text_format)) return SR_ERR_BUG; /* * Implementor's notes on timestamp interpretation. Use a simple * approach for improved maintainability which covers most cases * of input data. There is not much gain in adding complexity, * users can easily provide the rate when auto-detection fails. * - Bail out if samplerate is known already. * - Try to interpret the timestamp (simple float conversion). * If conversion fails then clear all previous knowledge and * bail out (non-fatal, perhaps warn). Silently ignore values * of zero since those could be silent fails -- assume that * genuine data contains at least two adjacent rows with useful * timestamps for the feature to work reliably. Annoying users * with "failed to detect" messages is acceptable here, since * users expecting the feature to work should provide useful * data, and there are easy ways to disable the detection or * ignore the column. * - If there is no previous timestamp, keep the current value * for later reference and bail out. * - If a previous timestamp was seen, determine the difference * between them, and derive the samplerate. Update internal * state (the value automatically gets sent to the datafeed), * and clear previous knowledge. Subsequent calls will ignore * following input data (see above, rate is known). * * TODO Potential future improvements: * - Prefer rationals over floats for improved precision and * reduced rounding errors which result in odd rates. * - Support other formats ("2 ms" or similar)? */ if (inc->calc_samplerate) return SR_OK; ret = sr_atod_ascii(column, &ts); if (ret != SR_OK) ts = 0.0; if (!ts) { sr_info("Cannot convert timestamp text %s in line %zu (or zero value).", column, inc->line_number); inc->prev_timestamp = 0.0; return SR_OK; } if (!inc->prev_timestamp) { sr_dbg("First timestamp value %g in line %zu.", ts, inc->line_number); inc->prev_timestamp = ts; return SR_OK; } sr_dbg("Second timestamp value %g in line %zu.", ts, inc->line_number); ts -= inc->prev_timestamp; sr_dbg("Timestamp difference %g in line %zu.", ts, inc->line_number); if (!ts) { sr_warn("Zero timestamp difference in line %zu.", inc->line_number); inc->prev_timestamp = ts; return SR_OK; } rate = 1.0 / ts; rate += 0.5; rate = (uint64_t)rate; sr_dbg("Rate from timestamp %g in line %zu.", rate, inc->line_number); inc->calc_samplerate = rate; inc->prev_timestamp = 0.0; return SR_OK; } /** * Parse routine which ignores the input text. * * This routine exists to unify dispatch code paths, mapping input file * columns' data types to their respective parse routines. */ static int parse_ignore(const char *column, struct context *inc, const struct column_details *details) { (void)column; (void)inc; (void)details; return SR_OK; } typedef int (*col_parse_cb)(const char *column, struct context *inc, const struct column_details *details); static const col_parse_cb col_parse_funcs[] = { [FORMAT_NONE] = parse_ignore, [FORMAT_BIN] = parse_logic, [FORMAT_OCT] = parse_logic, [FORMAT_HEX] = parse_logic, [FORMAT_ANALOG] = parse_analog, [FORMAT_TIME] = parse_timestamp, }; /* * BEWARE! Implementor's notes. Sync with feature set and default option * values required during maintenance of the input module implementation. * * When applications invoke .format_match() routines, trying automatic * determination of an input file's format handler, then no options are * in effect. Because specifying options requires selection of an input * module to pass the options to, which obsoletes the format-match check. * * Which means that we only need to deal with the default format here, * which happens to be the simple multi-column format without header * lines or leading garbage. Which means that the check can be rather * strict, resulting in high levels of confidence upon match, never * "accidently" winning for unreadable or unsupported-by-default formats. * * This .format_match() logic only needs to become more involved when * default option values change, or when automatic detection of column * data types improves. Then the supported-by-default types of input * data must be considered acceptable here in the format-match check * as well. * * Notice that the format check cannot re-use regular processing logic * when their implementation assumes proper input data and wll generate * diagnostics for unexpected input data. Failure to match the format is * non-fatal here, mismatch must remain silent. It's up to applications * how large a chunk of data gets passed here (start of the file's * content). But inspection of the first few hundred bytes will usually * be GoodEnough(TM) for the format-match purpose. Notice that filenames * need not necessarily be available to the format-match routine. * * This implementation errs on the safe side. Users can always select * the CSV input module when automatic format detection fails. */ static int format_match(GHashTable *metadata, unsigned int *confidence) { const int match_confidence = 100; const char *default_extension = ".csv"; const char *line_termination = "\n"; const char *comment_leader = ";"; const char *column_separator = ","; const char *binary_charset = "01"; const char *fn; GString *buf; size_t fn_len; GString *tmpbuf; gboolean status; size_t line_idx, col_idx; char *rdptr, **lines, *line; char **cols, *col; /* Get the application provided input data properties. */ fn = g_hash_table_lookup(metadata, GINT_TO_POINTER(SR_INPUT_META_FILENAME)); buf = g_hash_table_lookup(metadata, GINT_TO_POINTER(SR_INPUT_META_HEADER)); /* Filenames are a strong hint. Use then when available. */ if (fn && *fn && (fn_len = strlen(fn)) >= strlen(default_extension)) { if (strcasecmp(&fn[fn_len - strlen(default_extension)], default_extension) == 0) { *confidence = 10; return SR_OK; } } /* * Check file content for compatibility with the input module's * default format. Which translates to: * - Must be at least one text line worth of input data. Ignore * incomplete lines at the end of the available buffer. * - Must be LF terminated text lines, optional CR-LF sequence. * (Drop CR-only for simplicity since that's rare and users * can override the automatic detection.) * - Strip comments and skip empty lines. * - Data lines must be binary input (potentially multiple bits * per column which then get ignored). Presence of comma is * optional but then must be followed by another data column. * - No other content is acceptable, there neither are ignored * columns nor analog data nor timestamps in the default layout. * (See the above "sync format match with default options" * comment though during maintenance!) * Run the check on a copy to not affect the caller's buffer. */ if (!buf || !buf->len || !buf->str || !*buf->str) return SR_ERR; rdptr = g_strstr_len(buf->str, buf->len, line_termination); if (!rdptr) return SR_ERR; tmpbuf = g_string_new_len(buf->str, rdptr + 1 - buf->str); tmpbuf->str[tmpbuf->len - 1] = '\0'; status = TRUE; *confidence = match_confidence; lines = g_strsplit(tmpbuf->str, line_termination, 0); for (line_idx = 0; status && (line = lines[line_idx]); line_idx++) { rdptr = strstr(line, comment_leader); if (rdptr) *rdptr = '\0'; line = g_strstrip(line); if (!line || !*line) continue; cols = g_strsplit(line, column_separator, 0); if (!cols) { status = FALSE; break; } for (col_idx = 0; status && (col = cols[col_idx]); col_idx++) { if (strspn(col, binary_charset) != strlen(col)) { status = FALSE; break; } } g_strfreev(cols); } g_strfreev(lines); g_string_free(tmpbuf, TRUE); if (!status) return SR_ERR; return SR_OK; } static int init(struct sr_input *in, GHashTable *options) { struct context *inc; size_t single_column, first_column, logic_channels; const char *s; enum single_col_format format; char format_char; in->sdi = g_malloc0(sizeof(*in->sdi)); in->priv = inc = g_malloc0(sizeof(*inc)); single_column = g_variant_get_uint32(g_hash_table_lookup(options, "single_column")); logic_channels = g_variant_get_uint32(g_hash_table_lookup(options, "logic_channels")); inc->delimiter = g_string_new(g_variant_get_string( g_hash_table_lookup(options, "column_separator"), NULL)); if (!inc->delimiter->len) { sr_err("Column separator cannot be empty."); return SR_ERR_ARG; } s = g_variant_get_string(g_hash_table_lookup(options, "single_format"), NULL); if (g_ascii_strncasecmp(s, "bin", 3) == 0) { format = FORMAT_BIN; } else if (g_ascii_strncasecmp(s, "hex", 3) == 0) { format = FORMAT_HEX; } else if (g_ascii_strncasecmp(s, "oct", 3) == 0) { format = FORMAT_OCT; } else { sr_err("Invalid single-column format: '%s'", s); return SR_ERR_ARG; } inc->comment = g_string_new(g_variant_get_string( g_hash_table_lookup(options, "comment_leader"), NULL)); if (g_string_equal(inc->comment, inc->delimiter)) { /* * Using the same sequence as comment leader and column * separator won't work. The user probably specified ';' * as the column separator but did not adjust the comment * leader. Try DWIM, drop comment strippin support here. */ sr_warn("Comment leader and column separator conflict, disabling comment support."); g_string_truncate(inc->comment, 0); } inc->samplerate = g_variant_get_uint64(g_hash_table_lookup(options, "samplerate")); first_column = g_variant_get_uint32(g_hash_table_lookup(options, "first_column")); inc->use_header = g_variant_get_boolean(g_hash_table_lookup(options, "header")); inc->start_line = g_variant_get_uint32(g_hash_table_lookup(options, "start_line")); if (inc->start_line < 1) { sr_err("Invalid start line %zu.", inc->start_line); return SR_ERR_ARG; } /* * Scan flexible, to get prefered format specs which describe * the input file's data formats. As well as some simple specs * for backwards compatibility and user convenience. * * This logic ends up with a copy of the format string, either * user provided or internally derived. Actual creation of the * column processing details gets deferred until the first line * of input data was seen. To support automatic determination of * e.g. channel counts from column counts. */ s = g_variant_get_string(g_hash_table_lookup(options, "column_formats"), NULL); if (s && *s) { inc->column_formats = g_strdup(s); sr_dbg("User specified column_formats: %s.", s); } else if (single_column && logic_channels) { format_char = col_format_char[format]; if (single_column == 1) { inc->column_formats = g_strdup_printf("%c%zu", format_char, logic_channels); } else { inc->column_formats = g_strdup_printf("%zu-,%c%zu", single_column - 1, format_char, logic_channels); } sr_dbg("Backwards compat single_column, col %zu, fmt %s, bits %zu -> %s.", single_column, col_format_text[format], logic_channels, inc->column_formats); } else if (!single_column) { if (first_column > 1) { inc->column_formats = g_strdup_printf("%zu-,%zul", first_column - 1, logic_channels); } else { inc->column_formats = g_strdup_printf("%zul", logic_channels); } sr_dbg("Backwards compat multi-column, col %zu, chans %zu -> %s.", first_column, logic_channels, inc->column_formats); } else { sr_warn("Unknown or unsupported columns layout spec, assuming simple multi-column mode."); inc->column_formats = g_strdup("*l"); } return SR_OK; } /* * Check the channel list for consistency across file re-import. See * the VCD input module for more details and motivation. */ static void release_df_channels(struct context *inc, GSList **l) { size_t idx; if (!inc->analog_channels || !l) return; for (idx = 0; idx < inc->analog_channels; idx++) g_slist_free(l[idx]); g_free(l); } static void keep_header_for_reread(const struct sr_input *in) { struct context *inc; inc = in->priv; g_slist_free_full(inc->prev_sr_channels, sr_channel_free_cb); inc->prev_sr_channels = in->sdi->channels; in->sdi->channels = NULL; release_df_channels(inc, inc->prev_df_channels); inc->prev_df_channels = inc->analog_datafeed_channels; inc->analog_datafeed_channels = NULL; } static int check_header_in_reread(const struct sr_input *in) { struct context *inc; if (!in) return FALSE; inc = in->priv; if (!inc) return FALSE; if (!inc->prev_sr_channels) return TRUE; if (sr_channel_lists_differ(inc->prev_sr_channels, in->sdi->channels)) { sr_err("Channel list change not supported for file re-read."); return FALSE; } g_slist_free_full(in->sdi->channels, sr_channel_free_cb); in->sdi->channels = inc->prev_sr_channels; inc->prev_sr_channels = NULL; release_df_channels(inc, inc->analog_datafeed_channels); inc->analog_datafeed_channels = inc->prev_df_channels; inc->prev_df_channels = NULL; return TRUE; } static const char *delim_set = "\r\n"; static const char *get_line_termination(GString *buf) { const char *term; term = NULL; if (g_strstr_len(buf->str, buf->len, "\r\n")) term = "\r\n"; else if (memchr(buf->str, '\n', buf->len)) term = "\n"; else if (memchr(buf->str, '\r', buf->len)) term = "\r"; return term; } static int initial_parse(const struct sr_input *in, GString *buf) { struct context *inc; size_t num_columns; size_t line_number, line_idx; int ret; char **lines, *line, **columns; ret = SR_OK; inc = in->priv; columns = NULL; /* Search for the first line to process (header or data). */ line_number = 0; if (inc->termination) lines = g_strsplit(buf->str, inc->termination, 0); else lines = g_strsplit_set(buf->str, delim_set, 0); for (line_idx = 0; (line = lines[line_idx]); line_idx++) { line_number++; if (inc->start_line > line_number) { sr_spew("Line %zu skipped (before start).", line_number); continue; } if (line[0] == '\0') { sr_spew("Blank line %zu skipped.", line_number); continue; } strip_comment(line, inc->comment); if (line[0] == '\0') { sr_spew("Comment-only line %zu skipped.", line_number); continue; } /* Reached first proper line. */ break; } if (!line) { /* Not enough data for a proper line yet. */ ret = SR_ERR_NA; goto out; } /* Get the number of columns in the line. */ columns = split_line(line, inc); if (!columns) { sr_err("Error while parsing line %zu.", line_number); ret = SR_ERR; goto out; } num_columns = g_strv_length(columns); if (!num_columns) { sr_err("Error while parsing line %zu.", line_number); ret = SR_ERR; goto out; } sr_dbg("Got %zu columns in text line: %s.", num_columns, line); /* * Interpret the user provided column format specs. This might * involve inspection of the now received input text, to support * e.g. automatic detection of channel counts in the absence of * user provided specs. Optionally a header line is used to get * channels' names. * * Check the then created channels for consistency across .reset * and .receive sequences (file re-load). */ ret = make_column_details_from_format(in, inc->column_formats, columns); if (ret != SR_OK) { sr_err("Cannot parse columns format using line %zu.", line_number); goto out; } if (!check_header_in_reread(in)) { ret = SR_ERR_DATA; goto out; } /* * Allocate buffer memory for datafeed submission of sample data. * Calculate the minimum buffer size to store the set of samples * of all channels (unit size). Determine a larger buffer size * for datafeed submission that is a multiple of the unit size. * Allocate the larger buffer, the "sample buffer" will point * to a location within that large buffer later. * * TODO Move channel creation here, and just store required * parameters in the format parser above? Could simplify the * arrangement that logic and analog channels get created in * strict sequence in their respective groups. */ if (inc->logic_channels) { inc->sample_unit_size = (inc->logic_channels + 7) / 8; inc->datafeed_buf_size = CHUNK_SIZE; inc->datafeed_buf_size *= inc->sample_unit_size; inc->datafeed_buffer = g_malloc(inc->datafeed_buf_size); if (!inc->datafeed_buffer) { sr_err("Cannot allocate datafeed send buffer (logic)."); ret = SR_ERR_MALLOC; goto out; } inc->datafeed_buf_fill = 0; } if (inc->analog_channels) { size_t sample_size, sample_count; sample_size = sizeof(inc->analog_datafeed_buffer[0]); inc->analog_datafeed_buf_size = CHUNK_SIZE; inc->analog_datafeed_buf_size /= sample_size; inc->analog_datafeed_buf_size /= inc->analog_channels; sample_count = inc->analog_channels * inc->analog_datafeed_buf_size; inc->analog_datafeed_buffer = g_malloc0(sample_count * sample_size); if (!inc->analog_datafeed_buffer) { sr_err("Cannot allocate datafeed send buffer (analog)."); ret = SR_ERR_MALLOC; goto out; } inc->analog_datafeed_buf_fill = 0; } out: if (columns) g_strfreev(columns); g_strfreev(lines); return ret; } /* * Gets called from initial_receive(), which runs until the end-of-line * encoding of the input stream could get determined. Assumes that this * routine receives enough buffered initial input data to either see the * BOM when there is one, or that no BOM will follow when a text line * termination sequence was seen. Silently drops the UTF-8 BOM sequence * from the input buffer if one was seen. Does not care to protect * against multiple execution or dropping the BOM multiple times -- * there should be at most one in the input stream. */ static void initial_bom_check(const struct sr_input *in) { static const char *utf8_bom = "\xef\xbb\xbf"; if (in->buf->len < strlen(utf8_bom)) return; if (strncmp(in->buf->str, utf8_bom, strlen(utf8_bom)) != 0) return; g_string_erase(in->buf, 0, strlen(utf8_bom)); } static int initial_receive(const struct sr_input *in) { struct context *inc; GString *new_buf; int len, ret; char *p; const char *termination; initial_bom_check(in); inc = in->priv; termination = get_line_termination(in->buf); if (!termination) /* Don't have a full line yet. */ return SR_ERR_NA; p = g_strrstr_len(in->buf->str, in->buf->len, termination); if (!p) /* Don't have a full line yet. */ return SR_ERR_NA; len = p - in->buf->str - 1; new_buf = g_string_new_len(in->buf->str, len); g_string_append_c(new_buf, '\0'); inc->termination = g_strdup(termination); if (in->buf->str[0] != '\0') ret = initial_parse(in, new_buf); else ret = SR_OK; g_string_free(new_buf, TRUE); return ret; } static int process_buffer(struct sr_input *in, gboolean is_eof) { struct context *inc; gsize num_columns; size_t line_idx, col_idx, col_nr; const struct column_details *details; col_parse_cb parse_func; int ret; char *processed_up_to; char **lines, *line, **columns, *column; inc = in->priv; if (!inc->started) { std_session_send_df_header(in->sdi); inc->started = TRUE; } /* * Consider empty input non-fatal. Keep accumulating input until * at least one full text line has become available. Grab the * maximum amount of accumulated data that consists of full text * lines, and process what has been received so far, leaving not * yet complete lines for the next invocation. * * Enforce that all previously buffered data gets processed in * the "EOF" condition. Do not insist in the presence of the * termination sequence for the last line (may often be missing * on Windows). A present termination sequence will just result * in the "execution of an empty line", and does not harm. */ if (!in->buf->len) return SR_OK; if (is_eof) { processed_up_to = in->buf->str + in->buf->len; } else { processed_up_to = g_strrstr_len(in->buf->str, in->buf->len, inc->termination); if (!processed_up_to) return SR_OK; *processed_up_to = '\0'; processed_up_to += strlen(inc->termination); } /* Split input text lines and process their columns. */ ret = SR_OK; lines = g_strsplit(in->buf->str, inc->termination, 0); for (line_idx = 0; (line = lines[line_idx]); line_idx++) { inc->line_number++; if (inc->line_number < inc->start_line) { sr_spew("Line %zu skipped (before start).", inc->line_number); continue; } if (line[0] == '\0') { sr_spew("Blank line %zu skipped.", inc->line_number); continue; } /* Remove trailing comment. */ strip_comment(line, inc->comment); if (line[0] == '\0') { sr_spew("Comment-only line %zu skipped.", inc->line_number); continue; } /* Skip the header line, its content was used as the channel names. */ if (inc->use_header && !inc->header_seen) { sr_spew("Header line %zu skipped.", inc->line_number); inc->header_seen = TRUE; continue; } /* Split the line into columns, check for minimum length. */ columns = split_line(line, inc); if (!columns) { sr_err("Error while parsing line %zu.", inc->line_number); g_strfreev(lines); return SR_ERR; } num_columns = g_strv_length(columns); if (num_columns < inc->column_want_count) { sr_err("Insufficient column count %zu in line %zu.", num_columns, inc->line_number); g_strfreev(columns); g_strfreev(lines); return SR_ERR; } /* Have the columns of the current text line processed. */ clear_logic_samples(inc); clear_analog_samples(inc); for (col_idx = 0; col_idx < inc->column_want_count; col_idx++) { column = columns[col_idx]; col_nr = col_idx + 1; details = lookup_column_details(inc, col_nr); if (!details || !details->text_format) continue; parse_func = col_parse_funcs[details->text_format]; if (!parse_func) continue; ret = parse_func(column, inc, details); if (ret != SR_OK) { g_strfreev(columns); g_strfreev(lines); return SR_ERR; } } /* Send sample data to the session bus (buffered). */ ret = queue_logic_samples(in); ret += queue_analog_samples(in); if (ret != SR_OK) { sr_err("Sending samples failed."); g_strfreev(columns); g_strfreev(lines); return SR_ERR; } g_strfreev(columns); } g_strfreev(lines); g_string_erase(in->buf, 0, processed_up_to - in->buf->str); return ret; } static int receive(struct sr_input *in, GString *buf) { struct context *inc; int ret; g_string_append_len(in->buf, buf->str, buf->len); inc = in->priv; if (!inc->column_seen_count) { ret = initial_receive(in); if (ret == SR_ERR_NA) /* Not enough data yet. */ return SR_OK; else if (ret != SR_OK) return SR_ERR; /* sdi is ready, notify frontend. */ in->sdi_ready = TRUE; return SR_OK; } ret = process_buffer(in, FALSE); return ret; } static int end(struct sr_input *in) { struct context *inc; int ret; if (in->sdi_ready) ret = process_buffer(in, TRUE); else ret = SR_OK; if (ret != SR_OK) return ret; ret = flush_logic_samples(in); ret += flush_analog_samples(in); if (ret != SR_OK) return ret; inc = in->priv; if (inc->started) std_session_send_df_end(in->sdi); return ret; } static void cleanup(struct sr_input *in) { struct context *inc, save_ctx; /* Keep channel references between file re-imports. */ keep_header_for_reread(in); /* Release dynamically allocated resources. */ inc = in->priv; g_free(inc->termination); inc->termination = NULL; g_free(inc->datafeed_buffer); inc->datafeed_buffer = NULL; g_free(inc->analog_datafeed_buffer); inc->analog_datafeed_buffer = NULL; g_free(inc->analog_datafeed_digits); inc->analog_datafeed_digits = NULL; /* analog_datafeed_channels was released in keep_header_for_reread() */ /* TODO Release channel names (before releasing details). */ g_free(inc->column_details); inc->column_details = NULL; /* Clear internal state, but keep what .init() has provided. */ save_ctx = *inc; memset(inc, 0, sizeof(*inc)); inc->samplerate = save_ctx.samplerate; inc->delimiter = save_ctx.delimiter; inc->comment = save_ctx.comment; inc->column_formats = save_ctx.column_formats; inc->start_line = save_ctx.start_line; inc->use_header = save_ctx.use_header; inc->prev_sr_channels = save_ctx.prev_sr_channels; inc->prev_df_channels = save_ctx.prev_df_channels; } static int reset(struct sr_input *in) { struct context *inc; inc = in->priv; cleanup(in); inc->started = FALSE; g_string_truncate(in->buf, 0); return SR_OK; } enum option_index { OPT_COL_FMTS, OPT_SINGLE_COL, OPT_FIRST_COL, OPT_NUM_LOGIC, OPT_SINGLE_FMT, OPT_START_LINE, OPT_HEADER, OPT_SAMPLERATE, OPT_COL_SEP, OPT_COMMENT, OPT_MAX, }; static struct sr_option options[] = { [OPT_COL_FMTS] = { "column_formats", "Column format specs", "Text columns data types. A comma separated list of [<cols>]<fmt>[<bits>] items. * for all remaining columns. - ignores columns, x/o/b/l logic data, a (and digits) analog data, t timestamps.", NULL, NULL, }, [OPT_SINGLE_COL] = { "single_column", "Single column", "Simple single-column mode, exclusively use text from the specified column (number starting at 1). Obsoleted by 'column_formats=4-,x16'.", NULL, NULL, }, [OPT_FIRST_COL] = { "first_column", "First column", "First column with logic data in simple multi-column mode (number starting at 1, default 1). Obsoleted by 'column_formats=4-,*l'.", NULL, NULL, }, [OPT_NUM_LOGIC] = { "logic_channels", "Number of logic channels", "Logic channel count, required in simple single-column mode, defaults to \"all remaining columns\" in simple multi-column mode. Obsoleted by 'column_formats=8l'.", NULL, NULL, }, [OPT_SINGLE_FMT] = { "single_format", "Data format for simple single-column mode.", "The input text number format of simple single-column mode: bin, hex, oct. Obsoleted by 'column_formats=x8'.", NULL, NULL, }, [OPT_START_LINE] = { "start_line", "Start line", "The line number at which to start processing input text (default: 1).", NULL, NULL, }, [OPT_HEADER] = { "header", "Get channel names from first line.", "Use the first processed line's column captions (when available) as channel names. Enabled by default.", NULL, NULL, }, [OPT_SAMPLERATE] = { "samplerate", "Samplerate (Hz)", "The input data's sample rate in Hz. No default value.", NULL, NULL, }, [OPT_COL_SEP] = { "column_separator", "Column separator", "The sequence which separates text columns. Non-empty text, comma by default.", NULL, NULL, }, [OPT_COMMENT] = { "comment_leader", "Comment leader character", "The text which starts comments at the end of text lines, semicolon by default.", NULL, NULL, }, [OPT_MAX] = ALL_ZERO, }; static const struct sr_option *get_options(void) { GSList *l; if (!options[0].def) { options[OPT_COL_FMTS].def = g_variant_ref_sink(g_variant_new_string("")); options[OPT_SINGLE_COL].def = g_variant_ref_sink(g_variant_new_uint32(0)); options[OPT_FIRST_COL].def = g_variant_ref_sink(g_variant_new_uint32(1)); options[OPT_NUM_LOGIC].def = g_variant_ref_sink(g_variant_new_uint32(0)); options[OPT_SINGLE_FMT].def = g_variant_ref_sink(g_variant_new_string("bin")); l = NULL; l = g_slist_append(l, g_variant_ref_sink(g_variant_new_string("bin"))); l = g_slist_append(l, g_variant_ref_sink(g_variant_new_string("hex"))); l = g_slist_append(l, g_variant_ref_sink(g_variant_new_string("oct"))); options[OPT_SINGLE_FMT].values = l; options[OPT_START_LINE].def = g_variant_ref_sink(g_variant_new_uint32(1)); options[OPT_HEADER].def = g_variant_ref_sink(g_variant_new_boolean(TRUE)); options[OPT_SAMPLERATE].def = g_variant_ref_sink(g_variant_new_uint64(0)); options[OPT_COL_SEP].def = g_variant_ref_sink(g_variant_new_string(",")); options[OPT_COMMENT].def = g_variant_ref_sink(g_variant_new_string(";")); } return options; } SR_PRIV struct sr_input_module input_csv = { .id = "csv", .name = "CSV", .desc = "Comma-separated values", .exts = (const char*[]){"csv", NULL}, .metadata = { SR_INPUT_META_FILENAME, SR_INPUT_META_HEADER | SR_INPUT_META_REQUIRED }, .options = get_options, .format_match = format_match, .init = init, .receive = receive, .end = end, .cleanup = cleanup, .reset = reset, };
gpl-3.0
Japhilko/tmap
build.bat
159
@echo off echo Removing building information... rm -rf output md output cd output R CMD build --resave-data ../pkg FOR %%1 in (*.tar.gz) DO R CMD check %%1
gpl-3.0
aviralchandra/Sandhi
build/gr36/docs/doxygen/html/gr__expj_8h.js
100
var gr__expj_8h = [ [ "gr_expj", "gr__expj_8h.html#a7d0144e5774158b746199c1da4d5b5ac", null ] ];
gpl-3.0
BramBonne/snoopsnitch-pcapinterface
contrib/libosmo-asn1-rrc/src/PrimaryCCPCH-InfoPost.c
8231
/* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "InformationElements" * found in "../asn/InformationElements.asn" * `asn1c -fcompound-names -fnative-types` */ #include "PrimaryCCPCH-InfoPost.h" static asn_per_constraints_t asn_PER_type_syncCase_constr_2 = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_syncCase1_3[] = { { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase1, timeslot), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TimeslotNumber, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "timeslot" }, }; static ber_tlv_tag_t asn_DEF_syncCase1_tags_3[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_syncCase1_tag2el_3[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* timeslot at 10434 */ }; static asn_SEQUENCE_specifics_t asn_SPC_syncCase1_specs_3 = { sizeof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase1), offsetof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase1, _asn_ctx), asn_MAP_syncCase1_tag2el_3, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_syncCase1_3 = { "syncCase1", "syncCase1", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_syncCase1_tags_3, sizeof(asn_DEF_syncCase1_tags_3) /sizeof(asn_DEF_syncCase1_tags_3[0]) - 1, /* 1 */ asn_DEF_syncCase1_tags_3, /* Same as above */ sizeof(asn_DEF_syncCase1_tags_3) /sizeof(asn_DEF_syncCase1_tags_3[0]), /* 2 */ 0, /* No PER visible constraints */ asn_MBR_syncCase1_3, 1, /* Elements count */ &asn_SPC_syncCase1_specs_3 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_syncCase2_5[] = { { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase2, timeslotSync2), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TimeslotSync2, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "timeslotSync2" }, }; static ber_tlv_tag_t asn_DEF_syncCase2_tags_5[] = { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_syncCase2_tag2el_5[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* timeslotSync2 at 10437 */ }; static asn_SEQUENCE_specifics_t asn_SPC_syncCase2_specs_5 = { sizeof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase2), offsetof(struct PrimaryCCPCH_InfoPost__syncCase__syncCase2, _asn_ctx), asn_MAP_syncCase2_tag2el_5, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_syncCase2_5 = { "syncCase2", "syncCase2", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_syncCase2_tags_5, sizeof(asn_DEF_syncCase2_tags_5) /sizeof(asn_DEF_syncCase2_tags_5[0]) - 1, /* 1 */ asn_DEF_syncCase2_tags_5, /* Same as above */ sizeof(asn_DEF_syncCase2_tags_5) /sizeof(asn_DEF_syncCase2_tags_5[0]), /* 2 */ 0, /* No PER visible constraints */ asn_MBR_syncCase2_5, 1, /* Elements count */ &asn_SPC_syncCase2_specs_5 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_syncCase_2[] = { { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost__syncCase, choice.syncCase1), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, &asn_DEF_syncCase1_3, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "syncCase1" }, { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost__syncCase, choice.syncCase2), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, &asn_DEF_syncCase2_5, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "syncCase2" }, }; static asn_TYPE_tag2member_t asn_MAP_syncCase_tag2el_2[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* syncCase1 at 10434 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* syncCase2 at 10437 */ }; static asn_CHOICE_specifics_t asn_SPC_syncCase_specs_2 = { sizeof(struct PrimaryCCPCH_InfoPost__syncCase), offsetof(struct PrimaryCCPCH_InfoPost__syncCase, _asn_ctx), offsetof(struct PrimaryCCPCH_InfoPost__syncCase, present), sizeof(((struct PrimaryCCPCH_InfoPost__syncCase *)0)->present), asn_MAP_syncCase_tag2el_2, 2, /* Count of tags in the map */ 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_syncCase_2 = { "syncCase", "syncCase", CHOICE_free, CHOICE_print, CHOICE_constraint, CHOICE_decode_ber, CHOICE_encode_der, CHOICE_decode_xer, CHOICE_encode_xer, CHOICE_decode_uper, CHOICE_encode_uper, CHOICE_outmost_tag, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ &asn_PER_type_syncCase_constr_2, asn_MBR_syncCase_2, 2, /* Elements count */ &asn_SPC_syncCase_specs_2 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_PrimaryCCPCH_InfoPost_1[] = { { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost, syncCase), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_syncCase_2, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "syncCase" }, { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost, cellParametersID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CellParametersID, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "cellParametersID" }, { ATF_NOFLAGS, 0, offsetof(struct PrimaryCCPCH_InfoPost, sctd_Indicator), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BOOLEAN, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, "sctd-Indicator" }, }; static ber_tlv_tag_t asn_DEF_PrimaryCCPCH_InfoPost_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_PrimaryCCPCH_InfoPost_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* syncCase at 10434 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellParametersID at 10439 */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* sctd-Indicator at 10440 */ }; static asn_SEQUENCE_specifics_t asn_SPC_PrimaryCCPCH_InfoPost_specs_1 = { sizeof(struct PrimaryCCPCH_InfoPost), offsetof(struct PrimaryCCPCH_InfoPost, _asn_ctx), asn_MAP_PrimaryCCPCH_InfoPost_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* Start extensions */ -1 /* Stop extensions */ }; asn_TYPE_descriptor_t asn_DEF_PrimaryCCPCH_InfoPost = { "PrimaryCCPCH-InfoPost", "PrimaryCCPCH-InfoPost", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_PrimaryCCPCH_InfoPost_tags_1, sizeof(asn_DEF_PrimaryCCPCH_InfoPost_tags_1) /sizeof(asn_DEF_PrimaryCCPCH_InfoPost_tags_1[0]), /* 1 */ asn_DEF_PrimaryCCPCH_InfoPost_tags_1, /* Same as above */ sizeof(asn_DEF_PrimaryCCPCH_InfoPost_tags_1) /sizeof(asn_DEF_PrimaryCCPCH_InfoPost_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ asn_MBR_PrimaryCCPCH_InfoPost_1, 3, /* Elements count */ &asn_SPC_PrimaryCCPCH_InfoPost_specs_1 /* Additional specs */ };
gpl-3.0
tholberton/utf-8-codec
include/libutf/ifstream.h
1140
#ifndef LIBUTF_IFSTREAM_H #define LIBUTF_IFSTREAM_H #include <libutf/istream.h> struct utf_ifstream { struct utf_istream istream; }; void utf_ifstream_init(struct utf_ifstream * ifstream); void utf_ifstream_free(struct utf_ifstream * ifstream); utf_codec_t utf_ifstream_get_codec(const struct utf_ifstream * ifstream); int utf_ifstream_open(struct utf_ifstream * ifstream, const char * path); size_t utf_ifstream_read_utf8(struct utf_ifstream * ifstream, char * data, size_t data_max); size_t utf_ifstream_read_utf16(struct utf_ifstream * ifstream, char16_t * data, size_t data_max); size_t utf_ifstream_read_utf32(struct utf_ifstream * ifstream, char32_t * data, size_t data_max); void utf_ifstream_set_codec(struct utf_ifstream * ifstream, utf_codec_t codec); /** The UTF version of the stdin handle. */ extern struct utf_ifstream utf_stdin; /** Initializes a input file stream with an stdin handle. * @param ifstream The structure to initialize the stdin handle with. * If this parameter is NULL, it initializes @ref utf_stdin. */ void utf_stdin_init(struct utf_ifstream * ifstream); #endif /* LIBUTF_IFSTREAM_H */
gpl-3.0
magicpriest/darling-FC-edition
src/libobjcdarwin/new/class.cpp
3116
#include "./class.h" #include "../../util/trace.h" #include "../../util/log.h" #include <map> #include <algorithm> #include "../common/method.h" #include "../common/property.h" #include "../common/ref.h" #include "./ivar.h" #include "./protocol.h" #include "../TopologySort.h" extern std::map<const void*,Class> g_classPointers; Class RegisterClass(const class_t* cls, intptr_t slide) { LOG << "Processing ObjC class " << cls->data()->className << std::endl; const class_t* meta = cls->isa; Class conv, super; auto itSuper = g_classPointers.find(cls->superclass); if (itSuper != g_classPointers.end()) super = itSuper->second; else super = reinterpret_cast<Class>(cls->superclass); LOG << "...superclass is @" << super << std::endl; conv = objc_allocateClassPair(super, cls->data()->className, 0); const class_ro_t* ro = cls->data(); const class_ro_t* roMeta = meta->data(); if (ro->baseMethods) ConvertMethodListGen(conv, ro->baseMethods); if (roMeta->baseMethods) ConvertMethodListGen(object_getClass(id(conv)), roMeta->baseMethods); if (ro->ivars) ConvertIvarList(conv, ro->ivars); if (ro->baseProtocols) AddClassProtocols(conv, ro->baseProtocols, slide); if (ro->baseProperties) { ConvertProperties(ro->baseProperties, [conv](const char* name, const objc_property_attribute_t* attr, unsigned int count) { class_addProperty(conv, name, attr, count); bug_gnustepFixPropertyCount(conv); }); } // conv->instance_size = ro->instSize; // conv->isa->instance_size = roMeta->instSize; objc_registerClassPair(conv); LOG << "ObjC class " << cls->data()->className << " now @" << conv << std::endl; g_classPointers[cls] = conv; return conv; } void ProcessClassesNew(const struct mach_header* mh, intptr_t slide, const class_t** classes, unsigned long size) { class_t **class_refs, **class_refs_end, **super_refs, **super_refs_end; unsigned long refsize, refsize_s; std::vector<const class_t*> vecClasses; std::set<const class_t*> setClasses; class_refs = reinterpret_cast<class_t**>( getsectdata(mh, SEG_OBJC_CLASSREFS_NEW, SECT_OBJC_CLASSREFS_NEW, &refsize) ); super_refs = reinterpret_cast<class_t**>( getsectdata(mh, SEG_OBJC_SUPERREFS_NEW, SECT_OBJC_SUPERREFS_NEW, &refsize_s) ); if (class_refs) class_refs_end = class_refs + refsize / sizeof(class_t*); if (super_refs) super_refs_end = super_refs + refsize_s / sizeof(class_t*); std::copy(classes, classes+size/sizeof(class_t*), std::inserter(setClasses, setClasses.begin())); topology_sort<const class_t>(setClasses, vecClasses, [&setClasses](const class_t* t) { return setClasses.count(t->superclass) ? std::set<const class_t*>{t->superclass} : std::set<const class_t*>(); } ); for (const class_t* cls : vecClasses) { Class c = RegisterClass(cls, slide); if (class_refs) { find_and_fix(class_refs, class_refs_end, cls, c); find_and_fix(class_refs, class_refs_end, cls->isa, object_getClass(id(c))); } if (super_refs) { find_and_fix(super_refs, super_refs_end, cls, c); find_and_fix(super_refs, super_refs_end, cls->isa, object_getClass(id(c))); } } }
gpl-3.0
qtproject/qt-creator
src/libs/qmljs/qmljsicontextpane.h
2009
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ #pragma once #include <QObject> #include "qmljs_global.h" #include <qmljs/qmljsdocument.h> #include <qmljs/parser/qmljsastfwd_p.h> namespace TextEditor { class TextEditorWidget; } namespace QmlJS { class ScopeChain; class QMLJS_EXPORT IContextPane : public QObject { Q_OBJECT public: IContextPane(QObject *parent = nullptr) : QObject(parent) {} virtual ~IContextPane() {} virtual void apply(TextEditor::TextEditorWidget *editorWidget, Document::Ptr document, const ScopeChain *scopeChain, AST::Node *node, bool update, bool force = false) = 0; virtual void setEnabled(bool) = 0; virtual bool isAvailable(TextEditor::TextEditorWidget *editorWidget, Document::Ptr document, AST::Node *node) = 0; virtual QWidget* widget() = 0; signals: void closed(); }; } // namespace QmlJS
gpl-3.0
jono659/enko
scripts/globals/spells/bluemagic/filamented_hold.lua
1408
----------------------------------------- -- Spell: Filamented Hold -- Reduces the attack speed of enemies within a fan-shaped area originating from the caster -- Spell cost: 38 MP -- Monster Type: Vermin -- Spell Type: Magical (Earth) -- Blue Magic Points: 3 -- Stat Bonus: VIT+1 -- Level: 52 -- Casting Time: 2 seconds -- Recast Time: 20 seconds -- Magic Bursts on: Scission, Gravitation, and Darkness -- Combos: Clear Mind ----------------------------------------- require("scripts/globals/status"); require("scripts/globals/magic"); require("scripts/globals/bluemagic"); ----------------------------------------- -- OnMagicCastingCheck ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; ----------------------------------------- -- OnSpellCast ----------------------------------------- function onSpellCast(caster,target,spell) local dINT = caster:getStat(MOD_MND) - target:getStat(MOD_MND); local resist = applyResistance(caster,spell,target,dINT,37); if(resist > (0.0652)) then -- resisted! spell:setMsg(85); return 0; end if(target:hasStatusEffect(EFFECT_SLOW) == true) then -- no effect spell:setMsg(75); else target:addStatusEffect(EFFECT_SLOW,15,0,60); spell:setMsg(236); end return EFFECT_SLOW; end;
gpl-3.0
BeGe78/esood
vendor/bundle/ruby/3.0.0/gems/passenger-6.0.5/src/agent/Core/SpawningKit/Journey.h
17366
/* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2017-2018 Phusion Holding B.V. * * "Passenger", "Phusion Passenger" and "Union Station" are registered * trademarks of Phusion Holding B.V. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SPAWNING_KIT_HANDSHAKE_JOURNEY_H_ #define _PASSENGER_SPAWNING_KIT_HANDSHAKE_JOURNEY_H_ #include <map> #include <utility> #include <oxt/macros.hpp> #include <oxt/backtrace.hpp> #include <jsoncpp/json.h> #include <LoggingKit/LoggingKit.h> #include <StaticString.h> #include <SystemTools/SystemTime.h> #include <JsonTools/JsonUtils.h> #include <StrIntTools/StrIntUtils.h> namespace Passenger { namespace SpawningKit { using namespace std; /** * As explained in README.md, there are three possible journeys, * although each journey can have small variations (based on whether * a wrapper is used or not). */ enum JourneyType { SPAWN_DIRECTLY, START_PRELOADER, SPAWN_THROUGH_PRELOADER }; enum JourneyStep { // Steps in Passenger Core / SpawningKit SPAWNING_KIT_PREPARATION, SPAWNING_KIT_FORK_SUBPROCESS, SPAWNING_KIT_CONNECT_TO_PRELOADER, SPAWNING_KIT_SEND_COMMAND_TO_PRELOADER, SPAWNING_KIT_READ_RESPONSE_FROM_PRELOADER, SPAWNING_KIT_PARSE_RESPONSE_FROM_PRELOADER, SPAWNING_KIT_PROCESS_RESPONSE_FROM_PRELOADER, SPAWNING_KIT_HANDSHAKE_PERFORM, SPAWNING_KIT_FINISH, // Steps in preloader (when spawning a worker process) PRELOADER_PREPARATION, PRELOADER_FORK_SUBPROCESS, PRELOADER_SEND_RESPONSE, PRELOADER_FINISH, // Steps in subprocess SUBPROCESS_BEFORE_FIRST_EXEC, SUBPROCESS_SPAWN_ENV_SETUPPER_BEFORE_SHELL, SUBPROCESS_OS_SHELL, SUBPROCESS_SPAWN_ENV_SETUPPER_AFTER_SHELL, SUBPROCESS_EXEC_WRAPPER, SUBPROCESS_WRAPPER_PREPARATION, SUBPROCESS_APP_LOAD_OR_EXEC, SUBPROCESS_PREPARE_AFTER_FORKING_FROM_PRELOADER, SUBPROCESS_LISTEN, SUBPROCESS_FINISH, // Other UNKNOWN_JOURNEY_STEP }; enum JourneyStepState { /** * This step has not started yet. Will be visualized with an empty * placeholder. */ STEP_NOT_STARTED, /** * This step is currently in progress. Will be visualized with a spinner. */ STEP_IN_PROGRESS, /** * This step has already been performed successfully. Will be * visualized with a green tick. */ STEP_PERFORMED, /** * This step has failed. Will be visualized with a red mark. */ STEP_ERRORED, UNKNOWN_JOURNEY_STEP_STATE }; inline OXT_PURE StaticString journeyTypeToString(JourneyType type); inline OXT_PURE StaticString journeyStepToString(JourneyStep step); inline OXT_PURE string journeyStepToStringLowerCase(JourneyStep step); inline OXT_PURE StaticString journeyStepStateToString(JourneyStepState state); inline OXT_PURE JourneyStepState stringToJourneyStepState(const StaticString &value); inline OXT_PURE JourneyStep getFirstCoreJourneyStep() { return SPAWNING_KIT_PREPARATION; } inline OXT_PURE JourneyStep getLastCoreJourneyStep() { return SPAWNING_KIT_FINISH; } inline OXT_PURE JourneyStep getFirstPreloaderJourneyStep() { return PRELOADER_PREPARATION; } inline OXT_PURE JourneyStep getLastPreloaderJourneyStep() { return PRELOADER_FINISH; } inline OXT_PURE JourneyStep getFirstSubprocessJourneyStep() { return SUBPROCESS_BEFORE_FIRST_EXEC; } inline OXT_PURE JourneyStep getLastSubprocessJourneyStep() { return SUBPROCESS_FINISH; } class JourneyStepInfo { private: MonotonicTimeUsec getEndTime(const JourneyStepInfo *nextStepInfo) const { if (nextStepInfo != NULL && nextStepInfo->beginTime != 0) { return nextStepInfo->beginTime; } else { return endTime; } } public: JourneyStep step, nextStep; JourneyStepState state; MonotonicTimeUsec beginTime; MonotonicTimeUsec endTime; JourneyStepInfo(JourneyStep _step, JourneyStepState _state = STEP_NOT_STARTED) : step(_step), nextStep(UNKNOWN_JOURNEY_STEP), state(_state), beginTime(0), endTime(0) { } unsigned long long usecDuration(const JourneyStepInfo *nextStepInfo) const { if (getEndTime(nextStepInfo) >= beginTime) { return getEndTime(nextStepInfo) - beginTime; } else { return 0; } } Json::Value inspectAsJson(const JourneyStepInfo *nextStepInfo, MonotonicTimeUsec monoNow, unsigned long long now) const { Json::Value doc; doc["state"] = journeyStepStateToString(state).toString(); if (beginTime != 0) { doc["begin_time"] = monoTimeToJson(beginTime, monoNow, now); } if (endTime != 0) { doc["end_time"] = monoTimeToJson(endTime, monoNow, now); doc["duration"] = usecDuration(nextStepInfo) / 1000000.0; } return doc; } }; /** * For an introduction see README.md, sections: * * - "The Journey class" * - "Subprocess journey logging" */ class Journey { public: typedef map<JourneyStep, JourneyStepInfo> Map; private: JourneyType type; bool usingWrapper; Map steps; void insertStep(JourneyStep step, bool first = false) { steps.insert(make_pair(step, JourneyStepInfo(step))); if (!first) { Map::iterator prev = steps.end(); prev--; prev--; prev->second.nextStep = step; } } void fillInStepsForSpawnDirectlyJourney() { insertStep(SPAWNING_KIT_PREPARATION, true); insertStep(SPAWNING_KIT_FORK_SUBPROCESS); insertStep(SPAWNING_KIT_HANDSHAKE_PERFORM); insertStep(SPAWNING_KIT_FINISH); insertStep(SUBPROCESS_BEFORE_FIRST_EXEC, true); insertStep(SUBPROCESS_SPAWN_ENV_SETUPPER_BEFORE_SHELL); insertStep(SUBPROCESS_OS_SHELL); insertStep(SUBPROCESS_SPAWN_ENV_SETUPPER_AFTER_SHELL); if (usingWrapper) { insertStep(SUBPROCESS_EXEC_WRAPPER); insertStep(SUBPROCESS_WRAPPER_PREPARATION); } insertStep(SUBPROCESS_APP_LOAD_OR_EXEC); insertStep(SUBPROCESS_LISTEN); insertStep(SUBPROCESS_FINISH); } void fillInStepsForPreloaderStartJourney() { insertStep(SPAWNING_KIT_PREPARATION, true); insertStep(SPAWNING_KIT_FORK_SUBPROCESS); insertStep(SPAWNING_KIT_HANDSHAKE_PERFORM); insertStep(SPAWNING_KIT_FINISH); insertStep(SUBPROCESS_BEFORE_FIRST_EXEC, true); insertStep(SUBPROCESS_SPAWN_ENV_SETUPPER_BEFORE_SHELL); insertStep(SUBPROCESS_OS_SHELL); insertStep(SUBPROCESS_SPAWN_ENV_SETUPPER_AFTER_SHELL); if (usingWrapper) { insertStep(SUBPROCESS_EXEC_WRAPPER); insertStep(SUBPROCESS_WRAPPER_PREPARATION); } insertStep(SUBPROCESS_APP_LOAD_OR_EXEC); insertStep(SUBPROCESS_LISTEN); insertStep(SUBPROCESS_FINISH); } void fillInStepsForSpawnThroughPreloaderJourney() { insertStep(SPAWNING_KIT_PREPARATION, true); insertStep(SPAWNING_KIT_CONNECT_TO_PRELOADER); insertStep(SPAWNING_KIT_SEND_COMMAND_TO_PRELOADER); insertStep(SPAWNING_KIT_READ_RESPONSE_FROM_PRELOADER); insertStep(SPAWNING_KIT_PARSE_RESPONSE_FROM_PRELOADER); insertStep(SPAWNING_KIT_PROCESS_RESPONSE_FROM_PRELOADER); insertStep(SPAWNING_KIT_HANDSHAKE_PERFORM); insertStep(SPAWNING_KIT_FINISH); insertStep(PRELOADER_PREPARATION, true); insertStep(PRELOADER_FORK_SUBPROCESS); insertStep(PRELOADER_SEND_RESPONSE); insertStep(PRELOADER_FINISH); insertStep(SUBPROCESS_PREPARE_AFTER_FORKING_FROM_PRELOADER, true); insertStep(SUBPROCESS_LISTEN); insertStep(SUBPROCESS_FINISH); } JourneyStepInfo &getStepInfoMutable(JourneyStep step) { Map::iterator it = steps.find(step); if (it == steps.end()) { throw RuntimeException("Invalid step " + journeyStepToString(step)); } return it->second; } public: Journey(JourneyType _type, bool _usingWrapper) : type(_type), usingWrapper(_usingWrapper) { switch (_type) { case SPAWN_DIRECTLY: fillInStepsForSpawnDirectlyJourney(); break; case START_PRELOADER: fillInStepsForPreloaderStartJourney(); break; case SPAWN_THROUGH_PRELOADER: fillInStepsForSpawnThroughPreloaderJourney(); break; default: P_BUG("Unknown journey type " << toString((int) _type)); break; } } JourneyType getType() const { return type; } bool isUsingWrapper() const { return usingWrapper; } bool hasStep(JourneyStep step) const { Map::const_iterator it = steps.find(step); return it != steps.end(); } const JourneyStepInfo &getStepInfo(JourneyStep step) const { Map::const_iterator it = steps.find(step); if (it == steps.end()) { throw RuntimeException("Invalid step " + journeyStepToString(step)); } return it->second; } JourneyStep getFirstFailedStep() const { Map::const_iterator it, end = steps.end(); for (it = steps.begin(); it != end; it++) { if (it->second.state == STEP_ERRORED) { return it->first; } } return UNKNOWN_JOURNEY_STEP; } void setStepNotStarted(JourneyStep step, bool force = false) { JourneyStepInfo &info = getStepInfoMutable(step); if (info.state == STEP_NOT_STARTED || info.state == STEP_IN_PROGRESS || force) { info.state = STEP_NOT_STARTED; info.beginTime = 0; info.endTime = 0; } else { throw RuntimeException("Unable to change state for journey step " + journeyStepToString(step) + " because it wasn't already in progress"); } } void setStepInProgress(JourneyStep step, bool force = false) { JourneyStepInfo &info = getStepInfoMutable(step); if (info.state == STEP_IN_PROGRESS) { return; } else if (info.state == STEP_NOT_STARTED || force) { info.state = STEP_IN_PROGRESS; // When `force` is true, we don't want to overwrite the previous endTime. if (info.endTime == 0) { info.beginTime = SystemTime::getMonotonicUsecWithGranularity<SystemTime::GRAN_10MSEC>(); } } else { throw RuntimeException("Unable to change state for journey step " + journeyStepToString(step) + " because it was already in progress or completed"); } } void setStepPerformed(JourneyStep step, bool force = false) { JourneyStepInfo &info = getStepInfoMutable(step); if (info.state == STEP_PERFORMED) { return; } else if (info.state == STEP_IN_PROGRESS || true) { info.state = STEP_PERFORMED; // When `force` is true, we don't want to overwrite the previous endTime. if (info.endTime == 0) { info.endTime = SystemTime::getMonotonicUsecWithGranularity<SystemTime::GRAN_10MSEC>(); if (info.beginTime == 0) { info.beginTime = info.endTime; } } } else { throw RuntimeException("Unable to change state for journey step " + journeyStepToString(step) + " because it wasn't already in progress"); } } void setStepErrored(JourneyStep step, bool force = false) { JourneyStepInfo &info = getStepInfoMutable(step); if (info.state == STEP_ERRORED) { return; } else if (info.state == STEP_IN_PROGRESS || force) { info.state = STEP_ERRORED; // When `force` is true, we don't want to overwrite the previous endTime. if (info.endTime == 0) { info.endTime = SystemTime::getMonotonicUsecWithGranularity<SystemTime::GRAN_10MSEC>(); if (info.beginTime == 0) { info.beginTime = info.endTime; } } } else { throw RuntimeException("Unable to change state for journey step " + journeyStepToString(step) + " because it wasn't already in progress"); } } void setStepBeginTime(JourneyStep step, MonotonicTimeUsec timestamp) { JourneyStepInfo &info = getStepInfoMutable(step); info.beginTime = timestamp; } void setStepEndTime(JourneyStep step, MonotonicTimeUsec timestamp) { JourneyStepInfo &info = getStepInfoMutable(step); info.endTime = timestamp; } void reset() { Map::iterator it, end = steps.end(); for (it = steps.begin(); it != end; it++) { it->second.state = STEP_NOT_STARTED; it->second.beginTime = 0; it->second.endTime = 0; } } Json::Value inspectAsJson() const { Json::Value doc, steps; MonotonicTimeUsec monoNow = SystemTime::getMonotonicUsec(); unsigned long long now = SystemTime::getUsec(); doc["type"] = journeyTypeToString(type).toString(); Map::const_iterator it, end = this->steps.end(); for (it = this->steps.begin(); it != end; it++) { const JourneyStep step = it->first; const JourneyStepInfo &info = it->second; const JourneyStepInfo *nextStepInfo = NULL; if (info.nextStep != UNKNOWN_JOURNEY_STEP) { nextStepInfo = &this->steps.find(info.nextStep)->second; } steps[journeyStepToString(step).toString()] = info.inspectAsJson(nextStepInfo, monoNow, now); } doc["steps"] = steps; return doc; } }; inline OXT_PURE StaticString journeyTypeToString(JourneyType type) { switch (type) { case SPAWN_DIRECTLY: return P_STATIC_STRING("SPAWN_DIRECTLY"); case START_PRELOADER: return P_STATIC_STRING("START_PRELOADER"); case SPAWN_THROUGH_PRELOADER: return P_STATIC_STRING("SPAWN_THROUGH_PRELOADER"); default: return P_STATIC_STRING("UNKNOWN_JOURNEY_TYPE"); } } inline OXT_PURE StaticString journeyStepToString(JourneyStep step) { switch (step) { case SPAWNING_KIT_PREPARATION: return P_STATIC_STRING("SPAWNING_KIT_PREPARATION"); case SPAWNING_KIT_FORK_SUBPROCESS: return P_STATIC_STRING("SPAWNING_KIT_FORK_SUBPROCESS"); case SPAWNING_KIT_CONNECT_TO_PRELOADER: return P_STATIC_STRING("SPAWNING_KIT_CONNECT_TO_PRELOADER"); case SPAWNING_KIT_SEND_COMMAND_TO_PRELOADER: return P_STATIC_STRING("SPAWNING_KIT_SEND_COMMAND_TO_PRELOADER"); case SPAWNING_KIT_READ_RESPONSE_FROM_PRELOADER: return P_STATIC_STRING("SPAWNING_KIT_READ_RESPONSE_FROM_PRELOADER"); case SPAWNING_KIT_PARSE_RESPONSE_FROM_PRELOADER: return P_STATIC_STRING("SPAWNING_KIT_PARSE_RESPONSE_FROM_PRELOADER"); case SPAWNING_KIT_PROCESS_RESPONSE_FROM_PRELOADER: return P_STATIC_STRING("SPAWNING_KIT_PROCESS_RESPONSE_FROM_PRELOADER"); case SPAWNING_KIT_HANDSHAKE_PERFORM: return P_STATIC_STRING("SPAWNING_KIT_HANDSHAKE_PERFORM"); case SPAWNING_KIT_FINISH: return P_STATIC_STRING("SPAWNING_KIT_FINISH"); case PRELOADER_PREPARATION: return P_STATIC_STRING("PRELOADER_PREPARATION"); case PRELOADER_FORK_SUBPROCESS: return P_STATIC_STRING("PRELOADER_FORK_SUBPROCESS"); case PRELOADER_SEND_RESPONSE: return P_STATIC_STRING("PRELOADER_SEND_RESPONSE"); case PRELOADER_FINISH: return P_STATIC_STRING("PRELOADER_FINISH"); case SUBPROCESS_BEFORE_FIRST_EXEC: return P_STATIC_STRING("SUBPROCESS_BEFORE_FIRST_EXEC"); case SUBPROCESS_SPAWN_ENV_SETUPPER_BEFORE_SHELL: return P_STATIC_STRING("SUBPROCESS_SPAWN_ENV_SETUPPER_BEFORE_SHELL"); case SUBPROCESS_OS_SHELL: return P_STATIC_STRING("SUBPROCESS_OS_SHELL"); case SUBPROCESS_SPAWN_ENV_SETUPPER_AFTER_SHELL: return P_STATIC_STRING("SUBPROCESS_SPAWN_ENV_SETUPPER_AFTER_SHELL"); case SUBPROCESS_EXEC_WRAPPER: return P_STATIC_STRING("SUBPROCESS_EXEC_WRAPPER"); case SUBPROCESS_WRAPPER_PREPARATION: return P_STATIC_STRING("SUBPROCESS_WRAPPER_PREPARATION"); case SUBPROCESS_APP_LOAD_OR_EXEC: return P_STATIC_STRING("SUBPROCESS_APP_LOAD_OR_EXEC"); case SUBPROCESS_PREPARE_AFTER_FORKING_FROM_PRELOADER: return P_STATIC_STRING("SUBPROCESS_PREPARE_AFTER_FORKING_FROM_PRELOADER"); case SUBPROCESS_LISTEN: return P_STATIC_STRING("SUBPROCESS_LISTEN"); case SUBPROCESS_FINISH: return P_STATIC_STRING("SUBPROCESS_FINISH"); default: return P_STATIC_STRING("UNKNOWN_JOURNEY_STEP"); } } inline OXT_PURE string journeyStepToStringLowerCase(JourneyStep step) { StaticString stepString = journeyStepToString(step); DynamicBuffer stepStringLcBuffer(stepString.size()); convertLowerCase((const unsigned char *) stepString.data(), (unsigned char *) stepStringLcBuffer.data, stepString.size()); return string(stepStringLcBuffer.data, stepString.size()); } inline OXT_PURE StaticString journeyStepStateToString(JourneyStepState state) { switch (state) { case STEP_NOT_STARTED: return P_STATIC_STRING("STEP_NOT_STARTED"); case STEP_IN_PROGRESS: return P_STATIC_STRING("STEP_IN_PROGRESS"); case STEP_PERFORMED: return P_STATIC_STRING("STEP_PERFORMED"); case STEP_ERRORED: return P_STATIC_STRING("STEP_ERRORED"); default: return P_STATIC_STRING("UNKNOWN_JOURNEY_STEP_STATE"); } } inline OXT_PURE JourneyStepState stringToJourneyStepState(const StaticString &value) { if (value == P_STATIC_STRING("STEP_NOT_STARTED")) { return STEP_NOT_STARTED; } else if (value == P_STATIC_STRING("STEP_IN_PROGRESS")) { return STEP_IN_PROGRESS; } else if (value == P_STATIC_STRING("STEP_PERFORMED")) { return STEP_PERFORMED; } else if (value == P_STATIC_STRING("STEP_ERRORED")) { return STEP_ERRORED; } else { return UNKNOWN_JOURNEY_STEP_STATE; } } } // namespace SpawningKit } // namespace Passenger #endif /* _PASSENGER_SPAWNING_KIT_HANDSHAKE_JOURNEY_H_ */
gpl-3.0
liyouchang/webrtc-qt
webrtc/test/channel_transport/channel_transport.cc
4688
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/test/channel_transport/include/channel_transport.h" #include <stdio.h> #if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) #include "testing/gtest/include/gtest/gtest.h" #endif #include "webrtc/test/channel_transport/udp_transport.h" #include "webrtc/video_engine/include/vie_network.h" #include "webrtc/video_engine/vie_defines.h" #include "webrtc/voice_engine/include/voe_network.h" #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) #undef NDEBUG #include <assert.h> #endif namespace webrtc { namespace test { VoiceChannelTransport::VoiceChannelTransport(VoENetwork* voe_network, int channel) : channel_(channel), voe_network_(voe_network) { uint8_t socket_threads = 1; socket_transport_ = UdpTransport::Create(channel, socket_threads); int registered = voe_network_->RegisterExternalTransport(channel, *socket_transport_); #if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) EXPECT_EQ(0, registered); #else assert(registered == 0); #endif } VoiceChannelTransport::~VoiceChannelTransport() { voe_network_->DeRegisterExternalTransport(channel_); UdpTransport::Destroy(socket_transport_); } void VoiceChannelTransport::IncomingRTPPacket( const int8_t* incoming_rtp_packet, const int32_t packet_length, const char* /*from_ip*/, const uint16_t /*from_port*/) { voe_network_->ReceivedRTPPacket(channel_, incoming_rtp_packet, packet_length); } void VoiceChannelTransport::IncomingRTCPPacket( const int8_t* incoming_rtcp_packet, const int32_t packet_length, const char* /*from_ip*/, const uint16_t /*from_port*/) { voe_network_->ReceivedRTCPPacket(channel_, incoming_rtcp_packet, packet_length); } int VoiceChannelTransport::SetLocalReceiver(uint16_t rtp_port) { int return_value = socket_transport_->InitializeReceiveSockets(this, rtp_port); if (return_value == 0) { return socket_transport_->StartReceiving(kViENumReceiveSocketBuffers); } return return_value; } int VoiceChannelTransport::SetSendDestination(const char* ip_address, uint16_t rtp_port) { return socket_transport_->InitializeSendSockets(ip_address, rtp_port); } VideoChannelTransport::VideoChannelTransport(ViENetwork* vie_network, int channel) : channel_(channel), vie_network_(vie_network) { uint8_t socket_threads = 1; socket_transport_ = UdpTransport::Create(channel, socket_threads); int registered = vie_network_->RegisterSendTransport(channel, *socket_transport_); #if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS) EXPECT_EQ(0, registered); #else assert(registered == 0); #endif } VideoChannelTransport::~VideoChannelTransport() { vie_network_->DeregisterSendTransport(channel_); UdpTransport::Destroy(socket_transport_); } void VideoChannelTransport::IncomingRTPPacket( const int8_t* incoming_rtp_packet, const int32_t packet_length, const char* /*from_ip*/, const uint16_t /*from_port*/) { vie_network_->ReceivedRTPPacket( channel_, incoming_rtp_packet, packet_length, PacketTime()); } void VideoChannelTransport::IncomingRTCPPacket( const int8_t* incoming_rtcp_packet, const int32_t packet_length, const char* /*from_ip*/, const uint16_t /*from_port*/) { vie_network_->ReceivedRTCPPacket(channel_, incoming_rtcp_packet, packet_length); } int VideoChannelTransport::SetLocalReceiver(uint16_t rtp_port) { int return_value = socket_transport_->InitializeReceiveSockets(this, rtp_port); if (return_value == 0) { return socket_transport_->StartReceiving(kViENumReceiveSocketBuffers); } return return_value; } int VideoChannelTransport::SetSendDestination(const char* ip_address, uint16_t rtp_port) { return socket_transport_->InitializeSendSockets(ip_address, rtp_port); } } // namespace test } // namespace webrtc
gpl-3.0
TeamExodus/external_nano
src/rcfile.c
36772
/* $Id: rcfile.c 5412 2015-11-15 06:43:54Z astyanax $ */ /************************************************************************** * rcfile.c * * * * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, * * 2010, 2011, 2013, 2014 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3, or (at your option) * * any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * * 02110-1301, USA. * * * **************************************************************************/ #include "proto.h" #include <glob.h> #include <stdarg.h> #include <string.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <ctype.h> #ifndef DISABLE_NANORC static const rcoption rcopts[] = { {"boldtext", BOLD_TEXT}, #ifndef DISABLE_JUSTIFY {"brackets", 0}, #endif {"const", CONST_UPDATE}, #ifndef DISABLE_WRAPJUSTIFY {"fill", 0}, #endif #ifndef DISABLE_HISTORIES {"historylog", HISTORYLOG}, #endif {"morespace", MORE_SPACE}, #ifndef DISABLE_MOUSE {"mouse", USE_MOUSE}, #endif #ifndef DISABLE_MULTIBUFFER {"multibuffer", MULTIBUFFER}, #endif {"nofollow", NOFOLLOW_SYMLINKS}, {"nohelp", NO_HELP}, {"nonewlines", NO_NEWLINES}, #ifndef DISABLE_WRAPPING {"nowrap", NO_WRAP}, #endif #ifndef DISABLE_OPERATINGDIR {"operatingdir", 0}, #endif #ifndef DISABLE_HISTORIES {"poslog", POS_HISTORY}, #endif {"preserve", PRESERVE}, #ifndef DISABLE_JUSTIFY {"punct", 0}, {"quotestr", 0}, #endif {"rebinddelete", REBIND_DELETE}, {"rebindkeypad", REBIND_KEYPAD}, #ifdef HAVE_REGEX_H {"regexp", USE_REGEXP}, #endif #ifndef DISABLE_SPELLER {"speller", 0}, #endif {"suspend", SUSPEND}, {"tabsize", 0}, {"tempfile", TEMP_FILE}, {"view", VIEW_MODE}, #ifndef NANO_TINY {"allow_insecure_backup", INSECURE_BACKUP}, {"autoindent", AUTOINDENT}, {"backup", BACKUP_FILE}, {"backupdir", 0}, {"backwards", BACKWARDS_SEARCH}, {"casesensitive", CASE_SENSITIVE}, {"cut", CUT_TO_END}, {"locking", LOCKING}, {"matchbrackets", 0}, {"noconvert", NO_CONVERT}, {"quickblank", QUICK_BLANK}, {"quiet", QUIET}, {"smarthome", SMART_HOME}, {"smooth", SMOOTH_SCROLL}, {"softwrap", SOFTWRAP}, {"tabstospaces", TABS_TO_SPACES}, {"whitespace", 0}, {"wordbounds", WORD_BOUNDS}, #endif #ifndef DISABLE_COLOR {"titlecolor", 0}, {"statuscolor", 0}, {"keycolor", 0}, {"functioncolor", 0}, #endif {NULL, 0} }; static bool errors = FALSE; /* Whether we got any errors while parsing an rcfile. */ static size_t lineno = 0; /* If we did, the line number where the last error occurred. */ static char *nanorc = NULL; /* The path to the rcfile we're parsing. */ #ifndef DISABLE_COLOR static syntaxtype *endsyntax = NULL; /* The end of the list of syntaxes. */ static colortype *endcolor = NULL; /* The end of the color list for the current syntax. */ #endif /* We have an error in some part of the rcfile. Print the error message * on stderr, and then make the user hit Enter to continue starting * nano. */ void rcfile_error(const char *msg, ...) { va_list ap; if (ISSET(QUIET)) return; fprintf(stderr, "\n"); if (lineno > 0) { errors = TRUE; fprintf(stderr, _("Error in %s on line %lu: "), nanorc, (unsigned long)lineno); } va_start(ap, msg); vfprintf(stderr, _(msg), ap); va_end(ap); fprintf(stderr, "\n"); } #endif /* !DISABLE_NANORC */ #if !defined(DISABLE_NANORC) || !defined(DISABLE_HISTORIES) /* Parse the next word from the string, null-terminate it, and return * a pointer to the first character after the null terminator. The * returned pointer will point to '\0' if we hit the end of the line. */ char *parse_next_word(char *ptr) { while (!isblank(*ptr) && *ptr != '\0') ptr++; if (*ptr == '\0') return ptr; /* Null-terminate and advance ptr. */ *ptr++ = '\0'; while (isblank(*ptr)) ptr++; return ptr; } #endif /* !DISABLE_NANORC || !DISABLE_HISTORIES */ #ifndef DISABLE_NANORC /* Parse an argument, with optional quotes, after a keyword that takes * one. If the next word starts with a ", we say that it ends with the * last " of the line. Otherwise, we interpret it as usual, so that the * arguments can contain "'s too. */ char *parse_argument(char *ptr) { const char *ptr_save = ptr; char *last_quote = NULL; assert(ptr != NULL); if (*ptr != '"') return parse_next_word(ptr); do { ptr++; if (*ptr == '"') last_quote = ptr; } while (*ptr != '\0'); if (last_quote == NULL) { if (*ptr == '\0') ptr = NULL; else *ptr++ = '\0'; rcfile_error(N_("Argument '%s' has an unterminated \""), ptr_save); } else { *last_quote = '\0'; ptr = last_quote + 1; } if (ptr != NULL) while (isblank(*ptr)) ptr++; return ptr; } #ifndef DISABLE_COLOR /* Parse the next regex string from the line at ptr, and return it. */ char *parse_next_regex(char *ptr) { assert(ptr != NULL); /* Continue until the end of the line, or a " followed by a space, a * blank character, or \0. */ while ((*ptr != '"' || (!isblank(*(ptr + 1)) && *(ptr + 1) != '\0')) && *ptr != '\0') ptr++; assert(*ptr == '"' || *ptr == '\0'); if (*ptr == '\0') { rcfile_error( N_("Regex strings must begin and end with a \" character")); return NULL; } /* Null-terminate and advance ptr. */ *ptr++ = '\0'; while (isblank(*ptr)) ptr++; return ptr; } /* Compile the regular expression regex to see if it's valid. Return * TRUE if it is, or FALSE otherwise. */ bool nregcomp(const char *regex, int eflags) { regex_t preg; const char *r = fixbounds(regex); int rc = regcomp(&preg, r, REG_EXTENDED | eflags); if (rc != 0) { size_t len = regerror(rc, &preg, NULL, 0); char *str = charalloc(len); regerror(rc, &preg, str, len); rcfile_error(N_("Bad regex \"%s\": %s"), r, str); free(str); } regfree(&preg); return (rc == 0); } /* Parse the next syntax string from the line at ptr, and add it to the * global list of color syntaxes. */ void parse_syntax(char *ptr) { const char *fileregptr = NULL, *nameptr = NULL; syntaxtype *tmpsyntax, *prev_syntax; regexlisttype *endext = NULL; /* The end of the extensions list for this syntax. */ assert(ptr != NULL); if (*ptr == '\0') { rcfile_error(N_("Missing syntax name")); return; } if (*ptr != '"') { rcfile_error( N_("Regex strings must begin and end with a \" character")); return; } ptr++; nameptr = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) return; /* Search for a duplicate syntax name. If we find one, free it, so * that we always use the last syntax with a given name. */ prev_syntax = NULL; for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) { if (strcmp(nameptr, tmpsyntax->desc) == 0) { syntaxtype *old_syntax = tmpsyntax; if (endsyntax == tmpsyntax) endsyntax = prev_syntax; tmpsyntax = tmpsyntax->next; if (prev_syntax != NULL) prev_syntax->next = tmpsyntax; else syntaxes = tmpsyntax; free(old_syntax->desc); free(old_syntax); break; } prev_syntax = tmpsyntax; } if (syntaxes == NULL) { syntaxes = (syntaxtype *)nmalloc(sizeof(syntaxtype)); endsyntax = syntaxes; } else { endsyntax->next = (syntaxtype *)nmalloc(sizeof(syntaxtype)); endsyntax = endsyntax->next; #ifdef DEBUG fprintf(stderr, "Adding new syntax after first one\n"); #endif } endsyntax->desc = mallocstrcpy(NULL, nameptr); endsyntax->color = NULL; endcolor = NULL; endsyntax->extensions = NULL; endsyntax->headers = NULL; endsyntax->magics = NULL; endsyntax->next = NULL; endsyntax->nmultis = 0; endsyntax->linter = NULL; endsyntax->formatter = NULL; #ifdef DEBUG fprintf(stderr, "Starting a new syntax type: \"%s\"\n", nameptr); #endif /* The "none" syntax is the same as not having a syntax at all, so * we can't assign any extensions or colors to it. */ if (strcmp(endsyntax->desc, "none") == 0) { rcfile_error(N_("The \"none\" syntax is reserved")); return; } /* The default syntax should have no associated extensions. */ if (strcmp(endsyntax->desc, "default") == 0 && *ptr != '\0') { rcfile_error( N_("The \"default\" syntax must take no extensions")); return; } /* Now load the extension regexes into their part of the struct. */ while (*ptr != '\0') { regexlisttype *newext; while (*ptr != '"' && *ptr != '\0') ptr++; if (*ptr == '\0') return; ptr++; fileregptr = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; newext = (regexlisttype *)nmalloc(sizeof(regexlisttype)); /* Save the extension regex if it's valid. */ if (nregcomp(fileregptr, REG_NOSUB)) { newext->ext_regex = mallocstrcpy(NULL, fileregptr); newext->ext = NULL; if (endext == NULL) endsyntax->extensions = newext; else endext->next = newext; endext = newext; endext->next = NULL; } else free(newext); } } #endif /* !DISABLE_COLOR */ int check_bad_binding(sc *s) { #define BADLISTLEN 1 key_type badtypes[BADLISTLEN] = {META}; int badseqs[BADLISTLEN] = { 91 }; int i; for (i = 0; i < BADLISTLEN; i++) if (s->type == badtypes[i] && s->seq == badseqs[i]) return 1; return 0; } /* Check whether the given executable function is "universal" (meaning * any horizontal movement or deletion) and thus is present in almost * all menus. */ bool is_universal(void (*func)) { if (func == do_left || func == do_right || func == do_home || func == do_end || #ifndef NANO_TINY func == do_prev_word_void || func == do_next_word_void || #endif func == do_verbatim_input || func == do_cut_text_void || func == do_delete || func == do_backspace || func == do_tab || func == do_enter) return TRUE; else return FALSE; } /* Bind or unbind a key combo, to or from a function. */ void parse_binding(char *ptr, bool dobind) { char *keyptr = NULL, *keycopy = NULL, *funcptr = NULL, *menuptr = NULL; sc *s, *newsc = NULL; int menu; assert(ptr != NULL); #ifdef DEBUG fprintf(stderr, "Starting the rebinding code...\n"); #endif if (*ptr == '\0') { rcfile_error(N_("Missing key name")); return; } keyptr = ptr; ptr = parse_next_word(ptr); keycopy = mallocstrcpy(NULL, keyptr); if (strlen(keycopy) < 2) { rcfile_error(N_("Key name is too short")); return; } /* Uppercase only the first two or three characters of the key name. */ keycopy[0] = toupper(keycopy[0]); keycopy[1] = toupper(keycopy[1]); if (keycopy[0] == 'M' && keycopy[1] == '-') { if (strlen(keycopy) > 2) keycopy[2] = toupper(keycopy[2]); else { rcfile_error(N_("Key name is too short")); return; } } /* Allow the codes for Insert and Delete to be rebound, but apart * from those two only Control, Meta and Function sequences. */ if (!strcasecmp(keycopy, "Ins") || !strcasecmp(keycopy, "Del")) keycopy[1] = tolower(keycopy[1]); else if (keycopy[0] != '^' && keycopy[0] != 'M' && keycopy[0] != 'F') { rcfile_error(N_("Key name must begin with \"^\", \"M\", or \"F\"")); return; } if (dobind) { funcptr = ptr; ptr = parse_next_word(ptr); if (funcptr[0] == '\0') { rcfile_error(N_("Must specify a function to bind the key to")); return; } } menuptr = ptr; ptr = parse_next_word(ptr); if (menuptr[0] == '\0') { /* TRANSLATORS: Do not translate the word "all". */ rcfile_error(N_("Must specify a menu (or \"all\") in which to bind/unbind the key")); return; } if (dobind) { newsc = strtosc(funcptr); if (newsc == NULL) { rcfile_error(N_("Cannot map name \"%s\" to a function"), funcptr); return; } } menu = strtomenu(menuptr); if (menu < 1) { rcfile_error(N_("Cannot map name \"%s\" to a menu"), menuptr); return; } #ifdef DEBUG if (dobind) fprintf(stderr, "newsc address is now %ld, assigned func = %ld, menu = %x\n", (long)&newsc, (long)newsc->scfunc, menu); else fprintf(stderr, "unbinding \"%s\" from menu %x\n", keycopy, menu); #endif if (dobind) { subnfunc *f; int mask = 0; /* Tally up the menus where the function exists. */ for (f = allfuncs; f != NULL; f = f->next) if (f->scfunc == newsc->scfunc) mask = mask | f->menus; /* Handle the special case of the toggles. */ if (newsc->scfunc == do_toggle_void) mask = MMAIN; /* Now limit the given menu to those where the function exists. */ if (is_universal(newsc->scfunc)) menu = menu & MMOST; else menu = menu & mask; if (!menu) { rcfile_error(N_("Function '%s' does not exist in menu '%s'"), funcptr, menuptr); free(newsc); return; } newsc->keystr = keycopy; newsc->menu = menu; newsc->type = strtokeytype(newsc->keystr); assign_keyinfo(newsc); #ifdef DEBUG fprintf(stderr, "s->keystr = \"%s\"\n", newsc->keystr); fprintf(stderr, "s->seq = \"%d\"\n", newsc->seq); #endif if (check_bad_binding(newsc)) { rcfile_error(N_("Sorry, keystroke \"%s\" may not be rebound"), newsc->keystr); free(newsc); return; } } /* Now find and delete any existing same shortcut in the menu(s). */ for (s = sclist; s != NULL; s = s->next) { if (((s->menu & menu)) && !strcmp(s->keystr, keycopy)) { #ifdef DEBUG fprintf(stderr, "deleting entry from menu %x\n", s->menu); #endif s->menu &= ~menu; } } if (dobind) { /* If this is a toggle, copy its sequence number. */ if (newsc->scfunc == do_toggle_void) { for (s = sclist; s != NULL; s = s->next) if (s->scfunc == do_toggle_void && s->toggle == newsc->toggle) newsc->ordinal = s->ordinal; } else newsc->ordinal = 0; /* Add the new shortcut at the start of the list. */ newsc->next = sclist; sclist = newsc; } } #ifndef DISABLE_COLOR /* Read and parse additional syntax files. */ static void _parse_include(char *file) { struct stat rcinfo; FILE *rcstream; /* Can't get the specified file's full path because it may screw up * our cwd depending on the parent directories' permissions (see * Savannah bug #25297). */ /* Don't open directories, character files, or block files. */ if (stat(file, &rcinfo) != -1) { if (S_ISDIR(rcinfo.st_mode) || S_ISCHR(rcinfo.st_mode) || S_ISBLK(rcinfo.st_mode)) { rcfile_error(S_ISDIR(rcinfo.st_mode) ? _("\"%s\" is a directory") : _("\"%s\" is a device file"), file); } } /* Open the new syntax file. */ if ((rcstream = fopen(file, "rb")) == NULL) { rcfile_error(_("Error reading %s: %s"), file, strerror(errno)); return; } /* Use the name and line number position of the new syntax file * while parsing it, so we can know where any errors in it are. */ nanorc = file; lineno = 0; #ifdef DEBUG fprintf(stderr, "Parsing file \"%s\"\n", file); #endif parse_rcfile(rcstream, TRUE); } void parse_include(char *ptr) { char *option, *nanorc_save = nanorc, *expanded; size_t lineno_save = lineno, i; glob_t files; option = ptr; if (*option == '"') option++; ptr = parse_argument(ptr); /* Expand tildes first, then the globs. */ expanded = real_dir_from_tilde(option); if (glob(expanded, GLOB_ERR|GLOB_NOSORT, NULL, &files) == 0) { for (i = 0; i < files.gl_pathc; ++i) _parse_include(files.gl_pathv[i]); } else { rcfile_error(_("Error expanding %s: %s"), option, strerror(errno)); } globfree(&files); free(expanded); /* We're done with the new syntax file. Restore the original * filename and line number position. */ nanorc = nanorc_save; lineno = lineno_save; } /* Return the short value corresponding to the color named in colorname, * and set bright to TRUE if that color is bright. */ short color_to_short(const char *colorname, bool *bright) { short mcolor = -1; assert(colorname != NULL && bright != NULL); if (strncasecmp(colorname, "bright", 6) == 0) { *bright = TRUE; colorname += 6; } if (strcasecmp(colorname, "green") == 0) mcolor = COLOR_GREEN; else if (strcasecmp(colorname, "red") == 0) mcolor = COLOR_RED; else if (strcasecmp(colorname, "blue") == 0) mcolor = COLOR_BLUE; else if (strcasecmp(colorname, "white") == 0) mcolor = COLOR_WHITE; else if (strcasecmp(colorname, "yellow") == 0) mcolor = COLOR_YELLOW; else if (strcasecmp(colorname, "cyan") == 0) mcolor = COLOR_CYAN; else if (strcasecmp(colorname, "magenta") == 0) mcolor = COLOR_MAGENTA; else if (strcasecmp(colorname, "black") == 0) mcolor = COLOR_BLACK; else rcfile_error(N_("Color \"%s\" not understood.\n" "Valid colors are \"green\", \"red\", \"blue\",\n" "\"white\", \"yellow\", \"cyan\", \"magenta\" and\n" "\"black\", with the optional prefix \"bright\"\n" "for foreground colors."), colorname); return mcolor; } /* Parse the color string in the line at ptr, and add it to the current * file's associated colors. If icase is TRUE, treat the color string * as case insensitive. */ void parse_colors(char *ptr, bool icase) { short fg, bg; bool bright = FALSE; char *fgstr; assert(ptr != NULL); if (syntaxes == NULL) { rcfile_error( N_("Cannot add a color command without a syntax command")); return; } if (*ptr == '\0') { rcfile_error(N_("Missing color name")); return; } fgstr = ptr; ptr = parse_next_word(ptr); if (!parse_color_names(fgstr, &fg, &bg, &bright)) return; if (*ptr == '\0') { rcfile_error(N_("Missing regex string")); return; } /* Now for the fun part. Start adding regexes to individual strings * in the colorstrings array, woo! */ while (ptr != NULL && *ptr != '\0') { colortype *newcolor; /* The container for a color plus its regexes. */ bool cancelled = FALSE; /* The start expression was bad. */ bool expectend = FALSE; /* Do we expect an end= line? */ if (strncasecmp(ptr, "start=", 6) == 0) { ptr += 6; expectend = TRUE; } if (*ptr != '"') { rcfile_error( N_("Regex strings must begin and end with a \" character")); ptr = parse_next_regex(ptr); continue; } ptr++; fgstr = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; newcolor = (colortype *)nmalloc(sizeof(colortype)); /* Save the starting regex string if it's valid, and set up the * color information. */ if (nregcomp(fgstr, icase ? REG_ICASE : 0)) { newcolor->fg = fg; newcolor->bg = bg; newcolor->bright = bright; newcolor->icase = icase; newcolor->start_regex = mallocstrcpy(NULL, fgstr); newcolor->start = NULL; newcolor->end_regex = NULL; newcolor->end = NULL; newcolor->next = NULL; if (endcolor == NULL) { endsyntax->color = newcolor; #ifdef DEBUG fprintf(stderr, "Starting a new colorstring for fg %hd, bg %hd\n", fg, bg); #endif } else { #ifdef DEBUG fprintf(stderr, "Adding new entry for fg %hd, bg %hd\n", fg, bg); #endif /* Need to recompute endcolor now so we can extend * colors to syntaxes. */ for (endcolor = endsyntax->color; endcolor->next != NULL; endcolor = endcolor->next) ; endcolor->next = newcolor; } endcolor = newcolor; } else { free(newcolor); cancelled = TRUE; } if (expectend) { if (ptr == NULL || strncasecmp(ptr, "end=", 4) != 0) { rcfile_error( N_("\"start=\" requires a corresponding \"end=\"")); return; } ptr += 4; if (*ptr != '"') { rcfile_error( N_("Regex strings must begin and end with a \" character")); continue; } ptr++; fgstr = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; /* If the start regex was invalid, skip past the end regex * to stay in sync. */ if (cancelled) continue; /* Save the ending regex string if it's valid. */ newcolor->end_regex = (nregcomp(fgstr, icase ? REG_ICASE : 0)) ? mallocstrcpy(NULL, fgstr) : NULL; /* Lame way to skip another static counter. */ newcolor->id = endsyntax->nmultis; endsyntax->nmultis++; } } } /* Parse the color name, or pair of color names, in combostr. */ bool parse_color_names(char *combostr, short *fg, short *bg, bool *bright) { bool no_fgcolor = FALSE; if (combostr == NULL) return FALSE; if (strchr(combostr, ',') != NULL) { char *bgcolorname; strtok(combostr, ","); bgcolorname = strtok(NULL, ","); if (bgcolorname == NULL) { /* If we have a background color without a foreground color, * parse it properly. */ bgcolorname = combostr + 1; no_fgcolor = TRUE; } if (strncasecmp(bgcolorname, "bright", 6) == 0) { rcfile_error(N_("Background color \"%s\" cannot be bright"), bgcolorname); return FALSE; } *bg = color_to_short(bgcolorname, bright); } else *bg = -1; if (!no_fgcolor) { *fg = color_to_short(combostr, bright); /* Don't try to parse screwed-up foreground colors. */ if (*fg == -1) return FALSE; } else *fg = -1; return TRUE; } /* Parse the header-line regexes that may influence the choice of syntax. */ void parse_header_exp(char *ptr) { regexlisttype *endheader = NULL; assert(ptr != NULL); if (syntaxes == NULL) { rcfile_error( N_("Cannot add a header regex without a syntax command")); return; } if (*ptr == '\0') { rcfile_error(N_("Missing regex string")); return; } while (*ptr != '\0') { const char *regexstring; regexlisttype *newheader; if (*ptr != '"') { rcfile_error( N_("Regex strings must begin and end with a \" character")); ptr = parse_next_regex(ptr); continue; } ptr++; regexstring = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; newheader = (regexlisttype *)nmalloc(sizeof(regexlisttype)); /* Save the regex string if it's valid. */ if (nregcomp(regexstring, 0)) { newheader->ext_regex = mallocstrcpy(NULL, regexstring); newheader->ext = NULL; if (endheader == NULL) endsyntax->headers = newheader; else endheader->next = newheader; endheader = newheader; endheader->next = NULL; } else free(newheader); } } #ifdef HAVE_LIBMAGIC /* Parse the magic regexes that may influence the choice of syntax. */ void parse_magic_exp(char *ptr) { regexlisttype *endmagic = NULL; assert(ptr != NULL); if (syntaxes == NULL) { rcfile_error( N_("Cannot add a magic string regex without a syntax command")); return; } if (*ptr == '\0') { rcfile_error(N_("Missing magic string name")); return; } if (*ptr != '"') { rcfile_error( N_("Regex strings must begin and end with a \" character")); return; } #ifdef DEBUG fprintf(stderr, "Starting a magic type: \"%s\"\n", ptr); #endif /* Now load the magic regexes into their part of the struct. */ while (*ptr != '\0') { const char *regexstring; regexlisttype *newmagic; while (*ptr != '"' && *ptr != '\0') ptr++; if (*ptr == '\0') return; ptr++; regexstring = ptr; ptr = parse_next_regex(ptr); if (ptr == NULL) break; newmagic = (regexlisttype *)nmalloc(sizeof(regexlisttype)); /* Save the regex string if it's valid. */ if (nregcomp(regexstring, REG_NOSUB)) { newmagic->ext_regex = mallocstrcpy(NULL, regexstring); newmagic->ext = NULL; if (endmagic == NULL) endsyntax->magics = newmagic; else endmagic->next = newmagic; endmagic = newmagic; endmagic->next = NULL; } else free(newmagic); } } #endif /* HAVE_LIBMAGIC */ /* Parse the linter requested for this syntax. */ void parse_linter(char *ptr) { assert(ptr != NULL); if (syntaxes == NULL) { rcfile_error( N_("Cannot add a linter without a syntax command")); return; } if (*ptr == '\0') { rcfile_error(N_("Missing linter command")); return; } free(endsyntax->linter); /* Let them unset the linter by using "". */ if (!strcmp(ptr, "\"\"")) endsyntax->linter = NULL; else endsyntax->linter = mallocstrcpy(NULL, ptr); } #ifndef DISABLE_SPELLER /* Parse the formatter requested for this syntax. */ void parse_formatter(char *ptr) { assert(ptr != NULL); if (syntaxes == NULL) { rcfile_error( N_("Cannot add formatter without a syntax command")); return; } if (*ptr == '\0') { rcfile_error(N_("Missing formatter command")); return; } free(endsyntax->formatter); /* Let them unset the formatter by using "". */ if (!strcmp(ptr, "\"\"")) endsyntax->formatter = NULL; else endsyntax->formatter = mallocstrcpy(NULL, ptr); } #endif /* !DISABLE_SPELLER */ #endif /* !DISABLE_COLOR */ /* Check whether the user has unmapped every shortcut for a * sequence we consider 'vital', like the exit function. */ static void check_vitals_mapped(void) { subnfunc *f; int v; #define VITALS 5 void (*vitals[VITALS])(void) = { do_exit, do_exit, do_cancel, do_cancel, do_cancel }; int inmenus[VITALS] = { MMAIN, MHELP, MWHEREIS, MREPLACE, MGOTOLINE }; for (v = 0; v < VITALS; v++) { for (f = allfuncs; f != NULL; f = f->next) { if (f->scfunc == vitals[v] && f->menus & inmenus[v]) { const sc *s = first_sc_for(inmenus[v], f->scfunc); if (!s) { fprintf(stderr, _("Fatal error: no keys mapped for function " "\"%s\". Exiting.\n"), f->desc); fprintf(stderr, _("If needed, use nano with the -I option " "to adjust your nanorc settings.\n")); exit(1); } break; } } } } /* Parse the rcfile, once it has been opened successfully at rcstream, * and close it afterwards. If syntax_only is TRUE, only allow the file * to contain color syntax commands: syntax, color, and icolor. */ void parse_rcfile(FILE *rcstream #ifndef DISABLE_COLOR , bool syntax_only #endif ) { char *buf = NULL; ssize_t len; size_t n = 0; #ifndef DISABLE_COLOR syntaxtype *end_syn_save = NULL; #endif while ((len = getline(&buf, &n, rcstream)) > 0) { char *ptr, *keyword, *option; int set = 0; size_t i; /* Ignore the newline. */ if (buf[len - 1] == '\n') buf[len - 1] = '\0'; lineno++; ptr = buf; while (isblank(*ptr)) ptr++; /* If we have a blank line or a comment, skip to the next * line. */ if (*ptr == '\0' || *ptr == '#') continue; /* Otherwise, skip to the next space. */ keyword = ptr; ptr = parse_next_word(ptr); #ifndef DISABLE_COLOR /* Handle extending first... */ if (strcasecmp(keyword, "extendsyntax") == 0) { char *syntaxname = ptr; syntaxtype *ts = NULL; ptr = parse_next_word(ptr); for (ts = syntaxes; ts != NULL; ts = ts->next) if (!strcmp(ts->desc, syntaxname)) break; if (ts == NULL) { rcfile_error(N_("Could not find syntax \"%s\" to extend"), syntaxname); continue; } else { end_syn_save = endsyntax; endsyntax = ts; keyword = ptr; ptr = parse_next_word(ptr); } } #endif /* Try to parse the keyword. */ if (strcasecmp(keyword, "set") == 0) { #ifndef DISABLE_COLOR if (syntax_only) rcfile_error( N_("Command \"%s\" not allowed in included file"), keyword); else #endif set = 1; } else if (strcasecmp(keyword, "unset") == 0) { #ifndef DISABLE_COLOR if (syntax_only) rcfile_error( N_("Command \"%s\" not allowed in included file"), keyword); else #endif set = -1; } #ifndef DISABLE_COLOR else if (strcasecmp(keyword, "include") == 0) { if (syntax_only) rcfile_error( N_("Command \"%s\" not allowed in included file"), keyword); else parse_include(ptr); } else if (strcasecmp(keyword, "syntax") == 0) { if (endsyntax != NULL && endcolor == NULL) rcfile_error(N_("Syntax \"%s\" has no color commands"), endsyntax->desc); parse_syntax(ptr); } else if (strcasecmp(keyword, "magic") == 0) #ifdef HAVE_LIBMAGIC parse_magic_exp(ptr); #else ; #endif else if (strcasecmp(keyword, "header") == 0) parse_header_exp(ptr); else if (strcasecmp(keyword, "color") == 0) parse_colors(ptr, FALSE); else if (strcasecmp(keyword, "icolor") == 0) parse_colors(ptr, TRUE); else if (strcasecmp(keyword, "linter") == 0) parse_linter(ptr); else if (strcasecmp(keyword, "formatter") == 0) #ifndef DISABLE_SPELLER parse_formatter(ptr); #else ; #endif #endif /* !DISABLE_COLOR */ else if (strcasecmp(keyword, "bind") == 0) parse_binding(ptr, TRUE); else if (strcasecmp(keyword, "unbind") == 0) parse_binding(ptr, FALSE); else rcfile_error(N_("Command \"%s\" not understood"), keyword); #ifndef DISABLE_COLOR /* If we temporarily reset endsyntax to allow extending, * restore the value here. */ if (end_syn_save != NULL) { endsyntax = end_syn_save; end_syn_save = NULL; } #endif if (set == 0) continue; if (*ptr == '\0') { rcfile_error(N_("Missing option")); continue; } option = ptr; ptr = parse_next_word(ptr); for (i = 0; rcopts[i].name != NULL; i++) { if (strcasecmp(option, rcopts[i].name) == 0) { #ifdef DEBUG fprintf(stderr, "parse_rcfile(): name = \"%s\"\n", rcopts[i].name); #endif if (set == 1) { if (rcopts[i].flag != 0) /* This option has a flag, so it doesn't take an * argument. */ SET(rcopts[i].flag); else { /* This option doesn't have a flag, so it takes * an argument. */ if (*ptr == '\0') { rcfile_error( N_("Option \"%s\" requires an argument"), rcopts[i].name); break; } option = ptr; if (*option == '"') option++; ptr = parse_argument(ptr); option = mallocstrcpy(NULL, option); #ifdef DEBUG fprintf(stderr, "option = \"%s\"\n", option); #endif /* Make sure option is a valid multibyte * string. */ if (!is_valid_mbstring(option)) { rcfile_error( N_("Option is not a valid multibyte string")); break; } #ifndef DISABLE_COLOR if (strcasecmp(rcopts[i].name, "titlecolor") == 0) specified_color_combo[TITLE_BAR] = option; else if (strcasecmp(rcopts[i].name, "statuscolor") == 0) specified_color_combo[STATUS_BAR] = option; else if (strcasecmp(rcopts[i].name, "keycolor") == 0) specified_color_combo[KEY_COMBO] = option; else if (strcasecmp(rcopts[i].name, "functioncolor") == 0) specified_color_combo[FUNCTION_TAG] = option; else #endif #ifndef DISABLE_OPERATINGDIR if (strcasecmp(rcopts[i].name, "operatingdir") == 0) operating_dir = option; else #endif #ifndef DISABLE_WRAPJUSTIFY if (strcasecmp(rcopts[i].name, "fill") == 0) { if (!parse_num(option, &wrap_at)) { rcfile_error( N_("Requested fill size \"%s\" is invalid"), option); wrap_at = -CHARS_FROM_EOL; } else free(option); } else #endif #ifndef NANO_TINY if (strcasecmp(rcopts[i].name, "matchbrackets") == 0) { matchbrackets = option; if (has_blank_mbchars(matchbrackets)) { rcfile_error( N_("Non-blank characters required")); free(matchbrackets); matchbrackets = NULL; } } else if (strcasecmp(rcopts[i].name, "whitespace") == 0) { whitespace = option; if (mbstrlen(whitespace) != 2 || strlenpt(whitespace) != 2) { rcfile_error( N_("Two single-column characters required")); free(whitespace); whitespace = NULL; } else { whitespace_len[0] = parse_mbchar(whitespace, NULL, NULL); whitespace_len[1] = parse_mbchar(whitespace + whitespace_len[0], NULL, NULL); } } else #endif #ifndef DISABLE_JUSTIFY if (strcasecmp(rcopts[i].name, "punct") == 0) { punct = option; if (has_blank_mbchars(punct)) { rcfile_error( N_("Non-blank characters required")); free(punct); punct = NULL; } } else if (strcasecmp(rcopts[i].name, "brackets") == 0) { brackets = option; if (has_blank_mbchars(brackets)) { rcfile_error( N_("Non-blank characters required")); free(brackets); brackets = NULL; } } else if (strcasecmp(rcopts[i].name, "quotestr") == 0) quotestr = option; else #endif #ifndef NANO_TINY if (strcasecmp(rcopts[i].name, "backupdir") == 0) backup_dir = option; else #endif #ifndef DISABLE_SPELLER if (strcasecmp(rcopts[i].name, "speller") == 0) alt_speller = option; else #endif if (strcasecmp(rcopts[i].name, "tabsize") == 0) { if (!parse_num(option, &tabsize) || tabsize <= 0) { rcfile_error( N_("Requested tab size \"%s\" is invalid"), option); tabsize = -1; } else free(option); } else assert(FALSE); } #ifdef DEBUG fprintf(stderr, "flag = %ld\n", rcopts[i].flag); #endif } else if (rcopts[i].flag != 0) UNSET(rcopts[i].flag); else rcfile_error(N_("Cannot unset option \"%s\""), rcopts[i].name); break; } } if (rcopts[i].name == NULL) rcfile_error(N_("Unknown option \"%s\""), option); } #ifndef DISABLE_COLOR if (endsyntax != NULL && endcolor == NULL) rcfile_error(N_("Syntax \"%s\" has no color commands"), endsyntax->desc); #endif free(buf); fclose(rcstream); lineno = 0; check_vitals_mapped(); return; } /* The main rcfile function. It tries to open the system-wide rcfile, * followed by the current user's rcfile. */ void do_rcfile(void) { struct stat rcinfo; FILE *rcstream; nanorc = mallocstrcpy(nanorc, SYSCONFDIR "/nanorc"); /* Don't open directories, character files, or block files. */ if (stat(nanorc, &rcinfo) != -1) { if (S_ISDIR(rcinfo.st_mode) || S_ISCHR(rcinfo.st_mode) || S_ISBLK(rcinfo.st_mode)) rcfile_error(S_ISDIR(rcinfo.st_mode) ? _("\"%s\" is a directory") : _("\"%s\" is a device file"), nanorc); } #ifdef DEBUG fprintf(stderr, "Parsing file \"%s\"\n", nanorc); #endif /* Try to open the system-wide nanorc. */ rcstream = fopen(nanorc, "rb"); if (rcstream != NULL) parse_rcfile(rcstream #ifndef DISABLE_COLOR , FALSE #endif ); #ifdef DISABLE_ROOTWRAPPING /* We've already read SYSCONFDIR/nanorc, if it's there. If we're * root, and --disable-wrapping-as-root is used, turn wrapping off * now. */ if (geteuid() == NANO_ROOT_UID) SET(NO_WRAP); #endif get_homedir(); if (homedir == NULL) rcfile_error(N_("I can't find my home directory! Wah!")); else { #ifndef RCFILE_NAME #define RCFILE_NAME ".nanorc" #endif nanorc = charealloc(nanorc, strlen(homedir) + strlen(RCFILE_NAME) + 2); sprintf(nanorc, "%s/%s", homedir, RCFILE_NAME); /* Don't open directories, character files, or block files. */ if (stat(nanorc, &rcinfo) != -1) { if (S_ISDIR(rcinfo.st_mode) || S_ISCHR(rcinfo.st_mode) || S_ISBLK(rcinfo.st_mode)) rcfile_error(S_ISDIR(rcinfo.st_mode) ? _("\"%s\" is a directory") : _("\"%s\" is a device file"), nanorc); } /* Try to open the current user's nanorc. */ rcstream = fopen(nanorc, "rb"); if (rcstream == NULL) { /* Don't complain about the file's not existing. */ if (errno != ENOENT) rcfile_error(N_("Error reading %s: %s"), nanorc, strerror(errno)); } else parse_rcfile(rcstream #ifndef DISABLE_COLOR , FALSE #endif ); } free(nanorc); nanorc = NULL; if (errors && !ISSET(QUIET)) { errors = FALSE; fprintf(stderr, _("\nPress Enter to continue starting nano.\n")); while (getchar() != '\n') ; } } #endif /* !DISABLE_NANORC */
gpl-3.0
aferrero2707/PhotoFlow
src/external/exiv2/include/exiv2/xmp.hpp
16837
// ***************************************************************** -*- C++ -*- /* * Copyright (C) 2004-2017 Andreas Huggel <[email protected]> * * This program is part of the Exiv2 distribution. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ /*! @file xmp.hpp @brief Encoding and decoding of XMP data @version $Rev: 3090 $ @author Andreas Huggel (ahu) <a href="mailto:[email protected]">[email protected]</a> @date 13-Jul-07, ahu: created */ #ifndef XMP_HPP_ #define XMP_HPP_ // ***************************************************************************** // included header files #include "metadatum.hpp" #include "properties.hpp" #include "value.hpp" #include "types.hpp" #include "datasets.hpp" #include "properties.hpp" // + standard includes #include <string> #include <vector> // ***************************************************************************** // namespace extensions namespace Exiv2 { // ***************************************************************************** // class declarations class ExifData; // ***************************************************************************** // class definitions /*! @brief Information related to an XMP property. An XMP metadatum consists of an XmpKey and a Value and provides methods to manipulate these. */ class EXIV2API Xmpdatum : public Metadatum { public: //! @name Creators //@{ /*! @brief Constructor for new tags created by an application. The %Xmpdatum is created from a key / value pair. %Xmpdatum copies (clones) the value if one is provided. Alternatively, a program can create an 'empty' %Xmpdatum with only a key and set the value using setValue(). @param key The key of the %Xmpdatum. @param pValue Pointer to a %Xmpdatum value. @throw Error if the key cannot be parsed and converted to a known schema namespace prefix and property name. */ explicit Xmpdatum(const XmpKey& key, const Value* pValue =0); //! Copy constructor Xmpdatum(const Xmpdatum& rhs); //! Destructor virtual ~Xmpdatum(); //@} //! @name Manipulators //@{ //! Assignment operator Xmpdatum& operator=(const Xmpdatum& rhs); /*! @brief Assign std::string \em value to the %Xmpdatum. Calls setValue(const std::string&). */ Xmpdatum& operator=(const std::string& value); /*! @brief Assign const char* \em value to the %Xmpdatum. Calls operator=(const std::string&). */ Xmpdatum& operator=(const char* value); /*! @brief Assign a boolean \em value to the %Xmpdatum. Translates the value to a string "true" or "false". */ Xmpdatum& operator=(const bool& value); /*! @brief Assign a \em value of any type with an output operator to the %Xmpdatum. Calls operator=(const std::string&). */ template<typename T> Xmpdatum& operator=(const T& value); /*! @brief Assign Value \em value to the %Xmpdatum. Calls setValue(const Value*). */ Xmpdatum& operator=(const Value& value); void setValue(const Value* pValue); /*! @brief Set the value to the string \em value. Uses Value::read(const std::string&). If the %Xmpdatum does not have a Value yet, then a %Value of the correct type for this %Xmpdatum is created. If the key is unknown, a XmpTextValue is used as default. Return 0 if the value was read successfully. */ int setValue(const std::string& value); //@} //! @name Accessors //@{ //! Not implemented. Calling this method will raise an exception. long copy(byte* buf, ByteOrder byteOrder) const; std::ostream& write(std::ostream& os, const ExifData* pMetadata =0) const; /*! @brief Return the key of the Xmpdatum. The key is of the form '<b>Xmp</b>.prefix.property'. Note however that the key is not necessarily unique, i.e., an XmpData object may contain multiple metadata with the same key. */ std::string key() const; const char* familyName() const; //! Return the (preferred) schema namespace prefix. std::string groupName() const; //! Return the property name. std::string tagName() const; std::string tagLabel() const; //! Properties don't have a tag number. Return 0. uint16_t tag() const; TypeId typeId() const; const char* typeName() const; // Todo: Remove this method from the baseclass //! The Exif typeSize doesn't make sense here. Return 0. long typeSize() const; long count() const; long size() const; std::string toString() const; std::string toString(long n) const; long toLong(long n =0) const; float toFloat(long n =0) const; Rational toRational(long n =0) const; Value::AutoPtr getValue() const; const Value& value() const; //@} private: // Pimpl idiom struct Impl; Impl* p_; }; // class Xmpdatum //! Container type to hold all metadata typedef std::vector<Xmpdatum> XmpMetadata; /*! @brief A container for XMP data. This is a top-level class of the %Exiv2 library. Provide high-level access to the XMP data of an image: - read XMP information from an XML block - access metadata through keys and standard C++ iterators - add, modify and delete metadata - serialize XMP data to an XML block */ class EXIV2API XmpData { public: //! XmpMetadata iterator type typedef XmpMetadata::iterator iterator; //! XmpMetadata const iterator type typedef XmpMetadata::const_iterator const_iterator; //! @name Manipulators //@{ /*! @brief Returns a reference to the %Xmpdatum that is associated with a particular \em key. If %XmpData does not already contain such an %Xmpdatum, operator[] adds object \em Xmpdatum(key). @note Since operator[] might insert a new element, it can't be a const member function. */ Xmpdatum& operator[](const std::string& key); /*! @brief Add an %Xmpdatum from the supplied key and value pair. This method copies (clones) the value. @return 0 if successful. */ int add(const XmpKey& key, const Value* value); /*! @brief Add a copy of the Xmpdatum to the XMP metadata. @return 0 if successful. */ int add(const Xmpdatum& xmpdatum); /*! @brief Delete the Xmpdatum at iterator position pos, return the position of the next Xmpdatum. @note Iterators into the metadata, including pos, are potentially invalidated by this call. */ iterator erase(iterator pos); //! Delete all Xmpdatum instances resulting in an empty container. void clear(); //! Sort metadata by key void sortByKey(); //! Begin of the metadata iterator begin(); //! End of the metadata iterator end(); /*! @brief Find the first Xmpdatum with the given key, return an iterator to it. */ iterator findKey(const XmpKey& key); //@} //! @name Accessors //@{ //! Begin of the metadata const_iterator begin() const; //! End of the metadata const_iterator end() const; /*! @brief Find the first Xmpdatum with the given key, return a const iterator to it. */ const_iterator findKey(const XmpKey& key) const; //! Return true if there is no XMP metadata bool empty() const; //! Get the number of metadata entries long count() const; //! are we to use the packet? bool usePacket() const { return usePacket_; } ; //! set usePacket_ bool usePacket(bool b) { bool r = usePacket_; usePacket_=b ; return r; }; //! setPacket void setPacket(const std::string& xmpPacket) { xmpPacket_ = xmpPacket ; usePacket(false); }; // ! getPacket const std::string& xmpPacket() const { return xmpPacket_ ; }; //@} private: // DATA XmpMetadata xmpMetadata_; std::string xmpPacket_ ; bool usePacket_ ; }; // class XmpData /*! @brief Stateless parser class for XMP packets. Images use this class to parse and serialize XMP packets. The parser uses the XMP toolkit to do the job. */ class EXIV2API XmpParser { public: //! Options to control the format of the serialized XMP packet. enum XmpFormatFlags { omitPacketWrapper = 0x0010UL, //!< Omit the XML packet wrapper. readOnlyPacket = 0x0020UL, //!< Default is a writeable packet. useCompactFormat = 0x0040UL, //!< Use a compact form of RDF. includeThumbnailPad = 0x0100UL, //!< Include a padding allowance for a thumbnail image. exactPacketLength = 0x0200UL, //!< The padding parameter is the overall packet length. writeAliasComments = 0x0400UL, //!< Show aliases as XML comments. omitAllFormatting = 0x0800UL //!< Omit all formatting whitespace. }; /*! @brief Decode XMP metadata from an XMP packet \em xmpPacket into \em xmpData. The format of the XMP packet must follow the XMP specification. This method clears any previous contents of \em xmpData. @param xmpData Container for the decoded XMP properties @param xmpPacket The raw XMP packet to decode @return 0 if successful;<BR> 1 if XMP support has not been compiled-in;<BR> 2 if the XMP toolkit failed to initialize;<BR> 3 if the XMP toolkit failed and raised an XMP_Error */ static int decode( XmpData& xmpData, const std::string& xmpPacket); /*! @brief Encode (serialize) XMP metadata from \em xmpData into a string xmpPacket. The XMP packet returned in the string follows the XMP specification. This method only modifies \em xmpPacket if the operations succeeds (return code 0). @param xmpPacket Reference to a string to hold the encoded XMP packet. @param xmpData XMP properties to encode. @param formatFlags Flags that control the format of the XMP packet, see enum XmpFormatFlags. @param padding Padding length. @return 0 if successful;<BR> 1 if XMP support has not been compiled-in;<BR> 2 if the XMP toolkit failed to initialize;<BR> 3 if the XMP toolkit failed and raised an XMP_Error */ static int encode( std::string& xmpPacket, const XmpData& xmpData, uint16_t formatFlags =useCompactFormat, uint32_t padding =0); /*! @brief Lock/unlock function type A function of this type can be passed to initialize() to make subsequent registration of XMP namespaces thread-safe. See the initialize() function for more information. @param pLockData Pointer to the pLockData passed to initialize() @param lockUnlock Indicates whether to lock (true) or unlock (false) */ typedef void (*XmpLockFct)(void* pLockData, bool lockUnlock); /*! @brief Initialize the XMP Toolkit. Calling this method is usually not needed, as encode() and decode() will initialize the XMP Toolkit if necessary. The function takes optional pointers to a callback function \em xmpLockFct and related data \em pLockData that the parser uses when XMP namespaces are subsequently registered. The initialize() function itself still is not thread-safe and needs to be called in a thread-safe manner (e.g., on program startup), but if used with suitable additional locking parameters, any subsequent registration of namespaces will be thread-safe. Example usage on Windows using a critical section: @code void main() { struct XmpLock { CRITICAL_SECTION cs; XmpLock() { InitializeCriticalSection(&cs); } ~XmpLock() { DeleteCriticalSection(&cs); } static void LockUnlock(void* pData, bool fLock) { XmpLock* pThis = reinterpret_cast<XmpLock*>(pData); if (pThis) { (fLock) ? EnterCriticalSection(&pThis->cs) : LeaveCriticalSection(&pThis->cs); } } } xmpLock; // Pass the locking mechanism to the XMP parser on initialization. // Note however that this call itself is still not thread-safe. Exiv2::XmpParser::initialize(XmpLock::LockUnlock, &xmpLock); // Program continues here, subsequent registrations of XMP // namespaces are serialized using xmpLock. } @endcode @return True if the initialization was successful, else false. */ static bool initialize(XmpParser::XmpLockFct xmpLockFct =0, void* pLockData =0); /*! @brief Terminate the XMP Toolkit and unregister custom namespaces. Call this method when the XmpParser is no longer needed to allow the XMP Toolkit to cleanly shutdown. */ static void terminate(); private: /*! @brief Register a namespace with the XMP Toolkit. */ static void registerNs(const std::string& ns, const std::string& prefix); /*! @brief Delete a namespace from the XMP Toolkit. XmpProperties::unregisterNs calls this to synchronize namespaces. */ static void unregisterNs(const std::string& ns); /*! @brief Get namespaces registered with XMPsdk */ static void registeredNamespaces(Exiv2::Dictionary&); // DATA static bool initialized_; //! Indicates if the XMP Toolkit has been initialized static XmpLockFct xmpLockFct_; static void* pLockData_; friend class XmpProperties; // permit XmpProperties -> registerNs() and registeredNamespaces() }; // class XmpParser // ***************************************************************************** // free functions, template and inline definitions inline Xmpdatum& Xmpdatum::operator=(const char* value) { return Xmpdatum::operator=(std::string(value)); } inline Xmpdatum& Xmpdatum::operator=(const bool& value) { return operator=(value ? "True" : "False"); } template<typename T> Xmpdatum& Xmpdatum::operator=(const T& value) { setValue(Exiv2::toString(value)); return *this; } } // namespace Exiv2 #endif // #ifndef XMP_HPP_
gpl-3.0
plymouthstate/mahara
htdocs/lang/en.utf8/help/pages/collection/views.html
282
<h3>Collection Pages</h3> <p>Here you can add pages to your collection and set the order in which they will display in page navigation blocktypes.</p> <p>When you add a page to your collection, the access permissions attached to the page will be added to the entire collection.</p>
gpl-3.0
aJanker/TypeChef-Sampling-Linux
linux26333/systems/redhat/usr/include/phonon/mediasource.h
8882
/* This file is part of the KDE project Copyright (C) 2007 Matthias Kretz <[email protected]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), Nokia Corporation (or its successors, if any) and the KDE Free Qt Foundation, which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PHONON_MEDIASOURCE_H #define PHONON_MEDIASOURCE_H #include "phonon_export.h" #include "phononnamespace.h" #include "objectdescription.h" #include <QtCore/QSharedData> #include <QtCore/QString> QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QUrl; class QIODevice; namespace Phonon { class MediaSourcePrivate; class AbstractMediaStream; /** \class MediaSource mediasource.h phonon/MediaSource * Note that all constructors of this class are implicit, so that you can simply write * \code * MediaObject m; * QString fileName("/home/foo/bar.ogg"); * QUrl url("http://www.example.com/stream.mp3"); * QBuffer *someBuffer; * m.setCurrentSource(fileName); * m.setCurrentSource(url); * m.setCurrentSource(someBuffer); * m.setCurrentSource(Phonon::Cd); * \endcode * * \ingroup Playback * \ingroup Recording * \author Matthias Kretz <[email protected]> */ class PHONON_EXPORT MediaSource { friend class StreamInterface; public: /** * Identifies the type of media described by the MediaSource object. * * \see MediaSource::type() */ enum Type { /** * The MediaSource object does not describe any valid source. */ Invalid = -1, /** * The MediaSource object describes a local file. */ LocalFile, /** * The MediaSource object describes a URL, which can be both a local file and a file on * the network. */ Url, /** * The MediaSource object describes a disc. */ Disc, /** * The MediaSource object describes a data stream. * * This is also the type used for QIODevices. * * \see AbstractMediaStream */ Stream, /** * An empty MediaSource. * * It can be used to unload the current media from a MediaObject. * * \see MediaSource() */ Empty /* post 4.0: / ** * Links multiple MediaSource objects together. * / Link */ }; /** * Creates an empty MediaSource. * * An empty MediaSource is considered valid and can be set on a MediaObject to unload its * current media. * * \see Empty */ MediaSource(); /** * Creates a MediaSource object for a local file or a Qt resource. * * \param fileName file name of a local media file or a Qt resource that was compiled in. */ MediaSource(const QString &fileName); //krazy:exclude=explicit /** * Creates a MediaSource object for a URL. * * \param url URL to a media file or stream. */ MediaSource(const QUrl &url); //krazy:exclude=explicit /** * Creates a MediaSource object for discs. * * \param discType See \ref DiscType * \param deviceName A platform dependent device name. This can be useful if the computer * has more than one CD drive. It is recommended to use Solid to retrieve the device name in * a portable way. */ MediaSource(Phonon::DiscType discType, const QString &deviceName = QString()); //krazy:exclude=explicit #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM /** * Creates a MediaSource object for a data stream. * * Your application can provide the media data by subclassing AbstractMediaStream and * passing a pointer to that object. %Phonon will never delete the \p stream. * * \param stream The AbstractMediaStream subclass to provide the media data. * * \see setAutoDelete */ MediaSource(AbstractMediaStream *stream); //krazy:exclude=explicit /** * Creates a MediaSource object for a QIODevice. * * This constructor can be very handy in the combination of QByteArray and QBuffer. * * \param ioDevice An arbitrary readable QIODevice subclass. If the device is not opened * MediaSource will open it as QIODevice::ReadOnly. Sequential I/O devices are possible, * too. For those MediaObject::isSeekable() will have to return false obviously. * * \see setAutoDelete */ MediaSource(QIODevice *ioDevice); //krazy:exclude=explicit #endif /** * Creates a MediaSource object for capture devices. */ //MediaSource(const AudioCaptureDevice &, const VideoCaptureDevice &); /** * Destroys the MediaSource object. */ ~MediaSource(); /** * Constructs a copy of \p rhs. * * This constructor is fast thanks to explicit sharing. */ MediaSource(const MediaSource &rhs); /** * Assigns \p rhs to this MediaSource and returns a reference to this MediaSource. * * This operation is fast thanks to explicit sharing. */ MediaSource &operator=(const MediaSource &rhs); /** * Returns \p true if this MediaSource is equal to \p rhs; otherwise returns \p false. */ bool operator==(const MediaSource &rhs) const; /** * Tell the MediaSource to take ownership of the AbstractMediaStream or QIODevice that was * passed in the constructor. * * The default setting is \p false, for safety. If you turn it on, you should only access * the AbstractMediaStream/QIODevice object as long as you yourself keep a MediaSource * object around. As long as you keep the MediaSource object wrapping the stream/device * the object will not get deleted. * * \see autoDelete */ void setAutoDelete(bool enable); /** * Returns the setting of the auto-delete option. The default is \p false. * * \see setAutoDelete */ bool autoDelete() const; /** * Returns the type of the MediaSource (depends on the constructor that was used). * * \see Type */ Type type() const; /** * Returns the file name of the MediaSource if type() == LocalFile; otherwise returns * QString(). */ QString fileName() const; /** * Returns the url of the MediaSource if type() == URL or type() == LocalFile; otherwise * returns QUrl(). */ QUrl url() const; /** * Returns the disc type of the MediaSource if type() == Disc; otherwise returns \ref * NoDisc. */ Phonon::DiscType discType() const; /** * Returns the device name of the MediaSource if type() == Disc; otherwise returns * QString(). */ QString deviceName() const; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM /** * Returns the media stream of the MediaSource if type() == Stream; otherwise returns 0. * QIODevices are handled as streams, too. */ AbstractMediaStream *stream() const; #endif //AudioCaptureDevice audioCaptureDevice() const; //VideoCaptureDevice videoCaptureDevice() const; /* post 4.0: MediaSource(const QList<MediaSource> &mediaList); QList<MediaSource> substreams() const; */ protected: QExplicitlySharedDataPointer<MediaSourcePrivate> d; MediaSource(MediaSourcePrivate &); }; } // namespace Phonon QT_END_NAMESPACE QT_END_HEADER #endif // PHONON_MEDIASOURCE_H
gpl-3.0
ctaylo37/OTM2
opentreemap/api/models.py
1113
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharField(max_length=100, null=False, blank=False) secret_key = models.CharField(max_length=256, null=False, blank=False) # If a user is specified then this credential # is always authorized as the given user # # If user is None this credential can access # any user's data if that user's username # and password are also provided user = models.ForeignKey(User, null=True) enabled = models.BooleanField(default=True) @classmethod def create(clz, user=None): secret_key = base64.urlsafe_b64encode(os.urandom(64)) access_key = base64.urlsafe_b64encode(uuid.uuid4().bytes)\ .replace('=', '') return APIAccessCredential.objects.create( user=user, access_key=access_key, secret_key=secret_key)
gpl-3.0
peter-b/livecode-ide
notes/bugfix-16429.md
37
# Custom properties won't set in IDE
gpl-3.0
facebokiii/face
Telegram/SourceFiles/overviewwidget.h
10156
/* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #pragma once class OverviewWidget; class OverviewInner : public QWidget, public RPCSender { Q_OBJECT public: OverviewInner(OverviewWidget *overview, ScrollArea *scroll, PeerData *peer, MediaOverviewType type); void activate(); void clear(); int32 itemTop(const FullMsgId &msgId) const; bool preloadLocal(); void preloadMore(); bool event(QEvent *e); void touchEvent(QTouchEvent *e); void paintEvent(QPaintEvent *e); void mouseMoveEvent(QMouseEvent *e); void mousePressEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *e); void keyPressEvent(QKeyEvent *e); void enterEvent(QEvent *e); void leaveEvent(QEvent *e); void resizeEvent(QResizeEvent *e); void showContextMenu(QContextMenuEvent *e, bool showFromTouch = false); void dragActionStart(const QPoint &screenPos, Qt::MouseButton button = Qt::LeftButton); void dragActionUpdate(const QPoint &screenPos); void dragActionFinish(const QPoint &screenPos, Qt::MouseButton button = Qt::LeftButton); void dragActionCancel(); void touchScrollUpdated(const QPoint &screenPos); QPoint mapMouseToItem(QPoint p, MsgId itemId, int32 itemIndex); int32 resizeToWidth(int32 nwidth, int32 scrollTop, int32 minHeight); // returns new scroll top void dropResizeIndex(); PeerData *peer() const; PeerData *migratePeer() const; MediaOverviewType type() const; void switchType(MediaOverviewType type); void setSelectMode(bool enabled); void mediaOverviewUpdated(bool fromResize = false); void changingMsgId(HistoryItem *row, MsgId newId); void msgUpdated(const HistoryItem *msg); void itemRemoved(HistoryItem *item); void itemResized(HistoryItem *item, bool scrollToIt); void getSelectionState(int32 &selectedForForward, int32 &selectedForDelete) const; void clearSelectedItems(bool onlyTextSelection = false); void fillSelectedItems(SelectedItemSet &sel, bool forDelete = true); ~OverviewInner(); public slots: void onUpdateSelected(); void showLinkTip(); void openContextUrl(); void copyContextUrl(); void cancelContextDownload(); void showContextInFolder(); void saveContextFile(); void openContextFile(); void goToMessage(); void deleteMessage(); void forwardMessage(); void selectMessage(); void onSearchUpdate(); void onCancel(); bool onCancelSearch(); void onMenuDestroy(QObject *obj); void onTouchSelect(); void onTouchScrollTimer(); void onDragExec(); bool onSearchMessages(bool searchCache = false); void onNeedSearchMessages(); private: bool itemMigrated(MsgId msgId) const; ChannelId itemChannel(MsgId msgId) const; MsgId itemMsgId(MsgId msgId) const; int32 migratedIndexSkip() const; void fixItemIndex(int32 &current, MsgId msgId) const; bool itemHasPoint(MsgId msgId, int32 index, int32 x, int32 y) const; int32 itemHeight(MsgId msgId, int32 index) const; void moveToNextItem(MsgId &msgId, int32 &index, MsgId upTo, int32 delta) const; void updateDragSelection(MsgId dragSelFrom, int32 dragSelFromIndex, MsgId dragSelTo, int32 dragSelToIndex, bool dragSelecting); void updateMsg(HistoryItem *item); void updateMsg(MsgId itemId, int32 itemIndex); void touchResetSpeed(); void touchUpdateSpeed(); void touchDeaccelerate(int32 elapsed); void applyDragSelection(); void addSelectionRange(int32 selFrom, int32 selTo, History *history); QPixmap genPix(PhotoData *photo, int32 size); void showAll(bool recountHeights = false); OverviewWidget *_overview; ScrollArea *_scroll; int32 _resizeIndex, _resizeSkip; PeerData *_peer; MediaOverviewType _type; History *_migrated, *_history; ChannelId _channel; // photos int32 _photosInRow, _photosToAdd, _vsize; struct CachedSize { int32 vsize; bool medium; QPixmap pix; }; typedef QMap<PhotoData*, CachedSize> CachedSizes; CachedSizes _cached; bool _selMode; // audio documents int32 _audioLeft, _audioWidth, _audioHeight; // shared links int32 _linksLeft, _linksWidth; struct Link { Link() : width(0) { } Link(const QString &url, const QString &text) : url(url), text(text), width(st::msgFont->width(text)) { } QString url, text; int32 width; }; struct CachedLink { CachedLink() : titleWidth(0), page(0), pixw(0), pixh(0), text(st::msgMinWidth) { } CachedLink(HistoryItem *item); int32 countHeight(int32 w); QString title, letter; int32 titleWidth; WebPageData *page; int32 pixw, pixh; Text text; QVector<Link> urls; }; typedef QMap<MsgId, CachedLink*> CachedLinks; CachedLinks _links; FlatInput _search; IconedButton _cancelSearch; QVector<MsgId> _results; int32 _itemsToBeLoaded; QTimer _searchTimer; QString _searchQuery; bool _inSearch, _searchFull, _searchFullMigrated; mtpRequestId _searchRequest; History::MediaOverview _searchResults; MsgId _lastSearchId, _lastSearchMigratedId; int32 _searchedCount; enum SearchRequestType { SearchFromStart, SearchFromOffset, SearchMigratedFromStart, SearchMigratedFromOffset }; void searchReceived(SearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req); bool searchFailed(SearchRequestType type, const RPCError &error, mtpRequestId req); typedef QMap<QString, MTPmessages_Messages> SearchCache; SearchCache _searchCache; typedef QMap<mtpRequestId, QString> SearchQueries; SearchQueries _searchQueries; CachedLink *cachedLink(HistoryItem *item); // other struct CachedItem { CachedItem() : msgid(0), y(0) { } CachedItem(MsgId msgid, const QDate &date, int32 y) : msgid(msgid), date(date), y(y) { } MsgId msgid; QDate date; int32 y; CachedLink *link; }; typedef QVector<CachedItem> CachedItems; CachedItems _items; int32 _width, _height, _minHeight, _addToY; QTimer _linkTipTimer; // selection support, like in HistoryWidget Qt::CursorShape _cursor; HistoryCursorState _cursorState; typedef QMap<MsgId, uint32> SelectedItems; SelectedItems _selected; enum DragAction { NoDrag = 0x00, PrepareDrag = 0x01, Dragging = 0x02, PrepareSelect = 0x03, Selecting = 0x04, }; DragAction _dragAction; QPoint _dragStartPos, _dragPos; MsgId _dragItem, _selectedMsgId; int32 _dragItemIndex; MsgId _mousedItem; int32 _mousedItemIndex; int32 _lnkOverIndex, _lnkDownIndex; // for OverviewLinks, 0 - none, -1 - photo or title, > 0 - lnk index uint16 _dragSymbol; bool _dragWasInactive; QString urlByIndex(MsgId msgid, int32 index, int32 lnkIndex, bool *fullShown = 0) const; bool urlIsEmail(const QString &url) const; QString _contextMenuUrl; TextLinkPtr _contextMenuLnk; MsgId _dragSelFrom, _dragSelTo; int32 _dragSelFromIndex, _dragSelToIndex; bool _dragSelecting; bool _touchScroll, _touchSelect, _touchInProgress; QPoint _touchStart, _touchPrevPos, _touchPos; QTimer _touchSelectTimer; TouchScrollState _touchScrollState; bool _touchPrevPosValid, _touchWaitingAcceleration; QPoint _touchSpeed; uint64 _touchSpeedTime, _touchAccelerationTime, _touchTime; QTimer _touchScrollTimer; PopupMenu *_menu; }; class OverviewWidget : public TWidget, public RPCSender { Q_OBJECT public: OverviewWidget(QWidget *parent, PeerData *peer, MediaOverviewType type); void clear(); void resizeEvent(QResizeEvent *e); void paintEvent(QPaintEvent *e); void contextMenuEvent(QContextMenuEvent *e); void scrollBy(int32 add); void scrollReset(); void paintTopBar(QPainter &p, float64 over, int32 decreaseWidth); void topBarClick(); PeerData *peer() const; PeerData *migratePeer() const; MediaOverviewType type() const; void switchType(MediaOverviewType type); void updateTopBarSelection(); int32 lastWidth() const; int32 lastScrollTop() const; int32 countBestScroll() const; void fastShow(bool back = false, int32 lastScrollTop = -1); void animShow(const QPixmap &oldAnimCache, const QPixmap &bgAnimTopBarCache, bool back = false, int32 lastScrollTop = -1); bool animStep_show(float64 ms); void updateWideMode(); void doneShow(); void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); void changingMsgId(HistoryItem *row, MsgId newId); void msgUpdated(const HistoryItem *msg); void itemRemoved(HistoryItem *item); void itemResized(HistoryItem *row, bool scrollToIt); QPoint clampMousePosition(QPoint point); void checkSelectingScroll(QPoint point); void noSelectingScroll(); bool touchScroll(const QPoint &delta); void fillSelectedItems(SelectedItemSet &sel, bool forDelete); void updateScrollColors(); void updateAfterDrag(); void grabStart() { _sideShadow.hide(); _inGrab = true; resizeEvent(0); } void grabFinish() { _sideShadow.setVisible(cWideMode()); _inGrab = false; resizeEvent(0); } ~OverviewWidget(); public slots: void activate(); void onScroll(); void onScrollTimer(); void onPlayerSongChanged(const FullMsgId &msgId); void onForwardSelected(); void onDeleteSelected(); void onDeleteSelectedSure(); void onDeleteContextSure(); void onClearSelected(); private: ScrollArea _scroll; OverviewInner _inner; bool _noDropResizeIndex; QString _header; Animation _a_show; QPixmap _cacheUnder, _cacheOver, _cacheTopBarUnder, _cacheTopBarOver; anim::ivalue a_coordUnder, a_coordOver; anim::fvalue a_shadow; int32 _scrollSetAfterShow; QTimer _scrollTimer; int32 _scrollDelta; int32 _selCount; PlainShadow _sideShadow, _topShadow; bool _inGrab; };
gpl-3.0
HeavensSword/darkstar
scripts/globals/items/blaze_hose.lua
368
----------------------------------------- -- ID: 15652 -- Item: Blaze Hose -- Item Effect: Blaze Spikes ----------------------------------------- require("scripts/globals/settings"); ----------------------------------------- function onItemCheck(target) return 0; end; function onItemUse(target) target:addStatusEffect(EFFECT_BLAZE_SPIKES, 15, 0, 180); end;
gpl-3.0
SuperrSonic/ULGX-ICON-VIEW
source/input.h
579
/**************************************************************************** * libwiigui Template * Tantric 2009 * * input.h * Wii/GameCube controller management ***************************************************************************/ #ifndef _INPUT_H_ #define _INPUT_H_ #include <gccore.h> #include <wiiuse/wpad.h> #define PI 3.14159265f #define PADCAL 50 #define WUPCCAL 400 extern int rumbleRequest[4]; void SetupPads(); void UpdatePads(); void ShutoffRumble(); void DoRumble(int i); void SetWPADTimeout(); bool ControlActivityTimeout(void); #endif
gpl-3.0
cmjatai/cmj
sapl/sessao/migrations/0010_auto_20170814_1804.py
753
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-14 18:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sessao', '0009_auto_20170619_1441'), ] operations = [ migrations.AddField( model_name='tiporesultadovotacao', name='natureza', field=models.CharField(choices=[('A', 'Aprovado'), ('R', 'Rejeitado')], max_length=100, null=True, verbose_name='Natureza do Tipo'), ), migrations.AlterField( model_name='tiporesultadovotacao', name='nome', field=models.CharField(max_length=100, verbose_name='Nome do Tipo'), ), ]
gpl-3.0
FAIMS/faims-android
faimsandroidapp/src/main/java/com/nutiteq/utils/TileUtils.java
4474
package com.nutiteq.utils; import com.nutiteq.components.Envelope; import com.nutiteq.components.MapPos; import com.nutiteq.projections.Projection; public class TileUtils { private static final double TILESIZE = 256; private static final double initialResolution = 2.0f * Math.PI * 6378137.0f / TILESIZE; private static final double originShift = 2.0f * Math.PI * 6378137.0f / 2.0f; // following is from // http://code.google.com/p/gmap-tile-generator/source/browse/trunk/gmaps-tile-creator/src/gov/ca/maps/tile/geom/GlobalMercator.java?r=15 /** * Returns tile for given Mercator coordinates * * @return */ public static MapPos MetersToTile(MapPos mp, int zoom) { int[] p = MetersToPixels(mp.x, mp.y, zoom); return PixelsToTile(p[0], p[1], zoom); } /** * Returns a tile covering region in given pixel coordinates * * @param px * @param py * @param zoom * @return */ public static MapPos PixelsToTile(int px, int py, int zoom) { int tx = (int) Math.ceil(px / ((double) TILESIZE) - 1); int ty = (int) Math.ceil(py / ((double) TILESIZE) - 1); return new MapPos(tx, (1<<(zoom))-1-ty); } /** * Converts EPSG:900913 to pyramid pixel coordinates in given zoom level * * @param mx * @param my * @param zoom * @return */ public static int[] MetersToPixels(double mx, double my, int zoom) { double res = Resolution(zoom); int px = (int) Math.round((mx + originShift) / res); int py = (int) Math.round((my + originShift) / res); return new int[] { px, py }; } /** * Resolution (meters/pixel) for given zoom level (measured at Equator) * * @return */ public static double Resolution(int zoom) { // return (2 * Math.PI * 6378137) / (this.tileSize * 2**zoom) return initialResolution / Math.pow(2, zoom); } /** * Returns bounds of the given tile in EPSG:900913 (EPSG:3857) coordinates * * @param tx * @param ty (bottom-top) * @param zoom * @return * @deprecated use TileBounds with projection instead */ public static Envelope TileBounds(int tx, int ty, int zoom) { double[] min = PixelsToMeters(tx * TILESIZE, ty * TILESIZE, zoom); double minx = min[0], miny = min[1]; double[] max = PixelsToMeters((tx + 1) * TILESIZE, (ty + 1) * TILESIZE, zoom); double maxx = max[0], maxy = max[1]; return new Envelope( minx, maxx, miny, maxy); } /** * Get bounds of tile * @param tx tile x (left-right) * @param ty tile y (top-bottom) * @param zoom zoom (0 = world) * @param proj * @return bounds, in given projection */ public static Envelope TileBounds(int tx, int ty, int zoom, Projection proj) { double originShift = (proj.getBounds().right-proj.getBounds().left) / 2.0; double res = (originShift * 2.0) / (TILESIZE * (double) (1<<(zoom))); // 1<<(zoom) is same as power(2;zoom) double minx = ((double) tx) * TILESIZE * res - originShift; double miny = (((double) (1<<(zoom))-1-ty) * TILESIZE * res) - originShift; double maxx = (double)(tx+1) * TILESIZE * res - originShift; double maxy = ((double)( (1<<(zoom))-1-ty + 1) * TILESIZE * res) - originShift; return new Envelope( minx, maxx, miny, maxy); } /** * Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 * Datum * * @return */ public static double[] MetersToLatLon(double mx, double my) { double lon = (mx / originShift) * 180.0; double lat = (my / originShift) * 180.0; lat = 180 / Math.PI * (2 * Math.atan(Math.exp(lat * Math.PI / 180.0)) - Math.PI / 2.0); return new double[] { lat, lon }; } /** * Converts pixel coordinates in given zoom level of pyramid to EPSG:900913 * * @return */ public static double[] PixelsToMeters(double px, double py, int zoom) { double res = Resolution(zoom); double mx = px * res - originShift; double my = originShift - (py * res); return new double[] { mx, my }; } }
gpl-3.0
ccilab/binutils
gdb/infrun.c
307263
/* Target-struct-independent code to start (run) and stop an inferior process. Copyright (C) 1986-2016 Free Software Foundation, Inc. This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "defs.h" #include "infrun.h" #include <ctype.h> #include "symtab.h" #include "frame.h" #include "inferior.h" #include "breakpoint.h" #include "gdb_wait.h" #include "gdbcore.h" #include "gdbcmd.h" #include "cli/cli-script.h" #include "target.h" #include "gdbthread.h" #include "annotate.h" #include "symfile.h" #include "top.h" #include <signal.h> #include "inf-loop.h" #include "regcache.h" #include "value.h" #include "observer.h" #include "language.h" #include "solib.h" #include "main.h" #include "dictionary.h" #include "block.h" #include "mi/mi-common.h" #include "event-top.h" #include "record.h" #include "record-full.h" #include "inline-frame.h" #include "jit.h" #include "tracepoint.h" #include "continuations.h" #include "interps.h" #include "skip.h" #include "probe.h" #include "objfiles.h" #include "completer.h" #include "target-descriptions.h" #include "target-dcache.h" #include "terminal.h" #include "solist.h" #include "event-loop.h" #include "thread-fsm.h" #include "common/enum-flags.h" /* Prototypes for local functions */ static void signals_info (char *, int); static void handle_command (char *, int); static void sig_print_info (enum gdb_signal); static void sig_print_header (void); static void resume_cleanups (void *); static int hook_stop_stub (void *); static int restore_selected_frame (void *); static int follow_fork (void); static int follow_fork_inferior (int follow_child, int detach_fork); static void follow_inferior_reset_breakpoints (void); static void set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c); static int currently_stepping (struct thread_info *tp); void _initialize_infrun (void); void nullify_last_target_wait_ptid (void); static void insert_hp_step_resume_breakpoint_at_frame (struct frame_info *); static void insert_step_resume_breakpoint_at_caller (struct frame_info *); static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR); static int maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc); /* Asynchronous signal handler registered as event loop source for when we have pending events ready to be passed to the core. */ static struct async_event_handler *infrun_async_inferior_event_token; /* Stores whether infrun_async was previously enabled or disabled. Starts off as -1, indicating "never enabled/disabled". */ static int infrun_is_async = -1; /* See infrun.h. */ void infrun_async (int enable) { if (infrun_is_async != enable) { infrun_is_async = enable; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: infrun_async(%d)\n", enable); if (enable) mark_async_event_handler (infrun_async_inferior_event_token); else clear_async_event_handler (infrun_async_inferior_event_token); } } /* See infrun.h. */ void mark_infrun_async_event_handler (void) { mark_async_event_handler (infrun_async_inferior_event_token); } /* When set, stop the 'step' command if we enter a function which has no line number information. The normal behavior is that we step over such function. */ int step_stop_if_no_debug = 0; static void show_step_stop_if_no_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Mode of the step operation is %s.\n"), value); } /* proceed and normal_stop use this to notify the user when the inferior stopped in a different thread than it had been running in. */ static ptid_t previous_inferior_ptid; /* If set (default for legacy reasons), when following a fork, GDB will detach from one of the fork branches, child or parent. Exactly which branch is detached depends on 'set follow-fork-mode' setting. */ static int detach_fork = 1; int debug_displaced = 0; static void show_debug_displaced (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Displace stepping debugging is %s.\n"), value); } unsigned int debug_infrun = 0; static void show_debug_infrun (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Inferior debugging is %s.\n"), value); } /* Support for disabling address space randomization. */ int disable_randomization = 1; static void show_disable_randomization (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (target_supports_disable_randomization ()) fprintf_filtered (file, _("Disabling randomization of debuggee's " "virtual address space is %s.\n"), value); else fputs_filtered (_("Disabling randomization of debuggee's " "virtual address space is unsupported on\n" "this platform.\n"), file); } static void set_disable_randomization (char *args, int from_tty, struct cmd_list_element *c) { if (!target_supports_disable_randomization ()) error (_("Disabling randomization of debuggee's " "virtual address space is unsupported on\n" "this platform.")); } /* User interface for non-stop mode. */ int non_stop = 0; static int non_stop_1 = 0; static void set_non_stop (char *args, int from_tty, struct cmd_list_element *c) { if (target_has_execution) { non_stop_1 = non_stop; error (_("Cannot change this setting while the inferior is running.")); } non_stop = non_stop_1; } static void show_non_stop (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Controlling the inferior in non-stop mode is %s.\n"), value); } /* "Observer mode" is somewhat like a more extreme version of non-stop, in which all GDB operations that might affect the target's execution have been disabled. */ int observer_mode = 0; static int observer_mode_1 = 0; static void set_observer_mode (char *args, int from_tty, struct cmd_list_element *c) { if (target_has_execution) { observer_mode_1 = observer_mode; error (_("Cannot change this setting while the inferior is running.")); } observer_mode = observer_mode_1; may_write_registers = !observer_mode; may_write_memory = !observer_mode; may_insert_breakpoints = !observer_mode; may_insert_tracepoints = !observer_mode; /* We can insert fast tracepoints in or out of observer mode, but enable them if we're going into this mode. */ if (observer_mode) may_insert_fast_tracepoints = 1; may_stop = !observer_mode; update_target_permissions (); /* Going *into* observer mode we must force non-stop, then going out we leave it that way. */ if (observer_mode) { pagination_enabled = 0; non_stop = non_stop_1 = 1; } if (from_tty) printf_filtered (_("Observer mode is now %s.\n"), (observer_mode ? "on" : "off")); } static void show_observer_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Observer mode is %s.\n"), value); } /* This updates the value of observer mode based on changes in permissions. Note that we are deliberately ignoring the values of may-write-registers and may-write-memory, since the user may have reason to enable these during a session, for instance to turn on a debugging-related global. */ void update_observer_mode (void) { int newval; newval = (!may_insert_breakpoints && !may_insert_tracepoints && may_insert_fast_tracepoints && !may_stop && non_stop); /* Let the user know if things change. */ if (newval != observer_mode) printf_filtered (_("Observer mode is now %s.\n"), (newval ? "on" : "off")); observer_mode = observer_mode_1 = newval; } /* Tables of how to react to signals; the user sets them. */ static unsigned char *signal_stop; static unsigned char *signal_print; static unsigned char *signal_program; /* Table of signals that are registered with "catch signal". A non-zero entry indicates that the signal is caught by some "catch signal" command. This has size GDB_SIGNAL_LAST, to accommodate all signals. */ static unsigned char *signal_catch; /* Table of signals that the target may silently handle. This is automatically determined from the flags above, and simply cached here. */ static unsigned char *signal_pass; #define SET_SIGS(nsigs,sigs,flags) \ do { \ int signum = (nsigs); \ while (signum-- > 0) \ if ((sigs)[signum]) \ (flags)[signum] = 1; \ } while (0) #define UNSET_SIGS(nsigs,sigs,flags) \ do { \ int signum = (nsigs); \ while (signum-- > 0) \ if ((sigs)[signum]) \ (flags)[signum] = 0; \ } while (0) /* Update the target's copy of SIGNAL_PROGRAM. The sole purpose of this function is to avoid exporting `signal_program'. */ void update_signals_program_target (void) { target_program_signals ((int) GDB_SIGNAL_LAST, signal_program); } /* Value to pass to target_resume() to cause all threads to resume. */ #define RESUME_ALL minus_one_ptid /* Command list pointer for the "stop" placeholder. */ static struct cmd_list_element *stop_command; /* Nonzero if we want to give control to the user when we're notified of shared library events by the dynamic linker. */ int stop_on_solib_events; /* Enable or disable optional shared library event breakpoints as appropriate when the above flag is changed. */ static void set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c) { update_solib_breakpoints (); } static void show_stop_on_solib_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Stopping for shared library events is %s.\n"), value); } /* Nonzero after stop if current stack frame should be printed. */ static int stop_print_frame; /* This is a cached copy of the pid/waitstatus of the last event returned by target_wait()/deprecated_target_wait_hook(). This information is returned by get_last_target_status(). */ static ptid_t target_last_wait_ptid; static struct target_waitstatus target_last_waitstatus; static void context_switch (ptid_t ptid); void init_thread_stepping_state (struct thread_info *tss); static const char follow_fork_mode_child[] = "child"; static const char follow_fork_mode_parent[] = "parent"; static const char *const follow_fork_mode_kind_names[] = { follow_fork_mode_child, follow_fork_mode_parent, NULL }; static const char *follow_fork_mode_string = follow_fork_mode_parent; static void show_follow_fork_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Debugger response to a program " "call of fork or vfork is \"%s\".\n"), value); } /* Handle changes to the inferior list based on the type of fork, which process is being followed, and whether the other process should be detached. On entry inferior_ptid must be the ptid of the fork parent. At return inferior_ptid is the ptid of the followed inferior. */ static int follow_fork_inferior (int follow_child, int detach_fork) { int has_vforked; ptid_t parent_ptid, child_ptid; has_vforked = (inferior_thread ()->pending_follow.kind == TARGET_WAITKIND_VFORKED); parent_ptid = inferior_ptid; child_ptid = inferior_thread ()->pending_follow.value.related_pid; if (has_vforked && !non_stop /* Non-stop always resumes both branches. */ && current_ui->prompt_state == PROMPT_BLOCKED && !(follow_child || detach_fork || sched_multi)) { /* The parent stays blocked inside the vfork syscall until the child execs or exits. If we don't let the child run, then the parent stays blocked. If we're telling the parent to run in the foreground, the user will not be able to ctrl-c to get back the terminal, effectively hanging the debug session. */ fprintf_filtered (gdb_stderr, _("\ Can not resume the parent process over vfork in the foreground while\n\ holding the child stopped. Try \"set detach-on-fork\" or \ \"set schedule-multiple\".\n")); /* FIXME output string > 80 columns. */ return 1; } if (!follow_child) { /* Detach new forked process? */ if (detach_fork) { /* Before detaching from the child, remove all breakpoints from it. If we forked, then this has already been taken care of by infrun.c. If we vforked however, any breakpoint inserted in the parent is visible in the child, even those added while stopped in a vfork catchpoint. This will remove the breakpoints from the parent also, but they'll be reinserted below. */ if (has_vforked) { /* Keep breakpoints list in sync. */ remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); } if (info_verbose || debug_infrun) { /* Ensure that we have a process ptid. */ ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid)); target_terminal_ours_for_output (); fprintf_filtered (gdb_stdlog, _("Detaching after %s from child %s.\n"), has_vforked ? "vfork" : "fork", target_pid_to_str (process_ptid)); } } else { struct inferior *parent_inf, *child_inf; struct cleanup *old_chain; /* Add process to GDB's tables. */ child_inf = add_inferior (ptid_get_pid (child_ptid)); parent_inf = current_inferior (); child_inf->attach_flag = parent_inf->attach_flag; copy_terminal_info (child_inf, parent_inf); child_inf->gdbarch = parent_inf->gdbarch; copy_inferior_target_desc_info (child_inf, parent_inf); old_chain = save_inferior_ptid (); save_current_program_space (); inferior_ptid = child_ptid; add_thread (inferior_ptid); child_inf->symfile_flags = SYMFILE_NO_READ; /* If this is a vfork child, then the address-space is shared with the parent. */ if (has_vforked) { child_inf->pspace = parent_inf->pspace; child_inf->aspace = parent_inf->aspace; /* The parent will be frozen until the child is done with the shared region. Keep track of the parent. */ child_inf->vfork_parent = parent_inf; child_inf->pending_detach = 0; parent_inf->vfork_child = child_inf; parent_inf->pending_detach = 0; } else { child_inf->aspace = new_address_space (); child_inf->pspace = add_program_space (child_inf->aspace); child_inf->removable = 1; set_current_program_space (child_inf->pspace); clone_program_space (child_inf->pspace, parent_inf->pspace); /* Let the shared library layer (e.g., solib-svr4) learn about this new process, relocate the cloned exec, pull in shared libraries, and install the solib event breakpoint. If a "cloned-VM" event was propagated better throughout the core, this wouldn't be required. */ solib_create_inferior_hook (0); } do_cleanups (old_chain); } if (has_vforked) { struct inferior *parent_inf; parent_inf = current_inferior (); /* If we detached from the child, then we have to be careful to not insert breakpoints in the parent until the child is done with the shared memory region. However, if we're staying attached to the child, then we can and should insert breakpoints, so that we can debug it. A subsequent child exec or exit is enough to know when does the child stops using the parent's address space. */ parent_inf->waiting_for_vfork_done = detach_fork; parent_inf->pspace->breakpoints_not_allowed = detach_fork; } } else { /* Follow the child. */ struct inferior *parent_inf, *child_inf; struct program_space *parent_pspace; if (info_verbose || debug_infrun) { target_terminal_ours_for_output (); fprintf_filtered (gdb_stdlog, _("Attaching after %s %s to child %s.\n"), target_pid_to_str (parent_ptid), has_vforked ? "vfork" : "fork", target_pid_to_str (child_ptid)); } /* Add the new inferior first, so that the target_detach below doesn't unpush the target. */ child_inf = add_inferior (ptid_get_pid (child_ptid)); parent_inf = current_inferior (); child_inf->attach_flag = parent_inf->attach_flag; copy_terminal_info (child_inf, parent_inf); child_inf->gdbarch = parent_inf->gdbarch; copy_inferior_target_desc_info (child_inf, parent_inf); parent_pspace = parent_inf->pspace; /* If we're vforking, we want to hold on to the parent until the child exits or execs. At child exec or exit time we can remove the old breakpoints from the parent and detach or resume debugging it. Otherwise, detach the parent now; we'll want to reuse it's program/address spaces, but we can't set them to the child before removing breakpoints from the parent, otherwise, the breakpoints module could decide to remove breakpoints from the wrong process (since they'd be assigned to the same address space). */ if (has_vforked) { gdb_assert (child_inf->vfork_parent == NULL); gdb_assert (parent_inf->vfork_child == NULL); child_inf->vfork_parent = parent_inf; child_inf->pending_detach = 0; parent_inf->vfork_child = child_inf; parent_inf->pending_detach = detach_fork; parent_inf->waiting_for_vfork_done = 0; } else if (detach_fork) { if (info_verbose || debug_infrun) { /* Ensure that we have a process ptid. */ ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid)); target_terminal_ours_for_output (); fprintf_filtered (gdb_stdlog, _("Detaching after fork from " "child %s.\n"), target_pid_to_str (process_ptid)); } target_detach (NULL, 0); } /* Note that the detach above makes PARENT_INF dangling. */ /* Add the child thread to the appropriate lists, and switch to this new thread, before cloning the program space, and informing the solib layer about this new process. */ inferior_ptid = child_ptid; add_thread (inferior_ptid); /* If this is a vfork child, then the address-space is shared with the parent. If we detached from the parent, then we can reuse the parent's program/address spaces. */ if (has_vforked || detach_fork) { child_inf->pspace = parent_pspace; child_inf->aspace = child_inf->pspace->aspace; } else { child_inf->aspace = new_address_space (); child_inf->pspace = add_program_space (child_inf->aspace); child_inf->removable = 1; child_inf->symfile_flags = SYMFILE_NO_READ; set_current_program_space (child_inf->pspace); clone_program_space (child_inf->pspace, parent_pspace); /* Let the shared library layer (e.g., solib-svr4) learn about this new process, relocate the cloned exec, pull in shared libraries, and install the solib event breakpoint. If a "cloned-VM" event was propagated better throughout the core, this wouldn't be required. */ solib_create_inferior_hook (0); } } return target_follow_fork (follow_child, detach_fork); } /* Tell the target to follow the fork we're stopped at. Returns true if the inferior should be resumed; false, if the target for some reason decided it's best not to resume. */ static int follow_fork (void) { int follow_child = (follow_fork_mode_string == follow_fork_mode_child); int should_resume = 1; struct thread_info *tp; /* Copy user stepping state to the new inferior thread. FIXME: the followed fork child thread should have a copy of most of the parent thread structure's run control related fields, not just these. Initialized to avoid "may be used uninitialized" warnings from gcc. */ struct breakpoint *step_resume_breakpoint = NULL; struct breakpoint *exception_resume_breakpoint = NULL; CORE_ADDR step_range_start = 0; CORE_ADDR step_range_end = 0; struct frame_id step_frame_id = { 0 }; struct thread_fsm *thread_fsm = NULL; if (!non_stop) { ptid_t wait_ptid; struct target_waitstatus wait_status; /* Get the last target status returned by target_wait(). */ get_last_target_status (&wait_ptid, &wait_status); /* If not stopped at a fork event, then there's nothing else to do. */ if (wait_status.kind != TARGET_WAITKIND_FORKED && wait_status.kind != TARGET_WAITKIND_VFORKED) return 1; /* Check if we switched over from WAIT_PTID, since the event was reported. */ if (!ptid_equal (wait_ptid, minus_one_ptid) && !ptid_equal (inferior_ptid, wait_ptid)) { /* We did. Switch back to WAIT_PTID thread, to tell the target to follow it (in either direction). We'll afterwards refuse to resume, and inform the user what happened. */ switch_to_thread (wait_ptid); should_resume = 0; } } tp = inferior_thread (); /* If there were any forks/vforks that were caught and are now to be followed, then do so now. */ switch (tp->pending_follow.kind) { case TARGET_WAITKIND_FORKED: case TARGET_WAITKIND_VFORKED: { ptid_t parent, child; /* If the user did a next/step, etc, over a fork call, preserve the stepping state in the fork child. */ if (follow_child && should_resume) { step_resume_breakpoint = clone_momentary_breakpoint (tp->control.step_resume_breakpoint); step_range_start = tp->control.step_range_start; step_range_end = tp->control.step_range_end; step_frame_id = tp->control.step_frame_id; exception_resume_breakpoint = clone_momentary_breakpoint (tp->control.exception_resume_breakpoint); thread_fsm = tp->thread_fsm; /* For now, delete the parent's sr breakpoint, otherwise, parent/child sr breakpoints are considered duplicates, and the child version will not be installed. Remove this when the breakpoints module becomes aware of inferiors and address spaces. */ delete_step_resume_breakpoint (tp); tp->control.step_range_start = 0; tp->control.step_range_end = 0; tp->control.step_frame_id = null_frame_id; delete_exception_resume_breakpoint (tp); tp->thread_fsm = NULL; } parent = inferior_ptid; child = tp->pending_follow.value.related_pid; /* Set up inferior(s) as specified by the caller, and tell the target to do whatever is necessary to follow either parent or child. */ if (follow_fork_inferior (follow_child, detach_fork)) { /* Target refused to follow, or there's some other reason we shouldn't resume. */ should_resume = 0; } else { /* This pending follow fork event is now handled, one way or another. The previous selected thread may be gone from the lists by now, but if it is still around, need to clear the pending follow request. */ tp = find_thread_ptid (parent); if (tp) tp->pending_follow.kind = TARGET_WAITKIND_SPURIOUS; /* This makes sure we don't try to apply the "Switched over from WAIT_PID" logic above. */ nullify_last_target_wait_ptid (); /* If we followed the child, switch to it... */ if (follow_child) { switch_to_thread (child); /* ... and preserve the stepping state, in case the user was stepping over the fork call. */ if (should_resume) { tp = inferior_thread (); tp->control.step_resume_breakpoint = step_resume_breakpoint; tp->control.step_range_start = step_range_start; tp->control.step_range_end = step_range_end; tp->control.step_frame_id = step_frame_id; tp->control.exception_resume_breakpoint = exception_resume_breakpoint; tp->thread_fsm = thread_fsm; } else { /* If we get here, it was because we're trying to resume from a fork catchpoint, but, the user has switched threads away from the thread that forked. In that case, the resume command issued is most likely not applicable to the child, so just warn, and refuse to resume. */ warning (_("Not resuming: switched threads " "before following fork child.")); } /* Reset breakpoints in the child as appropriate. */ follow_inferior_reset_breakpoints (); } else switch_to_thread (parent); } } break; case TARGET_WAITKIND_SPURIOUS: /* Nothing to follow. */ break; default: internal_error (__FILE__, __LINE__, "Unexpected pending_follow.kind %d\n", tp->pending_follow.kind); break; } return should_resume; } static void follow_inferior_reset_breakpoints (void) { struct thread_info *tp = inferior_thread (); /* Was there a step_resume breakpoint? (There was if the user did a "next" at the fork() call.) If so, explicitly reset its thread number. Cloned step_resume breakpoints are disabled on creation, so enable it here now that it is associated with the correct thread. step_resumes are a form of bp that are made to be per-thread. Since we created the step_resume bp when the parent process was being debugged, and now are switching to the child process, from the breakpoint package's viewpoint, that's a switch of "threads". We must update the bp's notion of which thread it is for, or it'll be ignored when it triggers. */ if (tp->control.step_resume_breakpoint) { breakpoint_re_set_thread (tp->control.step_resume_breakpoint); tp->control.step_resume_breakpoint->loc->enabled = 1; } /* Treat exception_resume breakpoints like step_resume breakpoints. */ if (tp->control.exception_resume_breakpoint) { breakpoint_re_set_thread (tp->control.exception_resume_breakpoint); tp->control.exception_resume_breakpoint->loc->enabled = 1; } /* Reinsert all breakpoints in the child. The user may have set breakpoints after catching the fork, in which case those were never set in the child, but only in the parent. This makes sure the inserted breakpoints match the breakpoint list. */ breakpoint_re_set (); insert_breakpoints (); } /* The child has exited or execed: resume threads of the parent the user wanted to be executing. */ static int proceed_after_vfork_done (struct thread_info *thread, void *arg) { int pid = * (int *) arg; if (ptid_get_pid (thread->ptid) == pid && is_running (thread->ptid) && !is_executing (thread->ptid) && !thread->stop_requested && thread->suspend.stop_signal == GDB_SIGNAL_0) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resuming vfork parent thread %s\n", target_pid_to_str (thread->ptid)); switch_to_thread (thread->ptid); clear_proceed_status (0); proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT); } return 0; } /* Called whenever we notice an exec or exit event, to handle detaching or resuming a vfork parent. */ static void handle_vfork_child_exec_or_exit (int exec) { struct inferior *inf = current_inferior (); if (inf->vfork_parent) { int resume_parent = -1; /* This exec or exit marks the end of the shared memory region between the parent and the child. If the user wanted to detach from the parent, now is the time. */ if (inf->vfork_parent->pending_detach) { struct thread_info *tp; struct cleanup *old_chain; struct program_space *pspace; struct address_space *aspace; /* follow-fork child, detach-on-fork on. */ inf->vfork_parent->pending_detach = 0; if (!exec) { /* If we're handling a child exit, then inferior_ptid points at the inferior's pid, not to a thread. */ old_chain = save_inferior_ptid (); save_current_program_space (); save_current_inferior (); } else old_chain = save_current_space_and_thread (); /* We're letting loose of the parent. */ tp = any_live_thread_of_process (inf->vfork_parent->pid); switch_to_thread (tp->ptid); /* We're about to detach from the parent, which implicitly removes breakpoints from its address space. There's a catch here: we want to reuse the spaces for the child, but, parent/child are still sharing the pspace at this point, although the exec in reality makes the kernel give the child a fresh set of new pages. The problem here is that the breakpoints module being unaware of this, would likely chose the child process to write to the parent address space. Swapping the child temporarily away from the spaces has the desired effect. Yes, this is "sort of" a hack. */ pspace = inf->pspace; aspace = inf->aspace; inf->aspace = NULL; inf->pspace = NULL; if (debug_infrun || info_verbose) { target_terminal_ours_for_output (); if (exec) { fprintf_filtered (gdb_stdlog, _("Detaching vfork parent process " "%d after child exec.\n"), inf->vfork_parent->pid); } else { fprintf_filtered (gdb_stdlog, _("Detaching vfork parent process " "%d after child exit.\n"), inf->vfork_parent->pid); } } target_detach (NULL, 0); /* Put it back. */ inf->pspace = pspace; inf->aspace = aspace; do_cleanups (old_chain); } else if (exec) { /* We're staying attached to the parent, so, really give the child a new address space. */ inf->pspace = add_program_space (maybe_new_address_space ()); inf->aspace = inf->pspace->aspace; inf->removable = 1; set_current_program_space (inf->pspace); resume_parent = inf->vfork_parent->pid; /* Break the bonds. */ inf->vfork_parent->vfork_child = NULL; } else { struct cleanup *old_chain; struct program_space *pspace; /* If this is a vfork child exiting, then the pspace and aspaces were shared with the parent. Since we're reporting the process exit, we'll be mourning all that is found in the address space, and switching to null_ptid, preparing to start a new inferior. But, since we don't want to clobber the parent's address/program spaces, we go ahead and create a new one for this exiting inferior. */ /* Switch to null_ptid, so that clone_program_space doesn't want to read the selected frame of a dead process. */ old_chain = save_inferior_ptid (); inferior_ptid = null_ptid; /* This inferior is dead, so avoid giving the breakpoints module the option to write through to it (cloning a program space resets breakpoints). */ inf->aspace = NULL; inf->pspace = NULL; pspace = add_program_space (maybe_new_address_space ()); set_current_program_space (pspace); inf->removable = 1; inf->symfile_flags = SYMFILE_NO_READ; clone_program_space (pspace, inf->vfork_parent->pspace); inf->pspace = pspace; inf->aspace = pspace->aspace; /* Put back inferior_ptid. We'll continue mourning this inferior. */ do_cleanups (old_chain); resume_parent = inf->vfork_parent->pid; /* Break the bonds. */ inf->vfork_parent->vfork_child = NULL; } inf->vfork_parent = NULL; gdb_assert (current_program_space == inf->pspace); if (non_stop && resume_parent != -1) { /* If the user wanted the parent to be running, let it go free now. */ struct cleanup *old_chain = make_cleanup_restore_current_thread (); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resuming vfork parent process %d\n", resume_parent); iterate_over_threads (proceed_after_vfork_done, &resume_parent); do_cleanups (old_chain); } } } /* Enum strings for "set|show follow-exec-mode". */ static const char follow_exec_mode_new[] = "new"; static const char follow_exec_mode_same[] = "same"; static const char *const follow_exec_mode_names[] = { follow_exec_mode_new, follow_exec_mode_same, NULL, }; static const char *follow_exec_mode_string = follow_exec_mode_same; static void show_follow_exec_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Follow exec mode is \"%s\".\n"), value); } /* EXEC_FILE_TARGET is assumed to be non-NULL. */ static void follow_exec (ptid_t ptid, char *exec_file_target) { struct thread_info *th, *tmp; struct inferior *inf = current_inferior (); int pid = ptid_get_pid (ptid); ptid_t process_ptid; char *exec_file_host; struct cleanup *old_chain; /* This is an exec event that we actually wish to pay attention to. Refresh our symbol table to the newly exec'd program, remove any momentary bp's, etc. If there are breakpoints, they aren't really inserted now, since the exec() transformed our inferior into a fresh set of instructions. We want to preserve symbolic breakpoints on the list, since we have hopes that they can be reset after the new a.out's symbol table is read. However, any "raw" breakpoints must be removed from the list (e.g., the solib bp's), since their address is probably invalid now. And, we DON'T want to call delete_breakpoints() here, since that may write the bp's "shadow contents" (the instruction value that was overwritten witha TRAP instruction). Since we now have a new a.out, those shadow contents aren't valid. */ mark_breakpoints_out (); /* The target reports the exec event to the main thread, even if some other thread does the exec, and even if the main thread was stopped or already gone. We may still have non-leader threads of the process on our list. E.g., on targets that don't have thread exit events (like remote); or on native Linux in non-stop mode if there were only two threads in the inferior and the non-leader one is the one that execs (and nothing forces an update of the thread list up to here). When debugging remotely, it's best to avoid extra traffic, when possible, so avoid syncing the thread list with the target, and instead go ahead and delete all threads of the process but one that reported the event. Note this must be done before calling update_breakpoints_after_exec, as otherwise clearing the threads' resources would reference stale thread breakpoints -- it may have been one of these threads that stepped across the exec. We could just clear their stepping states, but as long as we're iterating, might as well delete them. Deleting them now rather than at the next user-visible stop provides a nicer sequence of events for user and MI notifications. */ ALL_THREADS_SAFE (th, tmp) if (ptid_get_pid (th->ptid) == pid && !ptid_equal (th->ptid, ptid)) delete_thread (th->ptid); /* We also need to clear any left over stale state for the leader/event thread. E.g., if there was any step-resume breakpoint or similar, it's gone now. We cannot truly step-to-next statement through an exec(). */ th = inferior_thread (); th->control.step_resume_breakpoint = NULL; th->control.exception_resume_breakpoint = NULL; th->control.single_step_breakpoints = NULL; th->control.step_range_start = 0; th->control.step_range_end = 0; /* The user may have had the main thread held stopped in the previous image (e.g., schedlock on, or non-stop). Release it now. */ th->stop_requested = 0; update_breakpoints_after_exec (); /* What is this a.out's name? */ process_ptid = pid_to_ptid (pid); printf_unfiltered (_("%s is executing new program: %s\n"), target_pid_to_str (process_ptid), exec_file_target); /* We've followed the inferior through an exec. Therefore, the inferior has essentially been killed & reborn. */ gdb_flush (gdb_stdout); breakpoint_init_inferior (inf_execd); exec_file_host = exec_file_find (exec_file_target, NULL); old_chain = make_cleanup (xfree, exec_file_host); /* If we were unable to map the executable target pathname onto a host pathname, tell the user that. Otherwise GDB's subsequent behavior is confusing. Maybe it would even be better to stop at this point so that the user can specify a file manually before continuing. */ if (exec_file_host == NULL) warning (_("Could not load symbols for executable %s.\n" "Do you need \"set sysroot\"?"), exec_file_target); /* Reset the shared library package. This ensures that we get a shlib event when the child reaches "_start", at which point the dld will have had a chance to initialize the child. */ /* Also, loading a symbol file below may trigger symbol lookups, and we don't want those to be satisfied by the libraries of the previous incarnation of this process. */ no_shared_libraries (NULL, 0); if (follow_exec_mode_string == follow_exec_mode_new) { /* The user wants to keep the old inferior and program spaces around. Create a new fresh one, and switch to it. */ /* Do exit processing for the original inferior before adding the new inferior so we don't have two active inferiors with the same ptid, which can confuse find_inferior_ptid. */ exit_inferior_num_silent (current_inferior ()->num); inf = add_inferior_with_spaces (); inf->pid = pid; target_follow_exec (inf, exec_file_target); set_current_inferior (inf); set_current_program_space (inf->pspace); add_thread (ptid); } else { /* The old description may no longer be fit for the new image. E.g, a 64-bit process exec'ed a 32-bit process. Clear the old description; we'll read a new one below. No need to do this on "follow-exec-mode new", as the old inferior stays around (its description is later cleared/refetched on restart). */ target_clear_description (); } gdb_assert (current_program_space == inf->pspace); /* Attempt to open the exec file. SYMFILE_DEFER_BP_RESET is used because the proper displacement for a PIE (Position Independent Executable) main symbol file will only be computed by solib_create_inferior_hook below. breakpoint_re_set would fail to insert the breakpoints with the zero displacement. */ try_open_exec_file (exec_file_host, inf, SYMFILE_DEFER_BP_RESET); do_cleanups (old_chain); /* If the target can specify a description, read it. Must do this after flipping to the new executable (because the target supplied description must be compatible with the executable's architecture, and the old executable may e.g., be 32-bit, while the new one 64-bit), and before anything involving memory or registers. */ target_find_description (); solib_create_inferior_hook (0); jit_inferior_created_hook (); breakpoint_re_set (); /* Reinsert all breakpoints. (Those which were symbolic have been reset to the proper address in the new a.out, thanks to symbol_file_command...). */ insert_breakpoints (); /* The next resume of this inferior should bring it to the shlib startup breakpoints. (If the user had also set bp's on "main" from the old (parent) process, then they'll auto- matically get reset there in the new process.). */ } /* The queue of threads that need to do a step-over operation to get past e.g., a breakpoint. What technique is used to step over the breakpoint/watchpoint does not matter -- all threads end up in the same queue, to maintain rough temporal order of execution, in order to avoid starvation, otherwise, we could e.g., find ourselves constantly stepping the same couple threads past their breakpoints over and over, if the single-step finish fast enough. */ struct thread_info *step_over_queue_head; /* Bit flags indicating what the thread needs to step over. */ enum step_over_what_flag { /* Step over a breakpoint. */ STEP_OVER_BREAKPOINT = 1, /* Step past a non-continuable watchpoint, in order to let the instruction execute so we can evaluate the watchpoint expression. */ STEP_OVER_WATCHPOINT = 2 }; DEF_ENUM_FLAGS_TYPE (enum step_over_what_flag, step_over_what); /* Info about an instruction that is being stepped over. */ struct step_over_info { /* If we're stepping past a breakpoint, this is the address space and address of the instruction the breakpoint is set at. We'll skip inserting all breakpoints here. Valid iff ASPACE is non-NULL. */ struct address_space *aspace; CORE_ADDR address; /* The instruction being stepped over triggers a nonsteppable watchpoint. If true, we'll skip inserting watchpoints. */ int nonsteppable_watchpoint_p; /* The thread's global number. */ int thread; }; /* The step-over info of the location that is being stepped over. Note that with async/breakpoint always-inserted mode, a user might set a new breakpoint/watchpoint/etc. exactly while a breakpoint is being stepped over. As setting a new breakpoint inserts all breakpoints, we need to make sure the breakpoint being stepped over isn't inserted then. We do that by only clearing the step-over info when the step-over is actually finished (or aborted). Presently GDB can only step over one breakpoint at any given time. Given threads that can't run code in the same address space as the breakpoint's can't really miss the breakpoint, GDB could be taught to step-over at most one breakpoint per address space (so this info could move to the address space object if/when GDB is extended). The set of breakpoints being stepped over will normally be much smaller than the set of all breakpoints, so a flag in the breakpoint location structure would be wasteful. A separate list also saves complexity and run-time, as otherwise we'd have to go through all breakpoint locations clearing their flag whenever we start a new sequence. Similar considerations weigh against storing this info in the thread object. Plus, not all step overs actually have breakpoint locations -- e.g., stepping past a single-step breakpoint, or stepping to complete a non-continuable watchpoint. */ static struct step_over_info step_over_info; /* Record the address of the breakpoint/instruction we're currently stepping over. */ static void set_step_over_info (struct address_space *aspace, CORE_ADDR address, int nonsteppable_watchpoint_p, int thread) { step_over_info.aspace = aspace; step_over_info.address = address; step_over_info.nonsteppable_watchpoint_p = nonsteppable_watchpoint_p; step_over_info.thread = thread; } /* Called when we're not longer stepping over a breakpoint / an instruction, so all breakpoints are free to be (re)inserted. */ static void clear_step_over_info (void) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: clear_step_over_info\n"); step_over_info.aspace = NULL; step_over_info.address = 0; step_over_info.nonsteppable_watchpoint_p = 0; step_over_info.thread = -1; } /* See infrun.h. */ int stepping_past_instruction_at (struct address_space *aspace, CORE_ADDR address) { return (step_over_info.aspace != NULL && breakpoint_address_match (aspace, address, step_over_info.aspace, step_over_info.address)); } /* See infrun.h. */ int thread_is_stepping_over_breakpoint (int thread) { return (step_over_info.thread != -1 && thread == step_over_info.thread); } /* See infrun.h. */ int stepping_past_nonsteppable_watchpoint (void) { return step_over_info.nonsteppable_watchpoint_p; } /* Returns true if step-over info is valid. */ static int step_over_info_valid_p (void) { return (step_over_info.aspace != NULL || stepping_past_nonsteppable_watchpoint ()); } /* Displaced stepping. */ /* In non-stop debugging mode, we must take special care to manage breakpoints properly; in particular, the traditional strategy for stepping a thread past a breakpoint it has hit is unsuitable. 'Displaced stepping' is a tactic for stepping one thread past a breakpoint it has hit while ensuring that other threads running concurrently will hit the breakpoint as they should. The traditional way to step a thread T off a breakpoint in a multi-threaded program in all-stop mode is as follows: a0) Initially, all threads are stopped, and breakpoints are not inserted. a1) We single-step T, leaving breakpoints uninserted. a2) We insert breakpoints, and resume all threads. In non-stop debugging, however, this strategy is unsuitable: we don't want to have to stop all threads in the system in order to continue or step T past a breakpoint. Instead, we use displaced stepping: n0) Initially, T is stopped, other threads are running, and breakpoints are inserted. n1) We copy the instruction "under" the breakpoint to a separate location, outside the main code stream, making any adjustments to the instruction, register, and memory state as directed by T's architecture. n2) We single-step T over the instruction at its new location. n3) We adjust the resulting register and memory state as directed by T's architecture. This includes resetting T's PC to point back into the main instruction stream. n4) We resume T. This approach depends on the following gdbarch methods: - gdbarch_max_insn_length and gdbarch_displaced_step_location indicate where to copy the instruction, and how much space must be reserved there. We use these in step n1. - gdbarch_displaced_step_copy_insn copies a instruction to a new address, and makes any necessary adjustments to the instruction, register contents, and memory. We use this in step n1. - gdbarch_displaced_step_fixup adjusts registers and memory after we have successfuly single-stepped the instruction, to yield the same effect the instruction would have had if we had executed it at its original address. We use this in step n3. - gdbarch_displaced_step_free_closure provides cleanup. The gdbarch_displaced_step_copy_insn and gdbarch_displaced_step_fixup functions must be written so that copying an instruction with gdbarch_displaced_step_copy_insn, single-stepping across the copied instruction, and then applying gdbarch_displaced_insn_fixup should have the same effects on the thread's memory and registers as stepping the instruction in place would have. Exactly which responsibilities fall to the copy and which fall to the fixup is up to the author of those functions. See the comments in gdbarch.sh for details. Note that displaced stepping and software single-step cannot currently be used in combination, although with some care I think they could be made to. Software single-step works by placing breakpoints on all possible subsequent instructions; if the displaced instruction is a PC-relative jump, those breakpoints could fall in very strange places --- on pages that aren't executable, or at addresses that are not proper instruction boundaries. (We do generally let other threads run while we wait to hit the software single-step breakpoint, and they might encounter such a corrupted instruction.) One way to work around this would be to have gdbarch_displaced_step_copy_insn fully simulate the effect of PC-relative instructions (and return NULL) on architectures that use software single-stepping. In non-stop mode, we can have independent and simultaneous step requests, so more than one thread may need to simultaneously step over a breakpoint. The current implementation assumes there is only one scratch space per process. In this case, we have to serialize access to the scratch space. If thread A wants to step over a breakpoint, but we are currently waiting for some other thread to complete a displaced step, we leave thread A stopped and place it in the displaced_step_request_queue. Whenever a displaced step finishes, we pick the next thread in the queue and start a new displaced step operation on it. See displaced_step_prepare and displaced_step_fixup for details. */ /* Per-inferior displaced stepping state. */ struct displaced_step_inferior_state { /* Pointer to next in linked list. */ struct displaced_step_inferior_state *next; /* The process this displaced step state refers to. */ int pid; /* True if preparing a displaced step ever failed. If so, we won't try displaced stepping for this inferior again. */ int failed_before; /* If this is not null_ptid, this is the thread carrying out a displaced single-step in process PID. This thread's state will require fixing up once it has completed its step. */ ptid_t step_ptid; /* The architecture the thread had when we stepped it. */ struct gdbarch *step_gdbarch; /* The closure provided gdbarch_displaced_step_copy_insn, to be used for post-step cleanup. */ struct displaced_step_closure *step_closure; /* The address of the original instruction, and the copy we made. */ CORE_ADDR step_original, step_copy; /* Saved contents of copy area. */ gdb_byte *step_saved_copy; }; /* The list of states of processes involved in displaced stepping presently. */ static struct displaced_step_inferior_state *displaced_step_inferior_states; /* Get the displaced stepping state of process PID. */ static struct displaced_step_inferior_state * get_displaced_stepping_state (int pid) { struct displaced_step_inferior_state *state; for (state = displaced_step_inferior_states; state != NULL; state = state->next) if (state->pid == pid) return state; return NULL; } /* Returns true if any inferior has a thread doing a displaced step. */ static int displaced_step_in_progress_any_inferior (void) { struct displaced_step_inferior_state *state; for (state = displaced_step_inferior_states; state != NULL; state = state->next) if (!ptid_equal (state->step_ptid, null_ptid)) return 1; return 0; } /* Return true if thread represented by PTID is doing a displaced step. */ static int displaced_step_in_progress_thread (ptid_t ptid) { struct displaced_step_inferior_state *displaced; gdb_assert (!ptid_equal (ptid, null_ptid)); displaced = get_displaced_stepping_state (ptid_get_pid (ptid)); return (displaced != NULL && ptid_equal (displaced->step_ptid, ptid)); } /* Return true if process PID has a thread doing a displaced step. */ static int displaced_step_in_progress (int pid) { struct displaced_step_inferior_state *displaced; displaced = get_displaced_stepping_state (pid); if (displaced != NULL && !ptid_equal (displaced->step_ptid, null_ptid)) return 1; return 0; } /* Add a new displaced stepping state for process PID to the displaced stepping state list, or return a pointer to an already existing entry, if it already exists. Never returns NULL. */ static struct displaced_step_inferior_state * add_displaced_stepping_state (int pid) { struct displaced_step_inferior_state *state; for (state = displaced_step_inferior_states; state != NULL; state = state->next) if (state->pid == pid) return state; state = XCNEW (struct displaced_step_inferior_state); state->pid = pid; state->next = displaced_step_inferior_states; displaced_step_inferior_states = state; return state; } /* If inferior is in displaced stepping, and ADDR equals to starting address of copy area, return corresponding displaced_step_closure. Otherwise, return NULL. */ struct displaced_step_closure* get_displaced_step_closure_by_addr (CORE_ADDR addr) { struct displaced_step_inferior_state *displaced = get_displaced_stepping_state (ptid_get_pid (inferior_ptid)); /* If checking the mode of displaced instruction in copy area. */ if (displaced && !ptid_equal (displaced->step_ptid, null_ptid) && (displaced->step_copy == addr)) return displaced->step_closure; return NULL; } /* Remove the displaced stepping state of process PID. */ static void remove_displaced_stepping_state (int pid) { struct displaced_step_inferior_state *it, **prev_next_p; gdb_assert (pid != 0); it = displaced_step_inferior_states; prev_next_p = &displaced_step_inferior_states; while (it) { if (it->pid == pid) { *prev_next_p = it->next; xfree (it); return; } prev_next_p = &it->next; it = *prev_next_p; } } static void infrun_inferior_exit (struct inferior *inf) { remove_displaced_stepping_state (inf->pid); } /* If ON, and the architecture supports it, GDB will use displaced stepping to step over breakpoints. If OFF, or if the architecture doesn't support it, GDB will instead use the traditional hold-and-step approach. If AUTO (which is the default), GDB will decide which technique to use to step over breakpoints depending on which of all-stop or non-stop mode is active --- displaced stepping in non-stop mode; hold-and-step in all-stop mode. */ static enum auto_boolean can_use_displaced_stepping = AUTO_BOOLEAN_AUTO; static void show_can_use_displaced_stepping (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (can_use_displaced_stepping == AUTO_BOOLEAN_AUTO) fprintf_filtered (file, _("Debugger's willingness to use displaced stepping " "to step over breakpoints is %s (currently %s).\n"), value, target_is_non_stop_p () ? "on" : "off"); else fprintf_filtered (file, _("Debugger's willingness to use displaced stepping " "to step over breakpoints is %s.\n"), value); } /* Return non-zero if displaced stepping can/should be used to step over breakpoints of thread TP. */ static int use_displaced_stepping (struct thread_info *tp) { struct regcache *regcache = get_thread_regcache (tp->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); struct displaced_step_inferior_state *displaced_state; displaced_state = get_displaced_stepping_state (ptid_get_pid (tp->ptid)); return (((can_use_displaced_stepping == AUTO_BOOLEAN_AUTO && target_is_non_stop_p ()) || can_use_displaced_stepping == AUTO_BOOLEAN_TRUE) && gdbarch_displaced_step_copy_insn_p (gdbarch) && find_record_target () == NULL && (displaced_state == NULL || !displaced_state->failed_before)); } /* Clean out any stray displaced stepping state. */ static void displaced_step_clear (struct displaced_step_inferior_state *displaced) { /* Indicate that there is no cleanup pending. */ displaced->step_ptid = null_ptid; if (displaced->step_closure) { gdbarch_displaced_step_free_closure (displaced->step_gdbarch, displaced->step_closure); displaced->step_closure = NULL; } } static void displaced_step_clear_cleanup (void *arg) { struct displaced_step_inferior_state *state = (struct displaced_step_inferior_state *) arg; displaced_step_clear (state); } /* Dump LEN bytes at BUF in hex to FILE, followed by a newline. */ void displaced_step_dump_bytes (struct ui_file *file, const gdb_byte *buf, size_t len) { int i; for (i = 0; i < len; i++) fprintf_unfiltered (file, "%02x ", buf[i]); fputs_unfiltered ("\n", file); } /* Prepare to single-step, using displaced stepping. Note that we cannot use displaced stepping when we have a signal to deliver. If we have a signal to deliver and an instruction to step over, then after the step, there will be no indication from the target whether the thread entered a signal handler or ignored the signal and stepped over the instruction successfully --- both cases result in a simple SIGTRAP. In the first case we mustn't do a fixup, and in the second case we must --- but we can't tell which. Comments in the code for 'random signals' in handle_inferior_event explain how we handle this case instead. Returns 1 if preparing was successful -- this thread is going to be stepped now; 0 if displaced stepping this thread got queued; or -1 if this instruction can't be displaced stepped. */ static int displaced_step_prepare_throw (ptid_t ptid) { struct cleanup *old_cleanups, *ignore_cleanups; struct thread_info *tp = find_thread_ptid (ptid); struct regcache *regcache = get_thread_regcache (ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); struct address_space *aspace = get_regcache_aspace (regcache); CORE_ADDR original, copy; ULONGEST len; struct displaced_step_closure *closure; struct displaced_step_inferior_state *displaced; int status; /* We should never reach this function if the architecture does not support displaced stepping. */ gdb_assert (gdbarch_displaced_step_copy_insn_p (gdbarch)); /* Nor if the thread isn't meant to step over a breakpoint. */ gdb_assert (tp->control.trap_expected); /* Disable range stepping while executing in the scratch pad. We want a single-step even if executing the displaced instruction in the scratch buffer lands within the stepping range (e.g., a jump/branch). */ tp->control.may_range_step = 0; /* We have to displaced step one thread at a time, as we only have access to a single scratch space per inferior. */ displaced = add_displaced_stepping_state (ptid_get_pid (ptid)); if (!ptid_equal (displaced->step_ptid, null_ptid)) { /* Already waiting for a displaced step to finish. Defer this request and place in queue. */ if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: deferring step of %s\n", target_pid_to_str (ptid)); thread_step_over_chain_enqueue (tp); return 0; } else { if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: stepping %s now\n", target_pid_to_str (ptid)); } displaced_step_clear (displaced); old_cleanups = save_inferior_ptid (); inferior_ptid = ptid; original = regcache_read_pc (regcache); copy = gdbarch_displaced_step_location (gdbarch); len = gdbarch_max_insn_length (gdbarch); if (breakpoint_in_range_p (aspace, copy, len)) { /* There's a breakpoint set in the scratch pad location range (which is usually around the entry point). We'd either install it before resuming, which would overwrite/corrupt the scratch pad, or if it was already inserted, this displaced step would overwrite it. The latter is OK in the sense that we already assume that no thread is going to execute the code in the scratch pad range (after initial startup) anyway, but the former is unacceptable. Simply punt and fallback to stepping over this breakpoint in-line. */ if (debug_displaced) { fprintf_unfiltered (gdb_stdlog, "displaced: breakpoint set in scratch pad. " "Stepping over breakpoint in-line instead.\n"); } do_cleanups (old_cleanups); return -1; } /* Save the original contents of the copy area. */ displaced->step_saved_copy = (gdb_byte *) xmalloc (len); ignore_cleanups = make_cleanup (free_current_contents, &displaced->step_saved_copy); status = target_read_memory (copy, displaced->step_saved_copy, len); if (status != 0) throw_error (MEMORY_ERROR, _("Error accessing memory address %s (%s) for " "displaced-stepping scratch space."), paddress (gdbarch, copy), safe_strerror (status)); if (debug_displaced) { fprintf_unfiltered (gdb_stdlog, "displaced: saved %s: ", paddress (gdbarch, copy)); displaced_step_dump_bytes (gdb_stdlog, displaced->step_saved_copy, len); }; closure = gdbarch_displaced_step_copy_insn (gdbarch, original, copy, regcache); if (closure == NULL) { /* The architecture doesn't know how or want to displaced step this instruction or instruction sequence. Fallback to stepping over the breakpoint in-line. */ do_cleanups (old_cleanups); return -1; } /* Save the information we need to fix things up if the step succeeds. */ displaced->step_ptid = ptid; displaced->step_gdbarch = gdbarch; displaced->step_closure = closure; displaced->step_original = original; displaced->step_copy = copy; make_cleanup (displaced_step_clear_cleanup, displaced); /* Resume execution at the copy. */ regcache_write_pc (regcache, copy); discard_cleanups (ignore_cleanups); do_cleanups (old_cleanups); if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: displaced pc to %s\n", paddress (gdbarch, copy)); return 1; } /* Wrapper for displaced_step_prepare_throw that disabled further attempts at displaced stepping if we get a memory error. */ static int displaced_step_prepare (ptid_t ptid) { int prepared = -1; TRY { prepared = displaced_step_prepare_throw (ptid); } CATCH (ex, RETURN_MASK_ERROR) { struct displaced_step_inferior_state *displaced_state; if (ex.error != MEMORY_ERROR && ex.error != NOT_SUPPORTED_ERROR) throw_exception (ex); if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: disabling displaced stepping: %s\n", ex.message); } /* Be verbose if "set displaced-stepping" is "on", silent if "auto". */ if (can_use_displaced_stepping == AUTO_BOOLEAN_TRUE) { warning (_("disabling displaced stepping: %s"), ex.message); } /* Disable further displaced stepping attempts. */ displaced_state = get_displaced_stepping_state (ptid_get_pid (ptid)); displaced_state->failed_before = 1; } END_CATCH return prepared; } static void write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int len) { struct cleanup *ptid_cleanup = save_inferior_ptid (); inferior_ptid = ptid; write_memory (memaddr, myaddr, len); do_cleanups (ptid_cleanup); } /* Restore the contents of the copy area for thread PTID. */ static void displaced_step_restore (struct displaced_step_inferior_state *displaced, ptid_t ptid) { ULONGEST len = gdbarch_max_insn_length (displaced->step_gdbarch); write_memory_ptid (ptid, displaced->step_copy, displaced->step_saved_copy, len); if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: restored %s %s\n", target_pid_to_str (ptid), paddress (displaced->step_gdbarch, displaced->step_copy)); } /* If we displaced stepped an instruction successfully, adjust registers and memory to yield the same effect the instruction would have had if we had executed it at its original address, and return 1. If the instruction didn't complete, relocate the PC and return -1. If the thread wasn't displaced stepping, return 0. */ static int displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal) { struct cleanup *old_cleanups; struct displaced_step_inferior_state *displaced = get_displaced_stepping_state (ptid_get_pid (event_ptid)); int ret; /* Was any thread of this process doing a displaced step? */ if (displaced == NULL) return 0; /* Was this event for the pid we displaced? */ if (ptid_equal (displaced->step_ptid, null_ptid) || ! ptid_equal (displaced->step_ptid, event_ptid)) return 0; old_cleanups = make_cleanup (displaced_step_clear_cleanup, displaced); displaced_step_restore (displaced, displaced->step_ptid); /* Fixup may need to read memory/registers. Switch to the thread that we're fixing up. Also, target_stopped_by_watchpoint checks the current thread. */ switch_to_thread (event_ptid); /* Did the instruction complete successfully? */ if (signal == GDB_SIGNAL_TRAP && !(target_stopped_by_watchpoint () && (gdbarch_have_nonsteppable_watchpoint (displaced->step_gdbarch) || target_have_steppable_watchpoint))) { /* Fix up the resulting state. */ gdbarch_displaced_step_fixup (displaced->step_gdbarch, displaced->step_closure, displaced->step_original, displaced->step_copy, get_thread_regcache (displaced->step_ptid)); ret = 1; } else { /* Since the instruction didn't complete, all we can do is relocate the PC. */ struct regcache *regcache = get_thread_regcache (event_ptid); CORE_ADDR pc = regcache_read_pc (regcache); pc = displaced->step_original + (pc - displaced->step_copy); regcache_write_pc (regcache, pc); ret = -1; } do_cleanups (old_cleanups); displaced->step_ptid = null_ptid; return ret; } /* Data to be passed around while handling an event. This data is discarded between events. */ struct execution_control_state { ptid_t ptid; /* The thread that got the event, if this was a thread event; NULL otherwise. */ struct thread_info *event_thread; struct target_waitstatus ws; int stop_func_filled_in; CORE_ADDR stop_func_start; CORE_ADDR stop_func_end; const char *stop_func_name; int wait_some_more; /* True if the event thread hit the single-step breakpoint of another thread. Thus the event doesn't cause a stop, the thread needs to be single-stepped past the single-step breakpoint before we can switch back to the original stepping thread. */ int hit_singlestep_breakpoint; }; /* Clear ECS and set it to point at TP. */ static void reset_ecs (struct execution_control_state *ecs, struct thread_info *tp) { memset (ecs, 0, sizeof (*ecs)); ecs->event_thread = tp; ecs->ptid = tp->ptid; } static void keep_going_pass_signal (struct execution_control_state *ecs); static void prepare_to_wait (struct execution_control_state *ecs); static int keep_going_stepped_thread (struct thread_info *tp); static step_over_what thread_still_needs_step_over (struct thread_info *tp); /* Are there any pending step-over requests? If so, run all we can now and return true. Otherwise, return false. */ static int start_step_over (void) { struct thread_info *tp, *next; /* Don't start a new step-over if we already have an in-line step-over operation ongoing. */ if (step_over_info_valid_p ()) return 0; for (tp = step_over_queue_head; tp != NULL; tp = next) { struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; step_over_what step_what; int must_be_in_line; next = thread_step_over_chain_next (tp); /* If this inferior already has a displaced step in process, don't start a new one. */ if (displaced_step_in_progress (ptid_get_pid (tp->ptid))) continue; step_what = thread_still_needs_step_over (tp); must_be_in_line = ((step_what & STEP_OVER_WATCHPOINT) || ((step_what & STEP_OVER_BREAKPOINT) && !use_displaced_stepping (tp))); /* We currently stop all threads of all processes to step-over in-line. If we need to start a new in-line step-over, let any pending displaced steps finish first. */ if (must_be_in_line && displaced_step_in_progress_any_inferior ()) return 0; thread_step_over_chain_remove (tp); if (step_over_queue_head == NULL) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: step-over queue now empty\n"); } if (tp->control.trap_expected || tp->resumed || tp->executing) { internal_error (__FILE__, __LINE__, "[%s] has inconsistent state: " "trap_expected=%d, resumed=%d, executing=%d\n", target_pid_to_str (tp->ptid), tp->control.trap_expected, tp->resumed, tp->executing); } if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resuming [%s] for step-over\n", target_pid_to_str (tp->ptid)); /* keep_going_pass_signal skips the step-over if the breakpoint is no longer inserted. In all-stop, we want to keep looking for a thread that needs a step-over instead of resuming TP, because we wouldn't be able to resume anything else until the target stops again. In non-stop, the resume always resumes only TP, so it's OK to let the thread resume freely. */ if (!target_is_non_stop_p () && !step_what) continue; switch_to_thread (tp->ptid); reset_ecs (ecs, tp); keep_going_pass_signal (ecs); if (!ecs->wait_some_more) error (_("Command aborted.")); gdb_assert (tp->resumed); /* If we started a new in-line step-over, we're done. */ if (step_over_info_valid_p ()) { gdb_assert (tp->control.trap_expected); return 1; } if (!target_is_non_stop_p ()) { /* On all-stop, shouldn't have resumed unless we needed a step over. */ gdb_assert (tp->control.trap_expected || tp->step_after_step_resume_breakpoint); /* With remote targets (at least), in all-stop, we can't issue any further remote commands until the program stops again. */ return 1; } /* Either the thread no longer needed a step-over, or a new displaced stepping sequence started. Even in the latter case, continue looking. Maybe we can also start another displaced step on a thread of other process. */ } return 0; } /* Update global variables holding ptids to hold NEW_PTID if they were holding OLD_PTID. */ static void infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid) { struct displaced_step_inferior_state *displaced; if (ptid_equal (inferior_ptid, old_ptid)) inferior_ptid = new_ptid; for (displaced = displaced_step_inferior_states; displaced; displaced = displaced->next) { if (ptid_equal (displaced->step_ptid, old_ptid)) displaced->step_ptid = new_ptid; } } /* Resuming. */ /* Things to clean up if we QUIT out of resume (). */ static void resume_cleanups (void *ignore) { if (!ptid_equal (inferior_ptid, null_ptid)) delete_single_step_breakpoints (inferior_thread ()); normal_stop (); } static const char schedlock_off[] = "off"; static const char schedlock_on[] = "on"; static const char schedlock_step[] = "step"; static const char schedlock_replay[] = "replay"; static const char *const scheduler_enums[] = { schedlock_off, schedlock_on, schedlock_step, schedlock_replay, NULL }; static const char *scheduler_mode = schedlock_replay; static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Mode for locking scheduler " "during execution is \"%s\".\n"), value); } static void set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c) { if (!target_can_lock_scheduler) { scheduler_mode = schedlock_off; error (_("Target '%s' cannot support this command."), target_shortname); } } /* True if execution commands resume all threads of all processes by default; otherwise, resume only threads of the current inferior process. */ int sched_multi = 0; /* Try to setup for software single stepping over the specified location. Return 1 if target_resume() should use hardware single step. GDBARCH the current gdbarch. PC the location to step over. */ static int maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc) { int hw_step = 1; if (execution_direction == EXEC_FORWARD && gdbarch_software_single_step_p (gdbarch)) hw_step = !insert_single_step_breakpoints (gdbarch); return hw_step; } /* See infrun.h. */ ptid_t user_visible_resume_ptid (int step) { ptid_t resume_ptid; if (non_stop) { /* With non-stop mode on, threads are always handled individually. */ resume_ptid = inferior_ptid; } else if ((scheduler_mode == schedlock_on) || (scheduler_mode == schedlock_step && step)) { /* User-settable 'scheduler' mode requires solo thread resume. */ resume_ptid = inferior_ptid; } else if ((scheduler_mode == schedlock_replay) && target_record_will_replay (minus_one_ptid, execution_direction)) { /* User-settable 'scheduler' mode requires solo thread resume in replay mode. */ resume_ptid = inferior_ptid; } else if (!sched_multi && target_supports_multi_process ()) { /* Resume all threads of the current process (and none of other processes). */ resume_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid)); } else { /* Resume all threads of all processes. */ resume_ptid = RESUME_ALL; } return resume_ptid; } /* Return a ptid representing the set of threads that we will resume, in the perspective of the target, assuming run control handling does not require leaving some threads stopped (e.g., stepping past breakpoint). USER_STEP indicates whether we're about to start the target for a stepping command. */ static ptid_t internal_resume_ptid (int user_step) { /* In non-stop, we always control threads individually. Note that the target may always work in non-stop mode even with "set non-stop off", in which case user_visible_resume_ptid could return a wildcard ptid. */ if (target_is_non_stop_p ()) return inferior_ptid; else return user_visible_resume_ptid (user_step); } /* Wrapper for target_resume, that handles infrun-specific bookkeeping. */ static void do_target_resume (ptid_t resume_ptid, int step, enum gdb_signal sig) { struct thread_info *tp = inferior_thread (); /* Install inferior's terminal modes. */ target_terminal_inferior (); /* Avoid confusing the next resume, if the next stop/resume happens to apply to another thread. */ tp->suspend.stop_signal = GDB_SIGNAL_0; /* Advise target which signals may be handled silently. If we have removed breakpoints because we are stepping over one in-line (in any thread), we need to receive all signals to avoid accidentally skipping a breakpoint during execution of a signal handler. Likewise if we're displaced stepping, otherwise a trap for a breakpoint in a signal handler might be confused with the displaced step finishing. We don't make the displaced_step_fixup step distinguish the cases instead, because: - a backtrace while stopped in the signal handler would show the scratch pad as frame older than the signal handler, instead of the real mainline code. - when the thread is later resumed, the signal handler would return to the scratch pad area, which would no longer be valid. */ if (step_over_info_valid_p () || displaced_step_in_progress (ptid_get_pid (tp->ptid))) target_pass_signals (0, NULL); else target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass); target_resume (resume_ptid, step, sig); target_commit_resume (); } /* Resume the inferior, but allow a QUIT. This is useful if the user wants to interrupt some lengthy single-stepping operation (for child processes, the SIGINT goes to the inferior, and so we get a SIGINT random_signal, but for remote debugging and perhaps other targets, that's not true). SIG is the signal to give the inferior (zero for none). */ void resume (enum gdb_signal sig) { struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); struct thread_info *tp = inferior_thread (); CORE_ADDR pc = regcache_read_pc (regcache); struct address_space *aspace = get_regcache_aspace (regcache); ptid_t resume_ptid; /* This represents the user's step vs continue request. When deciding whether "set scheduler-locking step" applies, it's the user's intention that counts. */ const int user_step = tp->control.stepping_command; /* This represents what we'll actually request the target to do. This can decay from a step to a continue, if e.g., we need to implement single-stepping with breakpoints (software single-step). */ int step; gdb_assert (!thread_is_in_step_over_chain (tp)); QUIT; if (tp->suspend.waitstatus_pending_p) { if (debug_infrun) { char *statstr; statstr = target_waitstatus_to_string (&tp->suspend.waitstatus); fprintf_unfiltered (gdb_stdlog, "infrun: resume: thread %s has pending wait status %s " "(currently_stepping=%d).\n", target_pid_to_str (tp->ptid), statstr, currently_stepping (tp)); xfree (statstr); } tp->resumed = 1; /* FIXME: What should we do if we are supposed to resume this thread with a signal? Maybe we should maintain a queue of pending signals to deliver. */ if (sig != GDB_SIGNAL_0) { warning (_("Couldn't deliver signal %s to %s."), gdb_signal_to_name (sig), target_pid_to_str (tp->ptid)); } tp->suspend.stop_signal = GDB_SIGNAL_0; discard_cleanups (old_cleanups); if (target_can_async_p ()) target_async (1); return; } tp->stepped_breakpoint = 0; /* Depends on stepped_breakpoint. */ step = currently_stepping (tp); if (current_inferior ()->waiting_for_vfork_done) { /* Don't try to single-step a vfork parent that is waiting for the child to get out of the shared memory region (by exec'ing or exiting). This is particularly important on software single-step archs, as the child process would trip on the software single step breakpoint inserted for the parent process. Since the parent will not actually execute any instruction until the child is out of the shared region (such are vfork's semantics), it is safe to simply continue it. Eventually, we'll see a TARGET_WAITKIND_VFORK_DONE event for the parent, and tell it to `keep_going', which automatically re-sets it stepping. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume : clear step\n"); step = 0; } if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%d, signal=%s), " "trap_expected=%d, current thread [%s] at %s\n", step, gdb_signal_to_symbol_string (sig), tp->control.trap_expected, target_pid_to_str (inferior_ptid), paddress (gdbarch, pc)); /* Normally, by the time we reach `resume', the breakpoints are either removed or inserted, as appropriate. The exception is if we're sitting at a permanent breakpoint; we need to step over it, but permanent breakpoints can't be removed. So we have to test for it here. */ if (breakpoint_here_p (aspace, pc) == permanent_breakpoint_here) { if (sig != GDB_SIGNAL_0) { /* We have a signal to pass to the inferior. The resume may, or may not take us to the signal handler. If this is a step, we'll need to stop in the signal handler, if there's one, (if the target supports stepping into handlers), or in the next mainline instruction, if there's no handler. If this is a continue, we need to be sure to run the handler with all breakpoints inserted. In all cases, set a breakpoint at the current address (where the handler returns to), and once that breakpoint is hit, resume skipping the permanent breakpoint. If that breakpoint isn't hit, then we've stepped into the signal handler (or hit some other event). We'll delete the step-resume breakpoint then. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume: skipping permanent breakpoint, " "deliver signal first\n"); clear_step_over_info (); tp->control.trap_expected = 0; if (tp->control.step_resume_breakpoint == NULL) { /* Set a "high-priority" step-resume, as we don't want user breakpoints at PC to trigger (again) when this hits. */ insert_hp_step_resume_breakpoint_at_frame (get_current_frame ()); gdb_assert (tp->control.step_resume_breakpoint->loc->permanent); tp->step_after_step_resume_breakpoint = step; } insert_breakpoints (); } else { /* There's no signal to pass, we can go ahead and skip the permanent breakpoint manually. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume: skipping permanent breakpoint\n"); gdbarch_skip_permanent_breakpoint (gdbarch, regcache); /* Update pc to reflect the new address from which we will execute instructions. */ pc = regcache_read_pc (regcache); if (step) { /* We've already advanced the PC, so the stepping part is done. Now we need to arrange for a trap to be reported to handle_inferior_event. Set a breakpoint at the current PC, and run to it. Don't update prev_pc, because if we end in switch_back_to_stepped_thread, we want the "expected thread advanced also" branch to be taken. IOW, we don't want this thread to step further from PC (overstep). */ gdb_assert (!step_over_info_valid_p ()); insert_single_step_breakpoint (gdbarch, aspace, pc); insert_breakpoints (); resume_ptid = internal_resume_ptid (user_step); do_target_resume (resume_ptid, 0, GDB_SIGNAL_0); discard_cleanups (old_cleanups); tp->resumed = 1; return; } } } /* If we have a breakpoint to step over, make sure to do a single step only. Same if we have software watchpoints. */ if (tp->control.trap_expected || bpstat_should_step ()) tp->control.may_range_step = 0; /* If enabled, step over breakpoints by executing a copy of the instruction at a different address. We can't use displaced stepping when we have a signal to deliver; the comments for displaced_step_prepare explain why. The comments in the handle_inferior event for dealing with 'random signals' explain what we do instead. We can't use displaced stepping when we are waiting for vfork_done event, displaced stepping breaks the vfork child similarly as single step software breakpoint. */ if (tp->control.trap_expected && use_displaced_stepping (tp) && !step_over_info_valid_p () && sig == GDB_SIGNAL_0 && !current_inferior ()->waiting_for_vfork_done) { int prepared = displaced_step_prepare (inferior_ptid); if (prepared == 0) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "Got placed in step-over queue\n"); tp->control.trap_expected = 0; discard_cleanups (old_cleanups); return; } else if (prepared < 0) { /* Fallback to stepping over the breakpoint in-line. */ if (target_is_non_stop_p ()) stop_all_threads (); set_step_over_info (get_regcache_aspace (regcache), regcache_read_pc (regcache), 0, tp->global_num); step = maybe_software_singlestep (gdbarch, pc); insert_breakpoints (); } else if (prepared > 0) { struct displaced_step_inferior_state *displaced; /* Update pc to reflect the new address from which we will execute instructions due to displaced stepping. */ pc = regcache_read_pc (get_thread_regcache (inferior_ptid)); displaced = get_displaced_stepping_state (ptid_get_pid (inferior_ptid)); step = gdbarch_displaced_step_hw_singlestep (gdbarch, displaced->step_closure); } } /* Do we need to do it the hard way, w/temp breakpoints? */ else if (step) step = maybe_software_singlestep (gdbarch, pc); /* Currently, our software single-step implementation leads to different results than hardware single-stepping in one situation: when stepping into delivering a signal which has an associated signal handler, hardware single-step will stop at the first instruction of the handler, while software single-step will simply skip execution of the handler. For now, this difference in behavior is accepted since there is no easy way to actually implement single-stepping into a signal handler without kernel support. However, there is one scenario where this difference leads to follow-on problems: if we're stepping off a breakpoint by removing all breakpoints and then single-stepping. In this case, the software single-step behavior means that even if there is a *breakpoint* in the signal handler, GDB still would not stop. Fortunately, we can at least fix this particular issue. We detect here the case where we are about to deliver a signal while software single-stepping with breakpoints removed. In this situation, we revert the decisions to remove all breakpoints and insert single- step breakpoints, and instead we install a step-resume breakpoint at the current address, deliver the signal without stepping, and once we arrive back at the step-resume breakpoint, actually step over the breakpoint we originally wanted to step over. */ if (thread_has_single_step_breakpoints_set (tp) && sig != GDB_SIGNAL_0 && step_over_info_valid_p ()) { /* If we have nested signals or a pending signal is delivered immediately after a handler returns, might might already have a step-resume breakpoint set on the earlier handler. We cannot set another step-resume breakpoint; just continue on until the original breakpoint is hit. */ if (tp->control.step_resume_breakpoint == NULL) { insert_hp_step_resume_breakpoint_at_frame (get_current_frame ()); tp->step_after_step_resume_breakpoint = 1; } delete_single_step_breakpoints (tp); clear_step_over_info (); tp->control.trap_expected = 0; insert_breakpoints (); } /* If STEP is set, it's a request to use hardware stepping facilities. But in that case, we should never use singlestep breakpoint. */ gdb_assert (!(thread_has_single_step_breakpoints_set (tp) && step)); /* Decide the set of threads to ask the target to resume. */ if (tp->control.trap_expected) { /* We're allowing a thread to run past a breakpoint it has hit, either by single-stepping the thread with the breakpoint removed, or by displaced stepping, with the breakpoint inserted. In the former case, we need to single-step only this thread, and keep others stopped, as they can miss this breakpoint if allowed to run. That's not really a problem for displaced stepping, but, we still keep other threads stopped, in case another thread is also stopped for a breakpoint waiting for its turn in the displaced stepping queue. */ resume_ptid = inferior_ptid; } else resume_ptid = internal_resume_ptid (user_step); if (execution_direction != EXEC_REVERSE && step && breakpoint_inserted_here_p (aspace, pc)) { /* There are two cases where we currently need to step a breakpoint instruction when we have a signal to deliver: - See handle_signal_stop where we handle random signals that could take out us out of the stepping range. Normally, in that case we end up continuing (instead of stepping) over the signal handler with a breakpoint at PC, but there are cases where we should _always_ single-step, even if we have a step-resume breakpoint, like when a software watchpoint is set. Assuming single-stepping and delivering a signal at the same time would takes us to the signal handler, then we could have removed the breakpoint at PC to step over it. However, some hardware step targets (like e.g., Mac OS) can't step into signal handlers, and for those, we need to leave the breakpoint at PC inserted, as otherwise if the handler recurses and executes PC again, it'll miss the breakpoint. So we leave the breakpoint inserted anyway, but we need to record that we tried to step a breakpoint instruction, so that adjust_pc_after_break doesn't end up confused. - In non-stop if we insert a breakpoint (e.g., a step-resume) in one thread after another thread that was stepping had been momentarily paused for a step-over. When we re-resume the stepping thread, it may be resumed from that address with a breakpoint that hasn't trapped yet. Seen with gdb.threads/non-stop-fair-events.exp, on targets that don't do displaced stepping. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume: [%s] stepped breakpoint\n", target_pid_to_str (tp->ptid)); tp->stepped_breakpoint = 1; /* Most targets can step a breakpoint instruction, thus executing it normally. But if this one cannot, just continue and we will hit it anyway. */ if (gdbarch_cannot_step_breakpoint (gdbarch)) step = 0; } if (debug_displaced && tp->control.trap_expected && use_displaced_stepping (tp) && !step_over_info_valid_p ()) { struct regcache *resume_regcache = get_thread_regcache (tp->ptid); struct gdbarch *resume_gdbarch = get_regcache_arch (resume_regcache); CORE_ADDR actual_pc = regcache_read_pc (resume_regcache); gdb_byte buf[4]; fprintf_unfiltered (gdb_stdlog, "displaced: run %s: ", paddress (resume_gdbarch, actual_pc)); read_memory (actual_pc, buf, sizeof (buf)); displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf)); } if (tp->control.may_range_step) { /* If we're resuming a thread with the PC out of the step range, then we're doing some nested/finer run control operation, like stepping the thread out of the dynamic linker or the displaced stepping scratch pad. We shouldn't have allowed a range step then. */ gdb_assert (pc_in_thread_step_range (pc, tp)); } do_target_resume (resume_ptid, step, sig); tp->resumed = 1; discard_cleanups (old_cleanups); } /* Proceeding. */ /* See infrun.h. */ /* Counter that tracks number of user visible stops. This can be used to tell whether a command has proceeded the inferior past the current location. This allows e.g., inferior function calls in breakpoint commands to not interrupt the command list. When the call finishes successfully, the inferior is standing at the same breakpoint as if nothing happened (and so we don't call normal_stop). */ static ULONGEST current_stop_id; /* See infrun.h. */ ULONGEST get_stop_id (void) { return current_stop_id; } /* Called when we report a user visible stop. */ static void new_stop_id (void) { current_stop_id++; } /* Clear out all variables saying what to do when inferior is continued. First do this, then set the ones you want, then call `proceed'. */ static void clear_proceed_status_thread (struct thread_info *tp) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: clear_proceed_status_thread (%s)\n", target_pid_to_str (tp->ptid)); /* If we're starting a new sequence, then the previous finished single-step is no longer relevant. */ if (tp->suspend.waitstatus_pending_p) { if (tp->suspend.stop_reason == TARGET_STOPPED_BY_SINGLE_STEP) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: clear_proceed_status: pending " "event of %s was a finished step. " "Discarding.\n", target_pid_to_str (tp->ptid)); tp->suspend.waitstatus_pending_p = 0; tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON; } else if (debug_infrun) { char *statstr; statstr = target_waitstatus_to_string (&tp->suspend.waitstatus); fprintf_unfiltered (gdb_stdlog, "infrun: clear_proceed_status_thread: thread %s " "has pending wait status %s " "(currently_stepping=%d).\n", target_pid_to_str (tp->ptid), statstr, currently_stepping (tp)); xfree (statstr); } } /* If this signal should not be seen by program, give it zero. Used for debugging signals. */ if (!signal_pass_state (tp->suspend.stop_signal)) tp->suspend.stop_signal = GDB_SIGNAL_0; thread_fsm_delete (tp->thread_fsm); tp->thread_fsm = NULL; tp->control.trap_expected = 0; tp->control.step_range_start = 0; tp->control.step_range_end = 0; tp->control.may_range_step = 0; tp->control.step_frame_id = null_frame_id; tp->control.step_stack_frame_id = null_frame_id; tp->control.step_over_calls = STEP_OVER_UNDEBUGGABLE; tp->control.step_start_function = NULL; tp->stop_requested = 0; tp->control.stop_step = 0; tp->control.proceed_to_finish = 0; tp->control.stepping_command = 0; /* Discard any remaining commands or status from previous stop. */ bpstat_clear (&tp->control.stop_bpstat); } void clear_proceed_status (int step) { /* With scheduler-locking replay, stop replaying other threads if we're not replaying the user-visible resume ptid. This is a convenience feature to not require the user to explicitly stop replaying the other threads. We're assuming that the user's intent is to resume tracing the recorded process. */ if (!non_stop && scheduler_mode == schedlock_replay && target_record_is_replaying (minus_one_ptid) && !target_record_will_replay (user_visible_resume_ptid (step), execution_direction)) target_record_stop_replaying (); if (!non_stop) { struct thread_info *tp; ptid_t resume_ptid; resume_ptid = user_visible_resume_ptid (step); /* In all-stop mode, delete the per-thread status of all threads we're about to resume, implicitly and explicitly. */ ALL_NON_EXITED_THREADS (tp) { if (!ptid_match (tp->ptid, resume_ptid)) continue; clear_proceed_status_thread (tp); } } if (!ptid_equal (inferior_ptid, null_ptid)) { struct inferior *inferior; if (non_stop) { /* If in non-stop mode, only delete the per-thread status of the current thread. */ clear_proceed_status_thread (inferior_thread ()); } inferior = current_inferior (); inferior->control.stop_soon = NO_STOP_QUIETLY; } observer_notify_about_to_proceed (); } /* Returns true if TP is still stopped at a breakpoint that needs stepping-over in order to make progress. If the breakpoint is gone meanwhile, we can skip the whole step-over dance. */ static int thread_still_needs_step_over_bp (struct thread_info *tp) { if (tp->stepping_over_breakpoint) { struct regcache *regcache = get_thread_regcache (tp->ptid); if (breakpoint_here_p (get_regcache_aspace (regcache), regcache_read_pc (regcache)) == ordinary_breakpoint_here) return 1; tp->stepping_over_breakpoint = 0; } return 0; } /* Check whether thread TP still needs to start a step-over in order to make progress when resumed. Returns an bitwise or of enum step_over_what bits, indicating what needs to be stepped over. */ static step_over_what thread_still_needs_step_over (struct thread_info *tp) { step_over_what what = 0; if (thread_still_needs_step_over_bp (tp)) what |= STEP_OVER_BREAKPOINT; if (tp->stepping_over_watchpoint && !target_have_steppable_watchpoint) what |= STEP_OVER_WATCHPOINT; return what; } /* Returns true if scheduler locking applies. STEP indicates whether we're about to do a step/next-like command to a thread. */ static int schedlock_applies (struct thread_info *tp) { return (scheduler_mode == schedlock_on || (scheduler_mode == schedlock_step && tp->control.stepping_command) || (scheduler_mode == schedlock_replay && target_record_will_replay (minus_one_ptid, execution_direction))); } /* Basic routine for continuing the program in various fashions. ADDR is the address to resume at, or -1 for resume where stopped. SIGGNAL is the signal to give it, or 0 for none, or -1 for act according to how it stopped. STEP is nonzero if should trap after one instruction. -1 means return after that and print nothing. You should probably set various step_... variables before calling here, if you are stepping. You should call clear_proceed_status before calling proceed. */ void proceed (CORE_ADDR addr, enum gdb_signal siggnal) { struct regcache *regcache; struct gdbarch *gdbarch; struct thread_info *tp; CORE_ADDR pc; struct address_space *aspace; ptid_t resume_ptid; struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; struct cleanup *old_chain; struct cleanup *defer_resume_cleanup; int started; /* If we're stopped at a fork/vfork, follow the branch set by the "set follow-fork-mode" command; otherwise, we'll just proceed resuming the current thread. */ if (!follow_fork ()) { /* The target for some reason decided not to resume. */ normal_stop (); if (target_can_async_p ()) inferior_event_handler (INF_EXEC_COMPLETE, NULL); return; } /* We'll update this if & when we switch to a new thread. */ previous_inferior_ptid = inferior_ptid; regcache = get_current_regcache (); gdbarch = get_regcache_arch (regcache); aspace = get_regcache_aspace (regcache); pc = regcache_read_pc (regcache); tp = inferior_thread (); /* Fill in with reasonable starting values. */ init_thread_stepping_state (tp); gdb_assert (!thread_is_in_step_over_chain (tp)); if (addr == (CORE_ADDR) -1) { if (pc == stop_pc && breakpoint_here_p (aspace, pc) == ordinary_breakpoint_here && execution_direction != EXEC_REVERSE) /* There is a breakpoint at the address we will resume at, step one instruction before inserting breakpoints so that we do not stop right away (and report a second hit at this breakpoint). Note, we don't do this in reverse, because we won't actually be executing the breakpoint insn anyway. We'll be (un-)executing the previous instruction. */ tp->stepping_over_breakpoint = 1; else if (gdbarch_single_step_through_delay_p (gdbarch) && gdbarch_single_step_through_delay (gdbarch, get_current_frame ())) /* We stepped onto an instruction that needs to be stepped again before re-inserting the breakpoint, do so. */ tp->stepping_over_breakpoint = 1; } else { regcache_write_pc (regcache, addr); } if (siggnal != GDB_SIGNAL_DEFAULT) tp->suspend.stop_signal = siggnal; resume_ptid = user_visible_resume_ptid (tp->control.stepping_command); /* If an exception is thrown from this point on, make sure to propagate GDB's knowledge of the executing state to the frontend/user running state. */ old_chain = make_cleanup (finish_thread_state_cleanup, &resume_ptid); /* Even if RESUME_PTID is a wildcard, and we end up resuming fewer threads (e.g., we might need to set threads stepping over breakpoints first), from the user/frontend's point of view, all threads in RESUME_PTID are now running. Unless we're calling an inferior function, as in that case we pretend the inferior doesn't run at all. */ if (!tp->control.in_infcall) set_running (resume_ptid, 1); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: proceed (addr=%s, signal=%s)\n", paddress (gdbarch, addr), gdb_signal_to_symbol_string (siggnal)); annotate_starting (); /* Make sure that output from GDB appears before output from the inferior. */ gdb_flush (gdb_stdout); /* In a multi-threaded task we may select another thread and then continue or step. But if a thread that we're resuming had stopped at a breakpoint, it will immediately cause another breakpoint stop without any execution (i.e. it will report a breakpoint hit incorrectly). So we must step over it first. Look for threads other than the current (TP) that reported a breakpoint hit and haven't been resumed yet since. */ /* If scheduler locking applies, we can avoid iterating over all threads. */ if (!non_stop && !schedlock_applies (tp)) { struct thread_info *current = tp; ALL_NON_EXITED_THREADS (tp) { /* Ignore the current thread here. It's handled afterwards. */ if (tp == current) continue; /* Ignore threads of processes we're not resuming. */ if (!ptid_match (tp->ptid, resume_ptid)) continue; if (!thread_still_needs_step_over (tp)) continue; gdb_assert (!thread_is_in_step_over_chain (tp)); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: need to step-over [%s] first\n", target_pid_to_str (tp->ptid)); thread_step_over_chain_enqueue (tp); } tp = current; } /* Enqueue the current thread last, so that we move all other threads over their breakpoints first. */ if (tp->stepping_over_breakpoint) thread_step_over_chain_enqueue (tp); /* If the thread isn't started, we'll still need to set its prev_pc, so that switch_back_to_stepped_thread knows the thread hasn't advanced. Must do this before resuming any thread, as in all-stop/remote, once we resume we can't send any other packet until the target stops again. */ tp->prev_pc = regcache_read_pc (regcache); defer_resume_cleanup = make_cleanup_defer_target_commit_resume (); started = start_step_over (); if (step_over_info_valid_p ()) { /* Either this thread started a new in-line step over, or some other thread was already doing one. In either case, don't resume anything else until the step-over is finished. */ } else if (started && !target_is_non_stop_p ()) { /* A new displaced stepping sequence was started. In all-stop, we can't talk to the target anymore until it next stops. */ } else if (!non_stop && target_is_non_stop_p ()) { /* In all-stop, but the target is always in non-stop mode. Start all other threads that are implicitly resumed too. */ ALL_NON_EXITED_THREADS (tp) { /* Ignore threads of processes we're not resuming. */ if (!ptid_match (tp->ptid, resume_ptid)) continue; if (tp->resumed) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: proceed: [%s] resumed\n", target_pid_to_str (tp->ptid)); gdb_assert (tp->executing || tp->suspend.waitstatus_pending_p); continue; } if (thread_is_in_step_over_chain (tp)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: proceed: [%s] needs step-over\n", target_pid_to_str (tp->ptid)); continue; } if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: proceed: resuming %s\n", target_pid_to_str (tp->ptid)); reset_ecs (ecs, tp); switch_to_thread (tp->ptid); keep_going_pass_signal (ecs); if (!ecs->wait_some_more) error (_("Command aborted.")); } } else if (!tp->resumed && !thread_is_in_step_over_chain (tp)) { /* The thread wasn't started, and isn't queued, run it now. */ reset_ecs (ecs, tp); switch_to_thread (tp->ptid); keep_going_pass_signal (ecs); if (!ecs->wait_some_more) error (_("Command aborted.")); } do_cleanups (defer_resume_cleanup); target_commit_resume (); discard_cleanups (old_chain); /* Tell the event loop to wait for it to stop. If the target supports asynchronous execution, it'll do this from within target_resume. */ if (!target_can_async_p ()) mark_async_event_handler (infrun_async_inferior_event_token); } /* Start remote-debugging of a machine over a serial link. */ void start_remote (int from_tty) { struct inferior *inferior; inferior = current_inferior (); inferior->control.stop_soon = STOP_QUIETLY_REMOTE; /* Always go on waiting for the target, regardless of the mode. */ /* FIXME: cagney/1999-09-23: At present it isn't possible to indicate to wait_for_inferior that a target should timeout if nothing is returned (instead of just blocking). Because of this, targets expecting an immediate response need to, internally, set things up so that the target_wait() is forced to eventually timeout. */ /* FIXME: cagney/1999-09-24: It isn't possible for target_open() to differentiate to its caller what the state of the target is after the initial open has been performed. Here we're assuming that the target has stopped. It should be possible to eventually have target_open() return to the caller an indication that the target is currently running and GDB state should be set to the same as for an async run. */ wait_for_inferior (); /* Now that the inferior has stopped, do any bookkeeping like loading shared libraries. We want to do this before normal_stop, so that the displayed frame is up to date. */ post_create_inferior (&current_target, from_tty); normal_stop (); } /* Initialize static vars when a new inferior begins. */ void init_wait_for_inferior (void) { /* These are meaningless until the first time through wait_for_inferior. */ breakpoint_init_inferior (inf_starting); clear_proceed_status (0); target_last_wait_ptid = minus_one_ptid; previous_inferior_ptid = inferior_ptid; /* Discard any skipped inlined frames. */ clear_inline_frame_state (minus_one_ptid); } static void handle_inferior_event (struct execution_control_state *ecs); static void handle_step_into_function (struct gdbarch *gdbarch, struct execution_control_state *ecs); static void handle_step_into_function_backward (struct gdbarch *gdbarch, struct execution_control_state *ecs); static void handle_signal_stop (struct execution_control_state *ecs); static void check_exception_resume (struct execution_control_state *, struct frame_info *); static void end_stepping_range (struct execution_control_state *ecs); static void stop_waiting (struct execution_control_state *ecs); static void keep_going (struct execution_control_state *ecs); static void process_event_stop_test (struct execution_control_state *ecs); static int switch_back_to_stepped_thread (struct execution_control_state *ecs); /* Callback for iterate over threads. If the thread is stopped, but the user/frontend doesn't know about that yet, go through normal_stop, as if the thread had just stopped now. ARG points at a ptid. If PTID is MINUS_ONE_PTID, applies to all threads. If ptid_is_pid(PTID) is true, applies to all threads of the process pointed at by PTID. Otherwise, apply only to the thread pointed by PTID. */ static int infrun_thread_stop_requested_callback (struct thread_info *info, void *arg) { ptid_t ptid = * (ptid_t *) arg; if ((ptid_equal (info->ptid, ptid) || ptid_equal (minus_one_ptid, ptid) || (ptid_is_pid (ptid) && ptid_get_pid (ptid) == ptid_get_pid (info->ptid))) && is_running (info->ptid) && !is_executing (info->ptid)) { struct cleanup *old_chain; struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; memset (ecs, 0, sizeof (*ecs)); old_chain = make_cleanup_restore_current_thread (); overlay_cache_invalid = 1; /* Flush target cache before starting to handle each event. Target was running and cache could be stale. This is just a heuristic. Running threads may modify target memory, but we don't get any event. */ target_dcache_invalidate (); /* Go through handle_inferior_event/normal_stop, so we always have consistent output as if the stop event had been reported. */ ecs->ptid = info->ptid; ecs->event_thread = info; ecs->ws.kind = TARGET_WAITKIND_STOPPED; ecs->ws.value.sig = GDB_SIGNAL_0; handle_inferior_event (ecs); if (!ecs->wait_some_more) { /* Cancel any running execution command. */ thread_cancel_execution_command (info); normal_stop (); } do_cleanups (old_chain); } return 0; } /* This function is attached as a "thread_stop_requested" observer. Cleanup local state that assumed the PTID was to be resumed, and report the stop to the frontend. */ static void infrun_thread_stop_requested (ptid_t ptid) { struct thread_info *tp; /* PTID was requested to stop. Remove matching threads from the step-over queue, so we don't try to resume them automatically. */ ALL_NON_EXITED_THREADS (tp) if (ptid_match (tp->ptid, ptid)) { if (thread_is_in_step_over_chain (tp)) thread_step_over_chain_remove (tp); } iterate_over_threads (infrun_thread_stop_requested_callback, &ptid); } static void infrun_thread_thread_exit (struct thread_info *tp, int silent) { if (ptid_equal (target_last_wait_ptid, tp->ptid)) nullify_last_target_wait_ptid (); } /* Delete the step resume, single-step and longjmp/exception resume breakpoints of TP. */ static void delete_thread_infrun_breakpoints (struct thread_info *tp) { delete_step_resume_breakpoint (tp); delete_exception_resume_breakpoint (tp); delete_single_step_breakpoints (tp); } /* If the target still has execution, call FUNC for each thread that just stopped. In all-stop, that's all the non-exited threads; in non-stop, that's the current thread, only. */ typedef void (*for_each_just_stopped_thread_callback_func) (struct thread_info *tp); static void for_each_just_stopped_thread (for_each_just_stopped_thread_callback_func func) { if (!target_has_execution || ptid_equal (inferior_ptid, null_ptid)) return; if (target_is_non_stop_p ()) { /* If in non-stop mode, only the current thread stopped. */ func (inferior_thread ()); } else { struct thread_info *tp; /* In all-stop mode, all threads have stopped. */ ALL_NON_EXITED_THREADS (tp) { func (tp); } } } /* Delete the step resume and longjmp/exception resume breakpoints of the threads that just stopped. */ static void delete_just_stopped_threads_infrun_breakpoints (void) { for_each_just_stopped_thread (delete_thread_infrun_breakpoints); } /* Delete the single-step breakpoints of the threads that just stopped. */ static void delete_just_stopped_threads_single_step_breakpoints (void) { for_each_just_stopped_thread (delete_single_step_breakpoints); } /* A cleanup wrapper. */ static void delete_just_stopped_threads_infrun_breakpoints_cleanup (void *arg) { delete_just_stopped_threads_infrun_breakpoints (); } /* See infrun.h. */ void print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid, const struct target_waitstatus *ws) { char *status_string = target_waitstatus_to_string (ws); struct ui_file *tmp_stream = mem_fileopen (); /* The text is split over several lines because it was getting too long. Call fprintf_unfiltered (gdb_stdlog) once so that the text is still output as a unit; we want only one timestamp printed if debug_timestamp is set. */ fprintf_unfiltered (tmp_stream, "infrun: target_wait (%d.%ld.%ld", ptid_get_pid (waiton_ptid), ptid_get_lwp (waiton_ptid), ptid_get_tid (waiton_ptid)); if (ptid_get_pid (waiton_ptid) != -1) fprintf_unfiltered (tmp_stream, " [%s]", target_pid_to_str (waiton_ptid)); fprintf_unfiltered (tmp_stream, ", status) =\n"); fprintf_unfiltered (tmp_stream, "infrun: %d.%ld.%ld [%s],\n", ptid_get_pid (result_ptid), ptid_get_lwp (result_ptid), ptid_get_tid (result_ptid), target_pid_to_str (result_ptid)); fprintf_unfiltered (tmp_stream, "infrun: %s\n", status_string); std::string text = ui_file_as_string (tmp_stream); /* This uses %s in part to handle %'s in the text, but also to avoid a gcc error: the format attribute requires a string literal. */ fprintf_unfiltered (gdb_stdlog, "%s", text.c_str ()); xfree (status_string); ui_file_delete (tmp_stream); } /* Select a thread at random, out of those which are resumed and have had events. */ static struct thread_info * random_pending_event_thread (ptid_t waiton_ptid) { struct thread_info *event_tp; int num_events = 0; int random_selector; /* First see how many events we have. Count only resumed threads that have an event pending. */ ALL_NON_EXITED_THREADS (event_tp) if (ptid_match (event_tp->ptid, waiton_ptid) && event_tp->resumed && event_tp->suspend.waitstatus_pending_p) num_events++; if (num_events == 0) return NULL; /* Now randomly pick a thread out of those that have had events. */ random_selector = (int) ((num_events * (double) rand ()) / (RAND_MAX + 1.0)); if (debug_infrun && num_events > 1) fprintf_unfiltered (gdb_stdlog, "infrun: Found %d events, selecting #%d\n", num_events, random_selector); /* Select the Nth thread that has had an event. */ ALL_NON_EXITED_THREADS (event_tp) if (ptid_match (event_tp->ptid, waiton_ptid) && event_tp->resumed && event_tp->suspend.waitstatus_pending_p) if (random_selector-- == 0) break; return event_tp; } /* Wrapper for target_wait that first checks whether threads have pending statuses to report before actually asking the target for more events. */ static ptid_t do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options) { ptid_t event_ptid; struct thread_info *tp; /* First check if there is a resumed thread with a wait status pending. */ if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)) { tp = random_pending_event_thread (ptid); } else { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: Waiting for specific thread %s.\n", target_pid_to_str (ptid)); /* We have a specific thread to check. */ tp = find_thread_ptid (ptid); gdb_assert (tp != NULL); if (!tp->suspend.waitstatus_pending_p) tp = NULL; } if (tp != NULL && (tp->suspend.stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT || tp->suspend.stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)) { struct regcache *regcache = get_thread_regcache (tp->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); CORE_ADDR pc; int discard = 0; pc = regcache_read_pc (regcache); if (pc != tp->suspend.stop_pc) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: PC of %s changed. was=%s, now=%s\n", target_pid_to_str (tp->ptid), paddress (gdbarch, tp->prev_pc), paddress (gdbarch, pc)); discard = 1; } else if (!breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: previous breakpoint of %s, at %s gone\n", target_pid_to_str (tp->ptid), paddress (gdbarch, pc)); discard = 1; } if (discard) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: pending event of %s cancelled.\n", target_pid_to_str (tp->ptid)); tp->suspend.waitstatus.kind = TARGET_WAITKIND_SPURIOUS; tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON; } } if (tp != NULL) { if (debug_infrun) { char *statstr; statstr = target_waitstatus_to_string (&tp->suspend.waitstatus); fprintf_unfiltered (gdb_stdlog, "infrun: Using pending wait status %s for %s.\n", statstr, target_pid_to_str (tp->ptid)); xfree (statstr); } /* Now that we've selected our final event LWP, un-adjust its PC if it was a software breakpoint (and the target doesn't always adjust the PC itself). */ if (tp->suspend.stop_reason == TARGET_STOPPED_BY_SW_BREAKPOINT && !target_supports_stopped_by_sw_breakpoint ()) { struct regcache *regcache; struct gdbarch *gdbarch; int decr_pc; regcache = get_thread_regcache (tp->ptid); gdbarch = get_regcache_arch (regcache); decr_pc = gdbarch_decr_pc_after_break (gdbarch); if (decr_pc != 0) { CORE_ADDR pc; pc = regcache_read_pc (regcache); regcache_write_pc (regcache, pc + decr_pc); } } tp->suspend.stop_reason = TARGET_STOPPED_BY_NO_REASON; *status = tp->suspend.waitstatus; tp->suspend.waitstatus_pending_p = 0; /* Wake up the event loop again, until all pending events are processed. */ if (target_is_async_p ()) mark_async_event_handler (infrun_async_inferior_event_token); return tp->ptid; } /* But if we don't find one, we'll have to wait. */ if (deprecated_target_wait_hook) event_ptid = deprecated_target_wait_hook (ptid, status, options); else event_ptid = target_wait (ptid, status, options); return event_ptid; } /* Prepare and stabilize the inferior for detaching it. E.g., detaching while a thread is displaced stepping is a recipe for crashing it, as nothing would readjust the PC out of the scratch pad. */ void prepare_for_detach (void) { struct inferior *inf = current_inferior (); ptid_t pid_ptid = pid_to_ptid (inf->pid); struct cleanup *old_chain_1; struct displaced_step_inferior_state *displaced; displaced = get_displaced_stepping_state (inf->pid); /* Is any thread of this process displaced stepping? If not, there's nothing else to do. */ if (displaced == NULL || ptid_equal (displaced->step_ptid, null_ptid)) return; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "displaced-stepping in-process while detaching"); old_chain_1 = make_cleanup_restore_integer (&inf->detaching); inf->detaching = 1; while (!ptid_equal (displaced->step_ptid, null_ptid)) { struct cleanup *old_chain_2; struct execution_control_state ecss; struct execution_control_state *ecs; ecs = &ecss; memset (ecs, 0, sizeof (*ecs)); overlay_cache_invalid = 1; /* Flush target cache before starting to handle each event. Target was running and cache could be stale. This is just a heuristic. Running threads may modify target memory, but we don't get any event. */ target_dcache_invalidate (); ecs->ptid = do_target_wait (pid_ptid, &ecs->ws, 0); if (debug_infrun) print_target_wait_results (pid_ptid, ecs->ptid, &ecs->ws); /* If an error happens while handling the event, propagate GDB's knowledge of the executing state to the frontend/user running state. */ old_chain_2 = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid); /* Now figure out what to do with the result of the result. */ handle_inferior_event (ecs); /* No error, don't finish the state yet. */ discard_cleanups (old_chain_2); /* Breakpoints and watchpoints are not installed on the target at this point, and signals are passed directly to the inferior, so this must mean the process is gone. */ if (!ecs->wait_some_more) { discard_cleanups (old_chain_1); error (_("Program exited while detaching")); } } discard_cleanups (old_chain_1); } /* Wait for control to return from inferior to debugger. If inferior gets a signal, we may decide to start it up again instead of returning. That is why there is a loop in this function. When this function actually returns it means the inferior should be left stopped and GDB should read more commands. */ void wait_for_inferior (void) { struct cleanup *old_cleanups; struct cleanup *thread_state_chain; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: wait_for_inferior ()\n"); old_cleanups = make_cleanup (delete_just_stopped_threads_infrun_breakpoints_cleanup, NULL); /* If an error happens while handling the event, propagate GDB's knowledge of the executing state to the frontend/user running state. */ thread_state_chain = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid); while (1) { struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; ptid_t waiton_ptid = minus_one_ptid; memset (ecs, 0, sizeof (*ecs)); overlay_cache_invalid = 1; /* Flush target cache before starting to handle each event. Target was running and cache could be stale. This is just a heuristic. Running threads may modify target memory, but we don't get any event. */ target_dcache_invalidate (); ecs->ptid = do_target_wait (waiton_ptid, &ecs->ws, 0); if (debug_infrun) print_target_wait_results (waiton_ptid, ecs->ptid, &ecs->ws); /* Now figure out what to do with the result of the result. */ handle_inferior_event (ecs); if (!ecs->wait_some_more) break; } /* No error, don't finish the state yet. */ discard_cleanups (thread_state_chain); do_cleanups (old_cleanups); } /* Cleanup that reinstalls the readline callback handler, if the target is running in the background. If while handling the target event something triggered a secondary prompt, like e.g., a pagination prompt, we'll have removed the callback handler (see gdb_readline_wrapper_line). Need to do this as we go back to the event loop, ready to process further input. Note this has no effect if the handler hasn't actually been removed, because calling rl_callback_handler_install resets the line buffer, thus losing input. */ static void reinstall_readline_callback_handler_cleanup (void *arg) { struct ui *ui = current_ui; if (!ui->async) { /* We're not going back to the top level event loop yet. Don't install the readline callback, as it'd prep the terminal, readline-style (raw, noecho) (e.g., --batch). We'll install it the next time the prompt is displayed, when we're ready for input. */ return; } if (ui->command_editing && ui->prompt_state != PROMPT_BLOCKED) gdb_rl_callback_handler_reinstall (); } /* Clean up the FSMs of threads that are now stopped. In non-stop, that's just the event thread. In all-stop, that's all threads. */ static void clean_up_just_stopped_threads_fsms (struct execution_control_state *ecs) { struct thread_info *thr = ecs->event_thread; if (thr != NULL && thr->thread_fsm != NULL) thread_fsm_clean_up (thr->thread_fsm, thr); if (!non_stop) { ALL_NON_EXITED_THREADS (thr) { if (thr->thread_fsm == NULL) continue; if (thr == ecs->event_thread) continue; switch_to_thread (thr->ptid); thread_fsm_clean_up (thr->thread_fsm, thr); } if (ecs->event_thread != NULL) switch_to_thread (ecs->event_thread->ptid); } } /* Helper for all_uis_check_sync_execution_done that works on the current UI. */ static void check_curr_ui_sync_execution_done (void) { struct ui *ui = current_ui; if (ui->prompt_state == PROMPT_NEEDED && ui->async && !gdb_in_secondary_prompt_p (ui)) { target_terminal_ours (); observer_notify_sync_execution_done (); ui_register_input_event_handler (ui); } } /* See infrun.h. */ void all_uis_check_sync_execution_done (void) { SWITCH_THRU_ALL_UIS () { check_curr_ui_sync_execution_done (); } } /* See infrun.h. */ void all_uis_on_sync_execution_starting (void) { SWITCH_THRU_ALL_UIS () { if (current_ui->prompt_state == PROMPT_NEEDED) async_disable_stdin (); } } /* Asynchronous version of wait_for_inferior. It is called by the event loop whenever a change of state is detected on the file descriptor corresponding to the target. It can be called more than once to complete a single execution command. In such cases we need to keep the state in a global variable ECSS. If it is the last time that this function is called for a single execution command, then report to the user that the inferior has stopped, and do the necessary cleanups. */ void fetch_inferior_event (void *client_data) { struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); struct cleanup *ts_old_chain; int cmd_done = 0; ptid_t waiton_ptid = minus_one_ptid; memset (ecs, 0, sizeof (*ecs)); /* Events are always processed with the main UI as current UI. This way, warnings, debug output, etc. are always consistently sent to the main console. */ scoped_restore save_ui = make_scoped_restore (&current_ui, main_ui); /* End up with readline processing input, if necessary. */ make_cleanup (reinstall_readline_callback_handler_cleanup, NULL); /* We're handling a live event, so make sure we're doing live debugging. If we're looking at traceframes while the target is running, we're going to need to get back to that mode after handling the event. */ if (non_stop) { make_cleanup_restore_current_traceframe (); set_current_traceframe (-1); } if (non_stop) /* In non-stop mode, the user/frontend should not notice a thread switch due to internal events. Make sure we reverse to the user selected thread and frame after handling the event and running any breakpoint commands. */ make_cleanup_restore_current_thread (); overlay_cache_invalid = 1; /* Flush target cache before starting to handle each event. Target was running and cache could be stale. This is just a heuristic. Running threads may modify target memory, but we don't get any event. */ target_dcache_invalidate (); scoped_restore save_exec_dir = make_scoped_restore (&execution_direction, target_execution_direction ()); ecs->ptid = do_target_wait (waiton_ptid, &ecs->ws, target_can_async_p () ? TARGET_WNOHANG : 0); if (debug_infrun) print_target_wait_results (waiton_ptid, ecs->ptid, &ecs->ws); /* If an error happens while handling the event, propagate GDB's knowledge of the executing state to the frontend/user running state. */ if (!target_is_non_stop_p ()) ts_old_chain = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid); else ts_old_chain = make_cleanup (finish_thread_state_cleanup, &ecs->ptid); /* Get executed before make_cleanup_restore_current_thread above to apply still for the thread which has thrown the exception. */ make_bpstat_clear_actions_cleanup (); make_cleanup (delete_just_stopped_threads_infrun_breakpoints_cleanup, NULL); /* Now figure out what to do with the result of the result. */ handle_inferior_event (ecs); if (!ecs->wait_some_more) { struct inferior *inf = find_inferior_ptid (ecs->ptid); int should_stop = 1; struct thread_info *thr = ecs->event_thread; int should_notify_stop = 1; delete_just_stopped_threads_infrun_breakpoints (); if (thr != NULL) { struct thread_fsm *thread_fsm = thr->thread_fsm; if (thread_fsm != NULL) should_stop = thread_fsm_should_stop (thread_fsm, thr); } if (!should_stop) { keep_going (ecs); } else { clean_up_just_stopped_threads_fsms (ecs); if (thr != NULL && thr->thread_fsm != NULL) { should_notify_stop = thread_fsm_should_notify_stop (thr->thread_fsm); } if (should_notify_stop) { int proceeded = 0; /* We may not find an inferior if this was a process exit. */ if (inf == NULL || inf->control.stop_soon == NO_STOP_QUIETLY) proceeded = normal_stop (); if (!proceeded) { inferior_event_handler (INF_EXEC_COMPLETE, NULL); cmd_done = 1; } } } } /* No error, don't finish the thread states yet. */ discard_cleanups (ts_old_chain); /* Revert thread and frame. */ do_cleanups (old_chain); /* If a UI was in sync execution mode, and now isn't, restore its prompt (a synchronous execution command has finished, and we're ready for input). */ all_uis_check_sync_execution_done (); if (cmd_done && exec_done_display_p && (ptid_equal (inferior_ptid, null_ptid) || !is_running (inferior_ptid))) printf_unfiltered (_("completed.\n")); } /* Record the frame and location we're currently stepping through. */ void set_step_info (struct frame_info *frame, struct symtab_and_line sal) { struct thread_info *tp = inferior_thread (); tp->control.step_frame_id = get_frame_id (frame); tp->control.step_stack_frame_id = get_stack_frame_id (frame); tp->current_symtab = sal.symtab; tp->current_line = sal.line; } /* Clear context switchable stepping state. */ void init_thread_stepping_state (struct thread_info *tss) { tss->stepped_breakpoint = 0; tss->stepping_over_breakpoint = 0; tss->stepping_over_watchpoint = 0; tss->step_after_step_resume_breakpoint = 0; } /* Set the cached copy of the last ptid/waitstatus. */ void set_last_target_status (ptid_t ptid, struct target_waitstatus status) { target_last_wait_ptid = ptid; target_last_waitstatus = status; } /* Return the cached copy of the last pid/waitstatus returned by target_wait()/deprecated_target_wait_hook(). The data is actually cached by handle_inferior_event(), which gets called immediately after target_wait()/deprecated_target_wait_hook(). */ void get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status) { *ptidp = target_last_wait_ptid; *status = target_last_waitstatus; } void nullify_last_target_wait_ptid (void) { target_last_wait_ptid = minus_one_ptid; } /* Switch thread contexts. */ static void context_switch (ptid_t ptid) { if (debug_infrun && !ptid_equal (ptid, inferior_ptid)) { fprintf_unfiltered (gdb_stdlog, "infrun: Switching context from %s ", target_pid_to_str (inferior_ptid)); fprintf_unfiltered (gdb_stdlog, "to %s\n", target_pid_to_str (ptid)); } switch_to_thread (ptid); } /* If the target can't tell whether we've hit breakpoints (target_supports_stopped_by_sw_breakpoint), and we got a SIGTRAP, check whether that could have been caused by a breakpoint. If so, adjust the PC, per gdbarch_decr_pc_after_break. */ static void adjust_pc_after_break (struct thread_info *thread, struct target_waitstatus *ws) { struct regcache *regcache; struct gdbarch *gdbarch; struct address_space *aspace; CORE_ADDR breakpoint_pc, decr_pc; /* If we've hit a breakpoint, we'll normally be stopped with SIGTRAP. If we aren't, just return. We assume that waitkinds other than TARGET_WAITKIND_STOPPED are not affected by gdbarch_decr_pc_after_break. Other waitkinds which are implemented by software breakpoints should be handled through the normal breakpoint layer. NOTE drow/2004-01-31: On some targets, breakpoints may generate different signals (SIGILL or SIGEMT for instance), but it is less clear where the PC is pointing afterwards. It may not match gdbarch_decr_pc_after_break. I don't know any specific target that generates these signals at breakpoints (the code has been in GDB since at least 1992) so I can not guess how to handle them here. In earlier versions of GDB, a target with gdbarch_have_nonsteppable_watchpoint would have the PC after hitting a watchpoint affected by gdbarch_decr_pc_after_break. I haven't found any target with both of these set in GDB history, and it seems unlikely to be correct, so gdbarch_have_nonsteppable_watchpoint is not checked here. */ if (ws->kind != TARGET_WAITKIND_STOPPED) return; if (ws->value.sig != GDB_SIGNAL_TRAP) return; /* In reverse execution, when a breakpoint is hit, the instruction under it has already been de-executed. The reported PC always points at the breakpoint address, so adjusting it further would be wrong. E.g., consider this case on a decr_pc_after_break == 1 architecture: B1 0x08000000 : INSN1 B2 0x08000001 : INSN2 0x08000002 : INSN3 PC -> 0x08000003 : INSN4 Say you're stopped at 0x08000003 as above. Reverse continuing from that point should hit B2 as below. Reading the PC when the SIGTRAP is reported should read 0x08000001 and INSN2 should have been de-executed already. B1 0x08000000 : INSN1 B2 PC -> 0x08000001 : INSN2 0x08000002 : INSN3 0x08000003 : INSN4 We can't apply the same logic as for forward execution, because we would wrongly adjust the PC to 0x08000000, since there's a breakpoint at PC - 1. We'd then report a hit on B1, although INSN1 hadn't been de-executed yet. Doing nothing is the correct behaviour. */ if (execution_direction == EXEC_REVERSE) return; /* If the target can tell whether the thread hit a SW breakpoint, trust it. Targets that can tell also adjust the PC themselves. */ if (target_supports_stopped_by_sw_breakpoint ()) return; /* Note that relying on whether a breakpoint is planted in memory to determine this can fail. E.g,. the breakpoint could have been removed since. Or the thread could have been told to step an instruction the size of a breakpoint instruction, and only _after_ was a breakpoint inserted at its address. */ /* If this target does not decrement the PC after breakpoints, then we have nothing to do. */ regcache = get_thread_regcache (thread->ptid); gdbarch = get_regcache_arch (regcache); decr_pc = gdbarch_decr_pc_after_break (gdbarch); if (decr_pc == 0) return; aspace = get_regcache_aspace (regcache); /* Find the location where (if we've hit a breakpoint) the breakpoint would be. */ breakpoint_pc = regcache_read_pc (regcache) - decr_pc; /* If the target can't tell whether a software breakpoint triggered, fallback to figuring it out based on breakpoints we think were inserted in the target, and on whether the thread was stepped or continued. */ /* Check whether there actually is a software breakpoint inserted at that location. If in non-stop mode, a race condition is possible where we've removed a breakpoint, but stop events for that breakpoint were already queued and arrive later. To suppress those spurious SIGTRAPs, we keep a list of such breakpoint locations for a bit, and retire them after a number of stop events are reported. Note this is an heuristic and can thus get confused. The real fix is to get the "stopped by SW BP and needs adjustment" info out of the target/kernel (and thus never reach here; see above). */ if (software_breakpoint_inserted_here_p (aspace, breakpoint_pc) || (target_is_non_stop_p () && moribund_breakpoint_here_p (aspace, breakpoint_pc))) { struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL); if (record_full_is_used ()) record_full_gdb_operation_disable_set (); /* When using hardware single-step, a SIGTRAP is reported for both a completed single-step and a software breakpoint. Need to differentiate between the two, as the latter needs adjusting but the former does not. The SIGTRAP can be due to a completed hardware single-step only if - we didn't insert software single-step breakpoints - this thread is currently being stepped If any of these events did not occur, we must have stopped due to hitting a software breakpoint, and have to back up to the breakpoint address. As a special case, we could have hardware single-stepped a software breakpoint. In this case (prev_pc == breakpoint_pc), we also need to back up to the breakpoint address. */ if (thread_has_single_step_breakpoints_set (thread) || !currently_stepping (thread) || (thread->stepped_breakpoint && thread->prev_pc == breakpoint_pc)) regcache_write_pc (regcache, breakpoint_pc); do_cleanups (old_cleanups); } } static int stepped_in_from (struct frame_info *frame, struct frame_id step_frame_id) { for (frame = get_prev_frame (frame); frame != NULL; frame = get_prev_frame (frame)) { if (frame_id_eq (get_frame_id (frame), step_frame_id)) return 1; if (get_frame_type (frame) != INLINE_FRAME) break; } return 0; } /* Auxiliary function that handles syscall entry/return events. It returns 1 if the inferior should keep going (and GDB should ignore the event), or 0 if the event deserves to be processed. */ static int handle_syscall_event (struct execution_control_state *ecs) { struct regcache *regcache; int syscall_number; if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); regcache = get_thread_regcache (ecs->ptid); syscall_number = ecs->ws.value.syscall_number; stop_pc = regcache_read_pc (regcache); if (catch_syscall_enabled () > 0 && catching_syscall_number (syscall_number) > 0) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: syscall number = '%d'\n", syscall_number); ecs->event_thread->control.stop_bpstat = bpstat_stop_status (get_regcache_aspace (regcache), stop_pc, ecs->ptid, &ecs->ws); if (bpstat_causes_stop (ecs->event_thread->control.stop_bpstat)) { /* Catchpoint hit. */ return 0; } } /* If no catchpoint triggered for this, then keep going. */ keep_going (ecs); return 1; } /* Lazily fill in the execution_control_state's stop_func_* fields. */ static void fill_in_stop_func (struct gdbarch *gdbarch, struct execution_control_state *ecs) { if (!ecs->stop_func_filled_in) { /* Don't care about return value; stop_func_start and stop_func_name will both be 0 if it doesn't work. */ find_pc_partial_function (stop_pc, &ecs->stop_func_name, &ecs->stop_func_start, &ecs->stop_func_end); ecs->stop_func_start += gdbarch_deprecated_function_start_offset (gdbarch); if (gdbarch_skip_entrypoint_p (gdbarch)) ecs->stop_func_start = gdbarch_skip_entrypoint (gdbarch, ecs->stop_func_start); ecs->stop_func_filled_in = 1; } } /* Return the STOP_SOON field of the inferior pointed at by PTID. */ static enum stop_kind get_inferior_stop_soon (ptid_t ptid) { struct inferior *inf = find_inferior_ptid (ptid); gdb_assert (inf != NULL); return inf->control.stop_soon; } /* Wait for one event. Store the resulting waitstatus in WS, and return the event ptid. */ static ptid_t wait_one (struct target_waitstatus *ws) { ptid_t event_ptid; ptid_t wait_ptid = minus_one_ptid; overlay_cache_invalid = 1; /* Flush target cache before starting to handle each event. Target was running and cache could be stale. This is just a heuristic. Running threads may modify target memory, but we don't get any event. */ target_dcache_invalidate (); if (deprecated_target_wait_hook) event_ptid = deprecated_target_wait_hook (wait_ptid, ws, 0); else event_ptid = target_wait (wait_ptid, ws, 0); if (debug_infrun) print_target_wait_results (wait_ptid, event_ptid, ws); return event_ptid; } /* Generate a wrapper for target_stopped_by_REASON that works on PTID instead of the current thread. */ #define THREAD_STOPPED_BY(REASON) \ static int \ thread_stopped_by_ ## REASON (ptid_t ptid) \ { \ struct cleanup *old_chain; \ int res; \ \ old_chain = save_inferior_ptid (); \ inferior_ptid = ptid; \ \ res = target_stopped_by_ ## REASON (); \ \ do_cleanups (old_chain); \ \ return res; \ } /* Generate thread_stopped_by_watchpoint. */ THREAD_STOPPED_BY (watchpoint) /* Generate thread_stopped_by_sw_breakpoint. */ THREAD_STOPPED_BY (sw_breakpoint) /* Generate thread_stopped_by_hw_breakpoint. */ THREAD_STOPPED_BY (hw_breakpoint) /* Cleanups that switches to the PTID pointed at by PTID_P. */ static void switch_to_thread_cleanup (void *ptid_p) { ptid_t ptid = *(ptid_t *) ptid_p; switch_to_thread (ptid); } /* Save the thread's event and stop reason to process it later. */ static void save_waitstatus (struct thread_info *tp, struct target_waitstatus *ws) { struct regcache *regcache; struct address_space *aspace; if (debug_infrun) { char *statstr; statstr = target_waitstatus_to_string (ws); fprintf_unfiltered (gdb_stdlog, "infrun: saving status %s for %d.%ld.%ld\n", statstr, ptid_get_pid (tp->ptid), ptid_get_lwp (tp->ptid), ptid_get_tid (tp->ptid)); xfree (statstr); } /* Record for later. */ tp->suspend.waitstatus = *ws; tp->suspend.waitstatus_pending_p = 1; regcache = get_thread_regcache (tp->ptid); aspace = get_regcache_aspace (regcache); if (ws->kind == TARGET_WAITKIND_STOPPED && ws->value.sig == GDB_SIGNAL_TRAP) { CORE_ADDR pc = regcache_read_pc (regcache); adjust_pc_after_break (tp, &tp->suspend.waitstatus); if (thread_stopped_by_watchpoint (tp->ptid)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_WATCHPOINT; } else if (target_supports_stopped_by_sw_breakpoint () && thread_stopped_by_sw_breakpoint (tp->ptid)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT; } else if (target_supports_stopped_by_hw_breakpoint () && thread_stopped_by_hw_breakpoint (tp->ptid)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT; } else if (!target_supports_stopped_by_hw_breakpoint () && hardware_breakpoint_inserted_here_p (aspace, pc)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT; } else if (!target_supports_stopped_by_sw_breakpoint () && software_breakpoint_inserted_here_p (aspace, pc)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT; } else if (!thread_has_single_step_breakpoints_set (tp) && currently_stepping (tp)) { tp->suspend.stop_reason = TARGET_STOPPED_BY_SINGLE_STEP; } } } /* A cleanup that disables thread create/exit events. */ static void disable_thread_events (void *arg) { target_thread_events (0); } /* See infrun.h. */ void stop_all_threads (void) { /* We may need multiple passes to discover all threads. */ int pass; int iterations = 0; ptid_t entry_ptid; struct cleanup *old_chain; gdb_assert (target_is_non_stop_p ()); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stop_all_threads\n"); entry_ptid = inferior_ptid; old_chain = make_cleanup (switch_to_thread_cleanup, &entry_ptid); target_thread_events (1); make_cleanup (disable_thread_events, NULL); /* Request threads to stop, and then wait for the stops. Because threads we already know about can spawn more threads while we're trying to stop them, and we only learn about new threads when we update the thread list, do this in a loop, and keep iterating until two passes find no threads that need to be stopped. */ for (pass = 0; pass < 2; pass++, iterations++) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stop_all_threads, pass=%d, " "iterations=%d\n", pass, iterations); while (1) { ptid_t event_ptid; struct target_waitstatus ws; int need_wait = 0; struct thread_info *t; update_thread_list (); /* Go through all threads looking for threads that we need to tell the target to stop. */ ALL_NON_EXITED_THREADS (t) { if (t->executing) { /* If already stopping, don't request a stop again. We just haven't seen the notification yet. */ if (!t->stop_requested) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: %s executing, " "need stop\n", target_pid_to_str (t->ptid)); target_stop (t->ptid); t->stop_requested = 1; } else { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: %s executing, " "already stopping\n", target_pid_to_str (t->ptid)); } if (t->stop_requested) need_wait = 1; } else { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: %s not executing\n", target_pid_to_str (t->ptid)); /* The thread may be not executing, but still be resumed with a pending status to process. */ t->resumed = 0; } } if (!need_wait) break; /* If we find new threads on the second iteration, restart over. We want to see two iterations in a row with all threads stopped. */ if (pass > 0) pass = -1; event_ptid = wait_one (&ws); if (ws.kind == TARGET_WAITKIND_NO_RESUMED) { /* All resumed threads exited. */ } else if (ws.kind == TARGET_WAITKIND_THREAD_EXITED || ws.kind == TARGET_WAITKIND_EXITED || ws.kind == TARGET_WAITKIND_SIGNALLED) { if (debug_infrun) { ptid_t ptid = pid_to_ptid (ws.value.integer); fprintf_unfiltered (gdb_stdlog, "infrun: %s exited while " "stopping threads\n", target_pid_to_str (ptid)); } } else { struct inferior *inf; t = find_thread_ptid (event_ptid); if (t == NULL) t = add_thread (event_ptid); t->stop_requested = 0; t->executing = 0; t->resumed = 0; t->control.may_range_step = 0; /* This may be the first time we see the inferior report a stop. */ inf = find_inferior_ptid (event_ptid); if (inf->needs_setup) { switch_to_thread_no_regs (t); setup_inferior (0); } if (ws.kind == TARGET_WAITKIND_STOPPED && ws.value.sig == GDB_SIGNAL_0) { /* We caught the event that we intended to catch, so there's no event pending. */ t->suspend.waitstatus.kind = TARGET_WAITKIND_IGNORE; t->suspend.waitstatus_pending_p = 0; if (displaced_step_fixup (t->ptid, GDB_SIGNAL_0) < 0) { /* Add it back to the step-over queue. */ if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: displaced-step of %s " "canceled: adding back to the " "step-over queue\n", target_pid_to_str (t->ptid)); } t->control.trap_expected = 0; thread_step_over_chain_enqueue (t); } } else { enum gdb_signal sig; struct regcache *regcache; if (debug_infrun) { char *statstr; statstr = target_waitstatus_to_string (&ws); fprintf_unfiltered (gdb_stdlog, "infrun: target_wait %s, saving " "status for %d.%ld.%ld\n", statstr, ptid_get_pid (t->ptid), ptid_get_lwp (t->ptid), ptid_get_tid (t->ptid)); xfree (statstr); } /* Record for later. */ save_waitstatus (t, &ws); sig = (ws.kind == TARGET_WAITKIND_STOPPED ? ws.value.sig : GDB_SIGNAL_0); if (displaced_step_fixup (t->ptid, sig) < 0) { /* Add it back to the step-over queue. */ t->control.trap_expected = 0; thread_step_over_chain_enqueue (t); } regcache = get_thread_regcache (t->ptid); t->suspend.stop_pc = regcache_read_pc (regcache); if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: saved stop_pc=%s for %s " "(currently_stepping=%d)\n", paddress (target_gdbarch (), t->suspend.stop_pc), target_pid_to_str (t->ptid), currently_stepping (t)); } } } } } do_cleanups (old_chain); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stop_all_threads done\n"); } /* Handle a TARGET_WAITKIND_NO_RESUMED event. */ static int handle_no_resumed (struct execution_control_state *ecs) { struct inferior *inf; struct thread_info *thread; if (target_can_async_p ()) { struct ui *ui; int any_sync = 0; ALL_UIS (ui) { if (ui->prompt_state == PROMPT_BLOCKED) { any_sync = 1; break; } } if (!any_sync) { /* There were no unwaited-for children left in the target, but, we're not synchronously waiting for events either. Just ignore. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_RESUMED " "(ignoring: bg)\n"); prepare_to_wait (ecs); return 1; } } /* Otherwise, if we were running a synchronous execution command, we may need to cancel it and give the user back the terminal. In non-stop mode, the target can't tell whether we've already consumed previous stop events, so it can end up sending us a no-resumed event like so: #0 - thread 1 is left stopped #1 - thread 2 is resumed and hits breakpoint -> TARGET_WAITKIND_STOPPED #2 - thread 3 is resumed and exits this is the last resumed thread, so -> TARGET_WAITKIND_NO_RESUMED #3 - gdb processes stop for thread 2 and decides to re-resume it. #4 - gdb processes the TARGET_WAITKIND_NO_RESUMED event. thread 2 is now resumed, so the event should be ignored. IOW, if the stop for thread 2 doesn't end a foreground command, then we need to ignore the following TARGET_WAITKIND_NO_RESUMED event. But it could be that the event meant that thread 2 itself (or whatever other thread was the last resumed thread) exited. To address this we refresh the thread list and check whether we have resumed threads _now_. In the example above, this removes thread 3 from the thread list. If thread 2 was re-resumed, we ignore this event. If we find no thread resumed, then we cancel the synchronous command show "no unwaited-for " to the user. */ update_thread_list (); ALL_NON_EXITED_THREADS (thread) { if (thread->executing || thread->suspend.waitstatus_pending_p) { /* There were no unwaited-for children left in the target at some point, but there are now. Just ignore. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_RESUMED " "(ignoring: found resumed)\n"); prepare_to_wait (ecs); return 1; } } /* Note however that we may find no resumed thread because the whole process exited meanwhile (thus updating the thread list results in an empty thread list). In this case we know we'll be getting a process exit event shortly. */ ALL_INFERIORS (inf) { if (inf->pid == 0) continue; thread = any_live_thread_of_process (inf->pid); if (thread == NULL) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_RESUMED " "(expect process exit)\n"); prepare_to_wait (ecs); return 1; } } /* Go ahead and report the event. */ return 0; } /* Given an execution control state that has been freshly filled in by an event from the inferior, figure out what it means and take appropriate action. The alternatives are: 1) stop_waiting and return; to really stop and return to the debugger. 2) keep_going and return; to wait for the next event (set ecs->event_thread->stepping_over_breakpoint to 1 to single step once). */ static void handle_inferior_event_1 (struct execution_control_state *ecs) { enum stop_kind stop_soon; if (ecs->ws.kind == TARGET_WAITKIND_IGNORE) { /* We had an event in the inferior, but we are not interested in handling it at this level. The lower layers have already done what needs to be done, if anything. One of the possible circumstances for this is when the inferior produces output for the console. The inferior has not stopped, and we are ignoring the event. Another possible circumstance is any event which the lower level knows will be reported multiple times without an intervening resume. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_IGNORE\n"); prepare_to_wait (ecs); return; } if (ecs->ws.kind == TARGET_WAITKIND_THREAD_EXITED) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_THREAD_EXITED\n"); prepare_to_wait (ecs); return; } if (ecs->ws.kind == TARGET_WAITKIND_NO_RESUMED && handle_no_resumed (ecs)) return; /* Cache the last pid/waitstatus. */ set_last_target_status (ecs->ptid, ecs->ws); /* Always clear state belonging to the previous time we stopped. */ stop_stack_dummy = STOP_NONE; if (ecs->ws.kind == TARGET_WAITKIND_NO_RESUMED) { /* No unwaited-for children left. IOW, all resumed children have exited. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_RESUMED\n"); stop_print_frame = 0; stop_waiting (ecs); return; } if (ecs->ws.kind != TARGET_WAITKIND_EXITED && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED) { ecs->event_thread = find_thread_ptid (ecs->ptid); /* If it's a new thread, add it to the thread database. */ if (ecs->event_thread == NULL) ecs->event_thread = add_thread (ecs->ptid); /* Disable range stepping. If the next step request could use a range, this will be end up re-enabled then. */ ecs->event_thread->control.may_range_step = 0; } /* Dependent on valid ECS->EVENT_THREAD. */ adjust_pc_after_break (ecs->event_thread, &ecs->ws); /* Dependent on the current PC value modified by adjust_pc_after_break. */ reinit_frame_cache (); breakpoint_retire_moribund (); /* First, distinguish signals caused by the debugger from signals that have to do with the program's own actions. Note that breakpoint insns may cause SIGTRAP or SIGILL or SIGEMT, depending on the operating system version. Here we detect when a SIGILL or SIGEMT is really a breakpoint and change it to SIGTRAP. We do something similar for SIGSEGV, since a SIGSEGV will be generated when we're trying to execute a breakpoint instruction on a non-executable stack. This happens for call dummy breakpoints for architectures like SPARC that place call dummies on the stack. */ if (ecs->ws.kind == TARGET_WAITKIND_STOPPED && (ecs->ws.value.sig == GDB_SIGNAL_ILL || ecs->ws.value.sig == GDB_SIGNAL_SEGV || ecs->ws.value.sig == GDB_SIGNAL_EMT)) { struct regcache *regcache = get_thread_regcache (ecs->ptid); if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), regcache_read_pc (regcache))) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: Treating signal as SIGTRAP\n"); ecs->ws.value.sig = GDB_SIGNAL_TRAP; } } /* Mark the non-executing threads accordingly. In all-stop, all threads of all processes are stopped when we get any event reported. In non-stop mode, only the event thread stops. */ { ptid_t mark_ptid; if (!target_is_non_stop_p ()) mark_ptid = minus_one_ptid; else if (ecs->ws.kind == TARGET_WAITKIND_SIGNALLED || ecs->ws.kind == TARGET_WAITKIND_EXITED) { /* If we're handling a process exit in non-stop mode, even though threads haven't been deleted yet, one would think that there is nothing to do, as threads of the dead process will be soon deleted, and threads of any other process were left running. However, on some targets, threads survive a process exit event. E.g., for the "checkpoint" command, when the current checkpoint/fork exits, linux-fork.c automatically switches to another fork from within target_mourn_inferior, by associating the same inferior/thread to another fork. We haven't mourned yet at this point, but we must mark any threads left in the process as not-executing so that finish_thread_state marks them stopped (in the user's perspective) if/when we present the stop to the user. */ mark_ptid = pid_to_ptid (ptid_get_pid (ecs->ptid)); } else mark_ptid = ecs->ptid; set_executing (mark_ptid, 0); /* Likewise the resumed flag. */ set_resumed (mark_ptid, 0); } switch (ecs->ws.kind) { case TARGET_WAITKIND_LOADED: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_LOADED\n"); if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); /* Ignore gracefully during startup of the inferior, as it might be the shell which has just loaded some objects, otherwise add the symbols for the newly loaded objects. Also ignore at the beginning of an attach or remote session; we will query the full list of libraries once the connection is established. */ stop_soon = get_inferior_stop_soon (ecs->ptid); if (stop_soon == NO_STOP_QUIETLY) { struct regcache *regcache; regcache = get_thread_regcache (ecs->ptid); handle_solib_event (); ecs->event_thread->control.stop_bpstat = bpstat_stop_status (get_regcache_aspace (regcache), stop_pc, ecs->ptid, &ecs->ws); if (bpstat_causes_stop (ecs->event_thread->control.stop_bpstat)) { /* A catchpoint triggered. */ process_event_stop_test (ecs); return; } /* If requested, stop when the dynamic linker notifies gdb of events. This allows the user to get control and place breakpoints in initializer routines for dynamically loaded objects (among other things). */ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; if (stop_on_solib_events) { /* Make sure we print "Stopped due to solib-event" in normal_stop. */ stop_print_frame = 1; stop_waiting (ecs); return; } } /* If we are skipping through a shell, or through shared library loading that we aren't interested in, resume the program. If we're running the program normally, also resume. */ if (stop_soon == STOP_QUIETLY || stop_soon == NO_STOP_QUIETLY) { /* Loading of shared libraries might have changed breakpoint addresses. Make sure new breakpoints are inserted. */ if (stop_soon == NO_STOP_QUIETLY) insert_breakpoints (); resume (GDB_SIGNAL_0); prepare_to_wait (ecs); return; } /* But stop if we're attaching or setting up a remote connection. */ if (stop_soon == STOP_QUIETLY_NO_SIGSTOP || stop_soon == STOP_QUIETLY_REMOTE) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: quietly stopped\n"); stop_waiting (ecs); return; } internal_error (__FILE__, __LINE__, _("unhandled stop_soon: %d"), (int) stop_soon); case TARGET_WAITKIND_SPURIOUS: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SPURIOUS\n"); if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); resume (GDB_SIGNAL_0); prepare_to_wait (ecs); return; case TARGET_WAITKIND_THREAD_CREATED: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_THREAD_CREATED\n"); if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); if (!switch_back_to_stepped_thread (ecs)) keep_going (ecs); return; case TARGET_WAITKIND_EXITED: case TARGET_WAITKIND_SIGNALLED: if (debug_infrun) { if (ecs->ws.kind == TARGET_WAITKIND_EXITED) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXITED\n"); else fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SIGNALLED\n"); } inferior_ptid = ecs->ptid; set_current_inferior (find_inferior_ptid (ecs->ptid)); set_current_program_space (current_inferior ()->pspace); handle_vfork_child_exec_or_exit (0); target_terminal_ours (); /* Must do this before mourn anyway. */ /* Clearing any previous state of convenience variables. */ clear_exit_convenience_vars (); if (ecs->ws.kind == TARGET_WAITKIND_EXITED) { /* Record the exit code in the convenience variable $_exitcode, so that the user can inspect this again later. */ set_internalvar_integer (lookup_internalvar ("_exitcode"), (LONGEST) ecs->ws.value.integer); /* Also record this in the inferior itself. */ current_inferior ()->has_exit_code = 1; current_inferior ()->exit_code = (LONGEST) ecs->ws.value.integer; /* Support the --return-child-result option. */ return_child_result_value = ecs->ws.value.integer; observer_notify_exited (ecs->ws.value.integer); } else { struct regcache *regcache = get_thread_regcache (ecs->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); if (gdbarch_gdb_signal_to_target_p (gdbarch)) { /* Set the value of the internal variable $_exitsignal, which holds the signal uncaught by the inferior. */ set_internalvar_integer (lookup_internalvar ("_exitsignal"), gdbarch_gdb_signal_to_target (gdbarch, ecs->ws.value.sig)); } else { /* We don't have access to the target's method used for converting between signal numbers (GDB's internal representation <-> target's representation). Therefore, we cannot do a good job at displaying this information to the user. It's better to just warn her about it (if infrun debugging is enabled), and give up. */ if (debug_infrun) fprintf_filtered (gdb_stdlog, _("\ Cannot fill $_exitsignal with the correct signal number.\n")); } observer_notify_signal_exited (ecs->ws.value.sig); } gdb_flush (gdb_stdout); target_mourn_inferior (inferior_ptid); stop_print_frame = 0; stop_waiting (ecs); return; /* The following are the only cases in which we keep going; the above cases end in a continue or goto. */ case TARGET_WAITKIND_FORKED: case TARGET_WAITKIND_VFORKED: if (debug_infrun) { if (ecs->ws.kind == TARGET_WAITKIND_FORKED) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_FORKED\n"); else fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_VFORKED\n"); } /* Check whether the inferior is displaced stepping. */ { struct regcache *regcache = get_thread_regcache (ecs->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); /* If checking displaced stepping is supported, and thread ecs->ptid is displaced stepping. */ if (displaced_step_in_progress_thread (ecs->ptid)) { struct inferior *parent_inf = find_inferior_ptid (ecs->ptid); struct regcache *child_regcache; CORE_ADDR parent_pc; /* GDB has got TARGET_WAITKIND_FORKED or TARGET_WAITKIND_VFORKED, indicating that the displaced stepping of syscall instruction has been done. Perform cleanup for parent process here. Note that this operation also cleans up the child process for vfork, because their pages are shared. */ displaced_step_fixup (ecs->ptid, GDB_SIGNAL_TRAP); /* Start a new step-over in another thread if there's one that needs it. */ start_step_over (); if (ecs->ws.kind == TARGET_WAITKIND_FORKED) { struct displaced_step_inferior_state *displaced = get_displaced_stepping_state (ptid_get_pid (ecs->ptid)); /* Restore scratch pad for child process. */ displaced_step_restore (displaced, ecs->ws.value.related_pid); } /* Since the vfork/fork syscall instruction was executed in the scratchpad, the child's PC is also within the scratchpad. Set the child's PC to the parent's PC value, which has already been fixed up. FIXME: we use the parent's aspace here, although we're touching the child, because the child hasn't been added to the inferior list yet at this point. */ child_regcache = get_thread_arch_aspace_regcache (ecs->ws.value.related_pid, gdbarch, parent_inf->aspace); /* Read PC value of parent process. */ parent_pc = regcache_read_pc (regcache); if (debug_displaced) fprintf_unfiltered (gdb_stdlog, "displaced: write child pc from %s to %s\n", paddress (gdbarch, regcache_read_pc (child_regcache)), paddress (gdbarch, parent_pc)); regcache_write_pc (child_regcache, parent_pc); } } if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); /* Immediately detach breakpoints from the child before there's any chance of letting the user delete breakpoints from the breakpoint lists. If we don't do this early, it's easy to leave left over traps in the child, vis: "break foo; catch fork; c; <fork>; del; c; <child calls foo>". We only follow the fork on the last `continue', and by that time the breakpoint at "foo" is long gone from the breakpoint table. If we vforked, then we don't need to unpatch here, since both parent and child are sharing the same memory pages; we'll need to unpatch at follow/detach time instead to be certain that new breakpoints added between catchpoint hit time and vfork follow are detached. */ if (ecs->ws.kind != TARGET_WAITKIND_VFORKED) { /* This won't actually modify the breakpoint list, but will physically remove the breakpoints from the child. */ detach_breakpoints (ecs->ws.value.related_pid); } delete_just_stopped_threads_single_step_breakpoints (); /* In case the event is caught by a catchpoint, remember that the event is to be followed at the next resume of the thread, and not immediately. */ ecs->event_thread->pending_follow = ecs->ws; stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid)); ecs->event_thread->control.stop_bpstat = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()), stop_pc, ecs->ptid, &ecs->ws); /* If no catchpoint triggered for this, then keep going. Note that we're interested in knowing the bpstat actually causes a stop, not just if it may explain the signal. Software watchpoints, for example, always appear in the bpstat. */ if (!bpstat_causes_stop (ecs->event_thread->control.stop_bpstat)) { ptid_t parent; ptid_t child; int should_resume; int follow_child = (follow_fork_mode_string == follow_fork_mode_child); ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; should_resume = follow_fork (); parent = ecs->ptid; child = ecs->ws.value.related_pid; /* At this point, the parent is marked running, and the child is marked stopped. */ /* If not resuming the parent, mark it stopped. */ if (follow_child && !detach_fork && !non_stop && !sched_multi) set_running (parent, 0); /* If resuming the child, mark it running. */ if (follow_child || (!detach_fork && (non_stop || sched_multi))) set_running (child, 1); /* In non-stop mode, also resume the other branch. */ if (!detach_fork && (non_stop || (sched_multi && target_is_non_stop_p ()))) { if (follow_child) switch_to_thread (parent); else switch_to_thread (child); ecs->event_thread = inferior_thread (); ecs->ptid = inferior_ptid; keep_going (ecs); } if (follow_child) switch_to_thread (child); else switch_to_thread (parent); ecs->event_thread = inferior_thread (); ecs->ptid = inferior_ptid; if (should_resume) keep_going (ecs); else stop_waiting (ecs); return; } process_event_stop_test (ecs); return; case TARGET_WAITKIND_VFORK_DONE: /* Done with the shared memory region. Re-insert breakpoints in the parent, and keep going. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_VFORK_DONE\n"); if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); current_inferior ()->waiting_for_vfork_done = 0; current_inferior ()->pspace->breakpoints_not_allowed = 0; /* This also takes care of reinserting breakpoints in the previously locked inferior. */ keep_going (ecs); return; case TARGET_WAITKIND_EXECD: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXECD\n"); if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid)); /* Do whatever is necessary to the parent branch of the vfork. */ handle_vfork_child_exec_or_exit (1); /* This causes the eventpoints and symbol table to be reset. Must do this now, before trying to determine whether to stop. */ follow_exec (inferior_ptid, ecs->ws.value.execd_pathname); /* In follow_exec we may have deleted the original thread and created a new one. Make sure that the event thread is the execd thread for that case (this is a nop otherwise). */ ecs->event_thread = inferior_thread (); ecs->event_thread->control.stop_bpstat = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()), stop_pc, ecs->ptid, &ecs->ws); /* Note that this may be referenced from inside bpstat_stop_status above, through inferior_has_execd. */ xfree (ecs->ws.value.execd_pathname); ecs->ws.value.execd_pathname = NULL; /* If no catchpoint triggered for this, then keep going. */ if (!bpstat_causes_stop (ecs->event_thread->control.stop_bpstat)) { ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; keep_going (ecs); return; } process_event_stop_test (ecs); return; /* Be careful not to try to gather much state about a thread that's in a syscall. It's frequently a losing proposition. */ case TARGET_WAITKIND_SYSCALL_ENTRY: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SYSCALL_ENTRY\n"); /* Getting the current syscall number. */ if (handle_syscall_event (ecs) == 0) process_event_stop_test (ecs); return; /* Before examining the threads further, step this thread to get it entirely out of the syscall. (We get notice of the event when the thread is just on the verge of exiting a syscall. Stepping one instruction seems to get it back into user code.) */ case TARGET_WAITKIND_SYSCALL_RETURN: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SYSCALL_RETURN\n"); if (handle_syscall_event (ecs) == 0) process_event_stop_test (ecs); return; case TARGET_WAITKIND_STOPPED: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_STOPPED\n"); ecs->event_thread->suspend.stop_signal = ecs->ws.value.sig; handle_signal_stop (ecs); return; case TARGET_WAITKIND_NO_HISTORY: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_NO_HISTORY\n"); /* Reverse execution: target ran out of history info. */ /* Switch to the stopped thread. */ if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stopped\n"); delete_just_stopped_threads_single_step_breakpoints (); stop_pc = regcache_read_pc (get_thread_regcache (inferior_ptid)); observer_notify_no_history (); stop_waiting (ecs); return; } } /* A wrapper around handle_inferior_event_1, which also makes sure that all temporary struct value objects that were created during the handling of the event get deleted at the end. */ static void handle_inferior_event (struct execution_control_state *ecs) { struct value *mark = value_mark (); handle_inferior_event_1 (ecs); /* Purge all temporary values created during the event handling, as it could be a long time before we return to the command level where such values would otherwise be purged. */ value_free_to_mark (mark); } /* Restart threads back to what they were trying to do back when we paused them for an in-line step-over. The EVENT_THREAD thread is ignored. */ static void restart_threads (struct thread_info *event_thread) { struct thread_info *tp; /* In case the instruction just stepped spawned a new thread. */ update_thread_list (); ALL_NON_EXITED_THREADS (tp) { if (tp == event_thread) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: " "[%s] is event thread\n", target_pid_to_str (tp->ptid)); continue; } if (!(tp->state == THREAD_RUNNING || tp->control.in_infcall)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: " "[%s] not meant to be running\n", target_pid_to_str (tp->ptid)); continue; } if (tp->resumed) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: [%s] resumed\n", target_pid_to_str (tp->ptid)); gdb_assert (tp->executing || tp->suspend.waitstatus_pending_p); continue; } if (thread_is_in_step_over_chain (tp)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: " "[%s] needs step-over\n", target_pid_to_str (tp->ptid)); gdb_assert (!tp->resumed); continue; } if (tp->suspend.waitstatus_pending_p) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: " "[%s] has pending status\n", target_pid_to_str (tp->ptid)); tp->resumed = 1; continue; } /* If some thread needs to start a step-over at this point, it should still be in the step-over queue, and thus skipped above. */ if (thread_still_needs_step_over (tp)) { internal_error (__FILE__, __LINE__, "thread [%s] needs a step-over, but not in " "step-over queue\n", target_pid_to_str (tp->ptid)); } if (currently_stepping (tp)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: [%s] was stepping\n", target_pid_to_str (tp->ptid)); keep_going_stepped_thread (tp); } else { struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: restart threads: [%s] continuing\n", target_pid_to_str (tp->ptid)); reset_ecs (ecs, tp); switch_to_thread (tp->ptid); keep_going_pass_signal (ecs); } } } /* Callback for iterate_over_threads. Find a resumed thread that has a pending waitstatus. */ static int resumed_thread_with_pending_status (struct thread_info *tp, void *arg) { return (tp->resumed && tp->suspend.waitstatus_pending_p); } /* Called when we get an event that may finish an in-line or out-of-line (displaced stepping) step-over started previously. Return true if the event is processed and we should go back to the event loop; false if the caller should continue processing the event. */ static int finish_step_over (struct execution_control_state *ecs) { int had_step_over_info; displaced_step_fixup (ecs->ptid, ecs->event_thread->suspend.stop_signal); had_step_over_info = step_over_info_valid_p (); if (had_step_over_info) { /* If we're stepping over a breakpoint with all threads locked, then only the thread that was stepped should be reporting back an event. */ gdb_assert (ecs->event_thread->control.trap_expected); if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP) clear_step_over_info (); } if (!target_is_non_stop_p ()) return 0; /* Start a new step-over in another thread if there's one that needs it. */ start_step_over (); /* If we were stepping over a breakpoint before, and haven't started a new in-line step-over sequence, then restart all other threads (except the event thread). We can't do this in all-stop, as then e.g., we wouldn't be able to issue any other remote packet until these other threads stop. */ if (had_step_over_info && !step_over_info_valid_p ()) { struct thread_info *pending; /* If we only have threads with pending statuses, the restart below won't restart any thread and so nothing re-inserts the breakpoint we just stepped over. But we need it inserted when we later process the pending events, otherwise if another thread has a pending event for this breakpoint too, we'd discard its event (because the breakpoint that originally caused the event was no longer inserted). */ context_switch (ecs->ptid); insert_breakpoints (); restart_threads (ecs->event_thread); /* If we have events pending, go through handle_inferior_event again, picking up a pending event at random. This avoids thread starvation. */ /* But not if we just stepped over a watchpoint in order to let the instruction execute so we can evaluate its expression. The set of watchpoints that triggered is recorded in the breakpoint objects themselves (see bp->watchpoint_triggered). If we processed another event first, that other event could clobber this info. */ if (ecs->event_thread->stepping_over_watchpoint) return 0; pending = iterate_over_threads (resumed_thread_with_pending_status, NULL); if (pending != NULL) { struct thread_info *tp = ecs->event_thread; struct regcache *regcache; if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: found resumed threads with " "pending events, saving status\n"); } gdb_assert (pending != tp); /* Record the event thread's event for later. */ save_waitstatus (tp, &ecs->ws); /* This was cleared early, by handle_inferior_event. Set it so this pending event is considered by do_target_wait. */ tp->resumed = 1; gdb_assert (!tp->executing); regcache = get_thread_regcache (tp->ptid); tp->suspend.stop_pc = regcache_read_pc (regcache); if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: saved stop_pc=%s for %s " "(currently_stepping=%d)\n", paddress (target_gdbarch (), tp->suspend.stop_pc), target_pid_to_str (tp->ptid), currently_stepping (tp)); } /* This in-line step-over finished; clear this so we won't start a new one. This is what handle_signal_stop would do, if we returned false. */ tp->stepping_over_breakpoint = 0; /* Wake up the event loop again. */ mark_async_event_handler (infrun_async_inferior_event_token); prepare_to_wait (ecs); return 1; } } return 0; } /* Come here when the program has stopped with a signal. */ static void handle_signal_stop (struct execution_control_state *ecs) { struct frame_info *frame; struct gdbarch *gdbarch; int stopped_by_watchpoint; enum stop_kind stop_soon; int random_signal; gdb_assert (ecs->ws.kind == TARGET_WAITKIND_STOPPED); /* Do we need to clean up the state of a thread that has completed a displaced single-step? (Doing so usually affects the PC, so do it here, before we set stop_pc.) */ if (finish_step_over (ecs)) return; /* If we either finished a single-step or hit a breakpoint, but the user wanted this thread to be stopped, pretend we got a SIG0 (generic unsignaled stop). */ if (ecs->event_thread->stop_requested && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP) ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid)); if (debug_infrun) { struct regcache *regcache = get_thread_regcache (ecs->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); struct cleanup *old_chain = save_inferior_ptid (); inferior_ptid = ecs->ptid; fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = %s\n", paddress (gdbarch, stop_pc)); if (target_stopped_by_watchpoint ()) { CORE_ADDR addr; fprintf_unfiltered (gdb_stdlog, "infrun: stopped by watchpoint\n"); if (target_stopped_data_address (&current_target, &addr)) fprintf_unfiltered (gdb_stdlog, "infrun: stopped data address = %s\n", paddress (gdbarch, addr)); else fprintf_unfiltered (gdb_stdlog, "infrun: (no data address available)\n"); } do_cleanups (old_chain); } /* This is originated from start_remote(), start_inferior() and shared libraries hook functions. */ stop_soon = get_inferior_stop_soon (ecs->ptid); if (stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_REMOTE) { if (!ptid_equal (ecs->ptid, inferior_ptid)) context_switch (ecs->ptid); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: quietly stopped\n"); stop_print_frame = 1; stop_waiting (ecs); return; } /* This originates from attach_command(). We need to overwrite the stop_signal here, because some kernels don't ignore a SIGSTOP in a subsequent ptrace(PTRACE_CONT,SIGSTOP) call. See more comments in inferior.h. On the other hand, if we get a non-SIGSTOP, report it to the user - assume the backend will handle the SIGSTOP if it should show up later. Also consider that the attach is complete when we see a SIGTRAP. Some systems (e.g. Windows), and stubs supporting target extended-remote report it instead of a SIGSTOP (e.g. gdbserver). We already rely on SIGTRAP being our signal, so this is no exception. Also consider that the attach is complete when we see a GDB_SIGNAL_0. In non-stop mode, GDB will explicitly tell the target to stop all threads of the inferior, in case the low level attach operation doesn't stop them implicitly. If they weren't stopped implicitly, then the stub will report a GDB_SIGNAL_0, meaning: stopped for no particular reason other than GDB's request. */ if (stop_soon == STOP_QUIETLY_NO_SIGSTOP && (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_STOP || ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP || ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_0)) { stop_print_frame = 1; stop_waiting (ecs); ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; return; } /* See if something interesting happened to the non-current thread. If so, then switch to that thread. */ if (!ptid_equal (ecs->ptid, inferior_ptid)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: context switch\n"); context_switch (ecs->ptid); if (deprecated_context_hook) deprecated_context_hook (ptid_to_global_thread_id (ecs->ptid)); } /* At this point, get hold of the now-current thread's frame. */ frame = get_current_frame (); gdbarch = get_frame_arch (frame); /* Pull the single step breakpoints out of the target. */ if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP) { struct regcache *regcache; struct address_space *aspace; CORE_ADDR pc; regcache = get_thread_regcache (ecs->ptid); aspace = get_regcache_aspace (regcache); pc = regcache_read_pc (regcache); /* However, before doing so, if this single-step breakpoint was actually for another thread, set this thread up for moving past it. */ if (!thread_has_single_step_breakpoint_here (ecs->event_thread, aspace, pc)) { if (single_step_breakpoint_inserted_here_p (aspace, pc)) { if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: [%s] hit another thread's " "single-step breakpoint\n", target_pid_to_str (ecs->ptid)); } ecs->hit_singlestep_breakpoint = 1; } } else { if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: [%s] hit its " "single-step breakpoint\n", target_pid_to_str (ecs->ptid)); } } } delete_just_stopped_threads_single_step_breakpoints (); if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP && ecs->event_thread->control.trap_expected && ecs->event_thread->stepping_over_watchpoint) stopped_by_watchpoint = 0; else stopped_by_watchpoint = watchpoints_triggered (&ecs->ws); /* If necessary, step over this watchpoint. We'll be back to display it in a moment. */ if (stopped_by_watchpoint && (target_have_steppable_watchpoint || gdbarch_have_nonsteppable_watchpoint (gdbarch))) { /* At this point, we are stopped at an instruction which has attempted to write to a piece of memory under control of a watchpoint. The instruction hasn't actually executed yet. If we were to evaluate the watchpoint expression now, we would get the old value, and therefore no change would seem to have occurred. In order to make watchpoints work `right', we really need to complete the memory write, and then evaluate the watchpoint expression. We do this by single-stepping the target. It may not be necessary to disable the watchpoint to step over it. For example, the PA can (with some kernel cooperation) single step over a watchpoint without disabling the watchpoint. It is far more common to need to disable a watchpoint to step the inferior over it. If we have non-steppable watchpoints, we must disable the current watchpoint; it's simplest to disable all watchpoints. Any breakpoint at PC must also be stepped over -- if there's one, it will have already triggered before the watchpoint triggered, and we either already reported it to the user, or it didn't cause a stop and we called keep_going. In either case, if there was a breakpoint at PC, we must be trying to step past it. */ ecs->event_thread->stepping_over_watchpoint = 1; keep_going (ecs); return; } ecs->event_thread->stepping_over_breakpoint = 0; ecs->event_thread->stepping_over_watchpoint = 0; bpstat_clear (&ecs->event_thread->control.stop_bpstat); ecs->event_thread->control.stop_step = 0; stop_print_frame = 1; stopped_by_random_signal = 0; /* Hide inlined functions starting here, unless we just performed stepi or nexti. After stepi and nexti, always show the innermost frame (not any inline function call sites). */ if (ecs->event_thread->control.step_range_end != 1) { struct address_space *aspace = get_regcache_aspace (get_thread_regcache (ecs->ptid)); /* skip_inline_frames is expensive, so we avoid it if we can determine that the address is one where functions cannot have been inlined. This improves performance with inferiors that load a lot of shared libraries, because the solib event breakpoint is defined as the address of a function (i.e. not inline). Note that we have to check the previous PC as well as the current one to catch cases when we have just single-stepped off a breakpoint prior to reinstating it. Note that we're assuming that the code we single-step to is not inline, but that's not definitive: there's nothing preventing the event breakpoint function from containing inlined code, and the single-step ending up there. If the user had set a breakpoint on that inlined code, the missing skip_inline_frames call would break things. Fortunately that's an extremely unlikely scenario. */ if (!pc_at_non_inline_function (aspace, stop_pc, &ecs->ws) && !(ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP && ecs->event_thread->control.trap_expected && pc_at_non_inline_function (aspace, ecs->event_thread->prev_pc, &ecs->ws))) { skip_inline_frames (ecs->ptid); /* Re-fetch current thread's frame in case that invalidated the frame cache. */ frame = get_current_frame (); gdbarch = get_frame_arch (frame); } } if (ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP && ecs->event_thread->control.trap_expected && gdbarch_single_step_through_delay_p (gdbarch) && currently_stepping (ecs->event_thread)) { /* We're trying to step off a breakpoint. Turns out that we're also on an instruction that needs to be stepped multiple times before it's been fully executing. E.g., architectures with a delay slot. It needs to be stepped twice, once for the instruction and once for the delay slot. */ int step_through_delay = gdbarch_single_step_through_delay (gdbarch, frame); if (debug_infrun && step_through_delay) fprintf_unfiltered (gdb_stdlog, "infrun: step through delay\n"); if (ecs->event_thread->control.step_range_end == 0 && step_through_delay) { /* The user issued a continue when stopped at a breakpoint. Set up for another trap and get out of here. */ ecs->event_thread->stepping_over_breakpoint = 1; keep_going (ecs); return; } else if (step_through_delay) { /* The user issued a step when stopped at a breakpoint. Maybe we should stop, maybe we should not - the delay slot *might* correspond to a line of source. In any case, don't decide that here, just set ecs->stepping_over_breakpoint, making sure we single-step again before breakpoints are re-inserted. */ ecs->event_thread->stepping_over_breakpoint = 1; } } /* See if there is a breakpoint/watchpoint/catchpoint/etc. that handles this event. */ ecs->event_thread->control.stop_bpstat = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()), stop_pc, ecs->ptid, &ecs->ws); /* Following in case break condition called a function. */ stop_print_frame = 1; /* This is where we handle "moribund" watchpoints. Unlike software breakpoints traps, hardware watchpoint traps are always distinguishable from random traps. If no high-level watchpoint is associated with the reported stop data address anymore, then the bpstat does not explain the signal --- simply make sure to ignore it if `stopped_by_watchpoint' is set. */ if (debug_infrun && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP && !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat, GDB_SIGNAL_TRAP) && stopped_by_watchpoint) fprintf_unfiltered (gdb_stdlog, "infrun: no user watchpoint explains " "watchpoint SIGTRAP, ignoring\n"); /* NOTE: cagney/2003-03-29: These checks for a random signal at one stage in the past included checks for an inferior function call's call dummy's return breakpoint. The original comment, that went with the test, read: ``End of a stack dummy. Some systems (e.g. Sony news) give another signal besides SIGTRAP, so check here as well as above.'' If someone ever tries to get call dummys on a non-executable stack to work (where the target would stop with something like a SIGSEGV), then those tests might need to be re-instated. Given, however, that the tests were only enabled when momentary breakpoints were not being used, I suspect that it won't be the case. NOTE: kettenis/2004-02-05: Indeed such checks don't seem to be necessary for call dummies on a non-executable stack on SPARC. */ /* See if the breakpoints module can explain the signal. */ random_signal = !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat, ecs->event_thread->suspend.stop_signal); /* Maybe this was a trap for a software breakpoint that has since been removed. */ if (random_signal && target_stopped_by_sw_breakpoint ()) { if (program_breakpoint_here_p (gdbarch, stop_pc)) { struct regcache *regcache; int decr_pc; /* Re-adjust PC to what the program would see if GDB was not debugging it. */ regcache = get_thread_regcache (ecs->event_thread->ptid); decr_pc = gdbarch_decr_pc_after_break (gdbarch); if (decr_pc != 0) { struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL); if (record_full_is_used ()) record_full_gdb_operation_disable_set (); regcache_write_pc (regcache, stop_pc + decr_pc); do_cleanups (old_cleanups); } } else { /* A delayed software breakpoint event. Ignore the trap. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: delayed software breakpoint " "trap, ignoring\n"); random_signal = 0; } } /* Maybe this was a trap for a hardware breakpoint/watchpoint that has since been removed. */ if (random_signal && target_stopped_by_hw_breakpoint ()) { /* A delayed hardware breakpoint event. Ignore the trap. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: delayed hardware breakpoint/watchpoint " "trap, ignoring\n"); random_signal = 0; } /* If not, perhaps stepping/nexting can. */ if (random_signal) random_signal = !(ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP && currently_stepping (ecs->event_thread)); /* Perhaps the thread hit a single-step breakpoint of _another_ thread. Single-step breakpoints are transparent to the breakpoints module. */ if (random_signal) random_signal = !ecs->hit_singlestep_breakpoint; /* No? Perhaps we got a moribund watchpoint. */ if (random_signal) random_signal = !stopped_by_watchpoint; /* For the program's own signals, act according to the signal handling tables. */ if (random_signal) { /* Signal not for debugging purposes. */ struct inferior *inf = find_inferior_ptid (ecs->ptid); enum gdb_signal stop_signal = ecs->event_thread->suspend.stop_signal; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: random signal (%s)\n", gdb_signal_to_symbol_string (stop_signal)); stopped_by_random_signal = 1; /* Always stop on signals if we're either just gaining control of the program, or the user explicitly requested this thread to remain stopped. */ if (stop_soon != NO_STOP_QUIETLY || ecs->event_thread->stop_requested || (!inf->detaching && signal_stop_state (ecs->event_thread->suspend.stop_signal))) { stop_waiting (ecs); return; } /* Notify observers the signal has "handle print" set. Note we returned early above if stopping; normal_stop handles the printing in that case. */ if (signal_print[ecs->event_thread->suspend.stop_signal]) { /* The signal table tells us to print about this signal. */ target_terminal_ours_for_output (); observer_notify_signal_received (ecs->event_thread->suspend.stop_signal); target_terminal_inferior (); } /* Clear the signal if it should not be passed. */ if (signal_program[ecs->event_thread->suspend.stop_signal] == 0) ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; if (ecs->event_thread->prev_pc == stop_pc && ecs->event_thread->control.trap_expected && ecs->event_thread->control.step_resume_breakpoint == NULL) { int was_in_line; /* We were just starting a new sequence, attempting to single-step off of a breakpoint and expecting a SIGTRAP. Instead this signal arrives. This signal will take us out of the stepping range so GDB needs to remember to, when the signal handler returns, resume stepping off that breakpoint. */ /* To simplify things, "continue" is forced to use the same code paths as single-step - set a breakpoint at the signal return address and then, once hit, step off that breakpoint. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: signal arrived while stepping over " "breakpoint\n"); was_in_line = step_over_info_valid_p (); clear_step_over_info (); insert_hp_step_resume_breakpoint_at_frame (frame); ecs->event_thread->step_after_step_resume_breakpoint = 1; /* Reset trap_expected to ensure breakpoints are re-inserted. */ ecs->event_thread->control.trap_expected = 0; if (target_is_non_stop_p ()) { /* Either "set non-stop" is "on", or the target is always in non-stop mode. In this case, we have a bit more work to do. Resume the current thread, and if we had paused all threads, restart them while the signal handler runs. */ keep_going (ecs); if (was_in_line) { restart_threads (ecs->event_thread); } else if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: no need to restart threads\n"); } return; } /* If we were nexting/stepping some other thread, switch to it, so that we don't continue it, losing control. */ if (!switch_back_to_stepped_thread (ecs)) keep_going (ecs); return; } if (ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_0 && (pc_in_thread_step_range (stop_pc, ecs->event_thread) || ecs->event_thread->control.step_range_end == 1) && frame_id_eq (get_stack_frame_id (frame), ecs->event_thread->control.step_stack_frame_id) && ecs->event_thread->control.step_resume_breakpoint == NULL) { /* The inferior is about to take a signal that will take it out of the single step range. Set a breakpoint at the current PC (which is presumably where the signal handler will eventually return) and then allow the inferior to run free. Note that this is only needed for a signal delivered while in the single-step range. Nested signals aren't a problem as they eventually all return. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: signal may take us out of " "single-step range\n"); clear_step_over_info (); insert_hp_step_resume_breakpoint_at_frame (frame); ecs->event_thread->step_after_step_resume_breakpoint = 1; /* Reset trap_expected to ensure breakpoints are re-inserted. */ ecs->event_thread->control.trap_expected = 0; keep_going (ecs); return; } /* Note: step_resume_breakpoint may be non-NULL. This occures when either there's a nested signal, or when there's a pending signal enabled just as the signal handler returns (leaving the inferior at the step-resume-breakpoint without actually executing it). Either way continue until the breakpoint is really hit. */ if (!switch_back_to_stepped_thread (ecs)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: random signal, keep going\n"); keep_going (ecs); } return; } process_event_stop_test (ecs); } /* Come here when we've got some debug event / signal we can explain (IOW, not a random signal), and test whether it should cause a stop, or whether we should resume the inferior (transparently). E.g., could be a breakpoint whose condition evaluates false; we could be still stepping within the line; etc. */ static void process_event_stop_test (struct execution_control_state *ecs) { struct symtab_and_line stop_pc_sal; struct frame_info *frame; struct gdbarch *gdbarch; CORE_ADDR jmp_buf_pc; struct bpstat_what what; /* Handle cases caused by hitting a breakpoint. */ frame = get_current_frame (); gdbarch = get_frame_arch (frame); what = bpstat_what (ecs->event_thread->control.stop_bpstat); if (what.call_dummy) { stop_stack_dummy = what.call_dummy; } /* A few breakpoint types have callbacks associated (e.g., bp_jit_event). Run them now. */ bpstat_run_callbacks (ecs->event_thread->control.stop_bpstat); /* If we hit an internal event that triggers symbol changes, the current frame will be invalidated within bpstat_what (e.g., if we hit an internal solib event). Re-fetch it. */ frame = get_current_frame (); gdbarch = get_frame_arch (frame); switch (what.main_action) { case BPSTAT_WHAT_SET_LONGJMP_RESUME: /* If we hit the breakpoint at longjmp while stepping, we install a momentary breakpoint at the target of the jmp_buf. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME\n"); ecs->event_thread->stepping_over_breakpoint = 1; if (what.is_longjmp) { struct value *arg_value; /* If we set the longjmp breakpoint via a SystemTap probe, then use it to extract the arguments. The destination PC is the third argument to the probe. */ arg_value = probe_safe_evaluate_at_pc (frame, 2); if (arg_value) { jmp_buf_pc = value_as_address (arg_value); jmp_buf_pc = gdbarch_addr_bits_remove (gdbarch, jmp_buf_pc); } else if (!gdbarch_get_longjmp_target_p (gdbarch) || !gdbarch_get_longjmp_target (gdbarch, frame, &jmp_buf_pc)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME " "(!gdbarch_get_longjmp_target)\n"); keep_going (ecs); return; } /* Insert a breakpoint at resume address. */ insert_longjmp_resume_breakpoint (gdbarch, jmp_buf_pc); } else check_exception_resume (ecs, frame); keep_going (ecs); return; case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME: { struct frame_info *init_frame; /* There are several cases to consider. 1. The initiating frame no longer exists. In this case we must stop, because the exception or longjmp has gone too far. 2. The initiating frame exists, and is the same as the current frame. We stop, because the exception or longjmp has been caught. 3. The initiating frame exists and is different from the current frame. This means the exception or longjmp has been caught beneath the initiating frame, so keep going. 4. longjmp breakpoint has been placed just to protect against stale dummy frames and user is not interested in stopping around longjmps. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME\n"); gdb_assert (ecs->event_thread->control.exception_resume_breakpoint != NULL); delete_exception_resume_breakpoint (ecs->event_thread); if (what.is_longjmp) { check_longjmp_breakpoint_for_call_dummy (ecs->event_thread); if (!frame_id_p (ecs->event_thread->initiating_frame)) { /* Case 4. */ keep_going (ecs); return; } } init_frame = frame_find_by_id (ecs->event_thread->initiating_frame); if (init_frame) { struct frame_id current_id = get_frame_id (get_current_frame ()); if (frame_id_eq (current_id, ecs->event_thread->initiating_frame)) { /* Case 2. Fall through. */ } else { /* Case 3. */ keep_going (ecs); return; } } /* For Cases 1 and 2, remove the step-resume breakpoint, if it exists. */ delete_step_resume_breakpoint (ecs->event_thread); end_stepping_range (ecs); } return; case BPSTAT_WHAT_SINGLE: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SINGLE\n"); ecs->event_thread->stepping_over_breakpoint = 1; /* Still need to check other stuff, at least the case where we are stepping and step out of the right range. */ break; case BPSTAT_WHAT_STEP_RESUME: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_STEP_RESUME\n"); delete_step_resume_breakpoint (ecs->event_thread); if (ecs->event_thread->control.proceed_to_finish && execution_direction == EXEC_REVERSE) { struct thread_info *tp = ecs->event_thread; /* We are finishing a function in reverse, and just hit the step-resume breakpoint at the start address of the function, and we're almost there -- just need to back up by one more single-step, which should take us back to the function call. */ tp->control.step_range_start = tp->control.step_range_end = 1; keep_going (ecs); return; } fill_in_stop_func (gdbarch, ecs); if (stop_pc == ecs->stop_func_start && execution_direction == EXEC_REVERSE) { /* We are stepping over a function call in reverse, and just hit the step-resume breakpoint at the start address of the function. Go back to single-stepping, which should take us back to the function call. */ ecs->event_thread->stepping_over_breakpoint = 1; keep_going (ecs); return; } break; case BPSTAT_WHAT_STOP_NOISY: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_STOP_NOISY\n"); stop_print_frame = 1; /* Assume the thread stopped for a breapoint. We'll still check whether a/the breakpoint is there when the thread is next resumed. */ ecs->event_thread->stepping_over_breakpoint = 1; stop_waiting (ecs); return; case BPSTAT_WHAT_STOP_SILENT: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_STOP_SILENT\n"); stop_print_frame = 0; /* Assume the thread stopped for a breapoint. We'll still check whether a/the breakpoint is there when the thread is next resumed. */ ecs->event_thread->stepping_over_breakpoint = 1; stop_waiting (ecs); return; case BPSTAT_WHAT_HP_STEP_RESUME: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_HP_STEP_RESUME\n"); delete_step_resume_breakpoint (ecs->event_thread); if (ecs->event_thread->step_after_step_resume_breakpoint) { /* Back when the step-resume breakpoint was inserted, we were trying to single-step off a breakpoint. Go back to doing that. */ ecs->event_thread->step_after_step_resume_breakpoint = 0; ecs->event_thread->stepping_over_breakpoint = 1; keep_going (ecs); return; } break; case BPSTAT_WHAT_KEEP_CHECKING: break; } /* If we stepped a permanent breakpoint and we had a high priority step-resume breakpoint for the address we stepped, but we didn't hit it, then we must have stepped into the signal handler. The step-resume was only necessary to catch the case of _not_ stepping into the handler, so delete it, and fall through to checking whether the step finished. */ if (ecs->event_thread->stepped_breakpoint) { struct breakpoint *sr_bp = ecs->event_thread->control.step_resume_breakpoint; if (sr_bp != NULL && sr_bp->loc->permanent && sr_bp->type == bp_hp_step_resume && sr_bp->loc->address == ecs->event_thread->prev_pc) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped permanent breakpoint, stopped in " "handler\n"); delete_step_resume_breakpoint (ecs->event_thread); ecs->event_thread->step_after_step_resume_breakpoint = 0; } } /* We come here if we hit a breakpoint but should not stop for it. Possibly we also were stepping and should stop for that. So fall through and test for stepping. But, if not stepping, do not stop. */ /* In all-stop mode, if we're currently stepping but have stopped in some other thread, we need to switch back to the stepped thread. */ if (switch_back_to_stepped_thread (ecs)) return; if (ecs->event_thread->control.step_resume_breakpoint) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: step-resume breakpoint is inserted\n"); /* Having a step-resume breakpoint overrides anything else having to do with stepping commands until that breakpoint is reached. */ keep_going (ecs); return; } if (ecs->event_thread->control.step_range_end == 0) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: no stepping, continue\n"); /* Likewise if we aren't even stepping. */ keep_going (ecs); return; } /* Re-fetch current thread's frame in case the code above caused the frame cache to be re-initialized, making our FRAME variable a dangling pointer. */ frame = get_current_frame (); gdbarch = get_frame_arch (frame); fill_in_stop_func (gdbarch, ecs); /* If stepping through a line, keep going if still within it. Note that step_range_end is the address of the first instruction beyond the step range, and NOT the address of the last instruction within it! Note also that during reverse execution, we may be stepping through a function epilogue and therefore must detect when the current-frame changes in the middle of a line. */ if (pc_in_thread_step_range (stop_pc, ecs->event_thread) && (execution_direction != EXEC_REVERSE || frame_id_eq (get_frame_id (frame), ecs->event_thread->control.step_frame_id))) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [%s-%s]\n", paddress (gdbarch, ecs->event_thread->control.step_range_start), paddress (gdbarch, ecs->event_thread->control.step_range_end)); /* Tentatively re-enable range stepping; `resume' disables it if necessary (e.g., if we're stepping over a breakpoint or we have software watchpoints). */ ecs->event_thread->control.may_range_step = 1; /* When stepping backward, stop at beginning of line range (unless it's the function entry point, in which case keep going back to the call point). */ if (stop_pc == ecs->event_thread->control.step_range_start && stop_pc != ecs->stop_func_start && execution_direction == EXEC_REVERSE) end_stepping_range (ecs); else keep_going (ecs); return; } /* We stepped out of the stepping range. */ /* If we are stepping at the source level and entered the runtime loader dynamic symbol resolution code... EXEC_FORWARD: we keep on single stepping until we exit the run time loader code and reach the callee's address. EXEC_REVERSE: we've already executed the callee (backward), and the runtime loader code is handled just like any other undebuggable function call. Now we need only keep stepping backward through the trampoline code, and that's handled further down, so there is nothing for us to do here. */ if (execution_direction != EXEC_REVERSE && ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE && in_solib_dynsym_resolve_code (stop_pc)) { CORE_ADDR pc_after_resolver = gdbarch_skip_solib_resolver (gdbarch, stop_pc); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into dynsym resolve code\n"); if (pc_after_resolver) { /* Set up a step-resume breakpoint at the address indicated by SKIP_SOLIB_RESOLVER. */ struct symtab_and_line sr_sal; init_sal (&sr_sal); sr_sal.pc = pc_after_resolver; sr_sal.pspace = get_frame_program_space (frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); } keep_going (ecs); return; } if (ecs->event_thread->control.step_range_end != 1 && (ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE || ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) && get_frame_type (frame) == SIGTRAMP_FRAME) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into signal trampoline\n"); /* The inferior, while doing a "step" or "next", has ended up in a signal trampoline (either by a signal being delivered or by the signal handler returning). Just single-step until the inferior leaves the trampoline (either by calling the handler or returning). */ keep_going (ecs); return; } /* If we're in the return path from a shared library trampoline, we want to proceed through the trampoline when stepping. */ /* macro/2012-04-25: This needs to come before the subroutine call check below as on some targets return trampolines look like subroutine calls (MIPS16 return thunks). */ if (gdbarch_in_solib_return_trampoline (gdbarch, stop_pc, ecs->stop_func_name) && ecs->event_thread->control.step_over_calls != STEP_OVER_NONE) { /* Determine where this trampoline returns. */ CORE_ADDR real_stop_pc; real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into solib return tramp\n"); /* Only proceed through if we know where it's going. */ if (real_stop_pc) { /* And put the step-breakpoint there and go until there. */ struct symtab_and_line sr_sal; init_sal (&sr_sal); /* initialize to zeroes */ sr_sal.pc = real_stop_pc; sr_sal.section = find_pc_overlay (sr_sal.pc); sr_sal.pspace = get_frame_program_space (frame); /* Do not specify what the fp should be when we stop since on some machines the prologue is where the new fp value is established. */ insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); /* Restart without fiddling with the step ranges or other state. */ keep_going (ecs); return; } } /* Check for subroutine calls. The check for the current frame equalling the step ID is not necessary - the check of the previous frame's ID is sufficient - but it is a common case and cheaper than checking the previous frame's ID. NOTE: frame_id_eq will never report two invalid frame IDs as being equal, so to get into this block, both the current and previous frame must have valid frame IDs. */ /* The outer_frame_id check is a heuristic to detect stepping through startup code. If we step over an instruction which sets the stack pointer from an invalid value to a valid value, we may detect that as a subroutine call from the mythical "outermost" function. This could be fixed by marking outermost frames as !stack_p,code_p,special_p. Then the initial outermost frame, before sp was valid, would have code_addr == &_start. See the comment in frame_id_eq for more. */ if (!frame_id_eq (get_stack_frame_id (frame), ecs->event_thread->control.step_stack_frame_id) && (frame_id_eq (frame_unwind_caller_id (get_current_frame ()), ecs->event_thread->control.step_stack_frame_id) && (!frame_id_eq (ecs->event_thread->control.step_stack_frame_id, outer_frame_id) || (ecs->event_thread->control.step_start_function != find_pc_function (stop_pc))))) { CORE_ADDR real_stop_pc; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into subroutine\n"); if (ecs->event_thread->control.step_over_calls == STEP_OVER_NONE) { /* I presume that step_over_calls is only 0 when we're supposed to be stepping at the assembly language level ("stepi"). Just stop. */ /* And this works the same backward as frontward. MVS */ end_stepping_range (ecs); return; } /* Reverse stepping through solib trampolines. */ if (execution_direction == EXEC_REVERSE && ecs->event_thread->control.step_over_calls != STEP_OVER_NONE && (gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc) || (ecs->stop_func_start == 0 && in_solib_dynsym_resolve_code (stop_pc)))) { /* Any solib trampoline code can be handled in reverse by simply continuing to single-step. We have already executed the solib function (backwards), and a few steps will take us back through the trampoline to the caller. */ keep_going (ecs); return; } if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { /* We're doing a "next". Normal (forward) execution: set a breakpoint at the callee's return address (the address at which the caller will resume). Reverse (backward) execution. set the step-resume breakpoint at the start of the function that we just stepped into (backwards), and continue to there. When we get there, we'll need to single-step back to the caller. */ if (execution_direction == EXEC_REVERSE) { /* If we're already at the start of the function, we've either just stepped backward into a single instruction function, or stepped back out of a signal handler to the first instruction of the function. Just keep going, which will single-step back to the caller. */ if (ecs->stop_func_start != stop_pc && ecs->stop_func_start != 0) { struct symtab_and_line sr_sal; /* Normal function call return (static or dynamic). */ init_sal (&sr_sal); sr_sal.pc = ecs->stop_func_start; sr_sal.pspace = get_frame_program_space (frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); } } else insert_step_resume_breakpoint_at_caller (frame); keep_going (ecs); return; } /* If we are in a function call trampoline (a stub between the calling routine and the real function), locate the real function. That's what tells us (a) whether we want to step into it at all, and (b) what prologue we want to run to the end of, if we do step into it. */ real_stop_pc = skip_language_trampoline (frame, stop_pc); if (real_stop_pc == 0) real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc); if (real_stop_pc != 0) ecs->stop_func_start = real_stop_pc; if (real_stop_pc != 0 && in_solib_dynsym_resolve_code (real_stop_pc)) { struct symtab_and_line sr_sal; init_sal (&sr_sal); sr_sal.pc = ecs->stop_func_start; sr_sal.pspace = get_frame_program_space (frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); keep_going (ecs); return; } /* If we have line number information for the function we are thinking of stepping into and the function isn't on the skip list, step into it. If there are several symtabs at that PC (e.g. with include files), just want to know whether *any* of them have line numbers. find_pc_line handles this. */ { struct symtab_and_line tmp_sal; tmp_sal = find_pc_line (ecs->stop_func_start, 0); if (tmp_sal.line != 0 && !function_name_is_marked_for_skip (ecs->stop_func_name, &tmp_sal)) { if (execution_direction == EXEC_REVERSE) handle_step_into_function_backward (gdbarch, ecs); else handle_step_into_function (gdbarch, ecs); return; } } /* If we have no line number and the step-stop-if-no-debug is set, we stop the step so that the user has a chance to switch in assembly mode. */ if (ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug) { end_stepping_range (ecs); return; } if (execution_direction == EXEC_REVERSE) { /* If we're already at the start of the function, we've either just stepped backward into a single instruction function without line number info, or stepped back out of a signal handler to the first instruction of the function without line number info. Just keep going, which will single-step back to the caller. */ if (ecs->stop_func_start != stop_pc) { /* Set a breakpoint at callee's start address. From there we can step once and be back in the caller. */ struct symtab_and_line sr_sal; init_sal (&sr_sal); sr_sal.pc = ecs->stop_func_start; sr_sal.pspace = get_frame_program_space (frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); } } else /* Set a breakpoint at callee's return address (the address at which the caller will resume). */ insert_step_resume_breakpoint_at_caller (frame); keep_going (ecs); return; } /* Reverse stepping through solib trampolines. */ if (execution_direction == EXEC_REVERSE && ecs->event_thread->control.step_over_calls != STEP_OVER_NONE) { if (gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc) || (ecs->stop_func_start == 0 && in_solib_dynsym_resolve_code (stop_pc))) { /* Any solib trampoline code can be handled in reverse by simply continuing to single-step. We have already executed the solib function (backwards), and a few steps will take us back through the trampoline to the caller. */ keep_going (ecs); return; } else if (in_solib_dynsym_resolve_code (stop_pc)) { /* Stepped backward into the solib dynsym resolver. Set a breakpoint at its start and continue, then one more step will take us out. */ struct symtab_and_line sr_sal; init_sal (&sr_sal); sr_sal.pc = ecs->stop_func_start; sr_sal.pspace = get_frame_program_space (frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); keep_going (ecs); return; } } stop_pc_sal = find_pc_line (stop_pc, 0); /* NOTE: tausq/2004-05-24: This if block used to be done before all the trampoline processing logic, however, there are some trampolines that have no names, so we should do trampoline handling first. */ if (ecs->event_thread->control.step_over_calls == STEP_OVER_UNDEBUGGABLE && ecs->stop_func_name == NULL && stop_pc_sal.line == 0) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into undebuggable function\n"); /* The inferior just stepped into, or returned to, an undebuggable function (where there is no debugging information and no line number corresponding to the address where the inferior stopped). Since we want to skip this kind of code, we keep going until the inferior returns from this function - unless the user has asked us not to (via set step-mode) or we no longer know how to get back to the call site. */ if (step_stop_if_no_debug || !frame_id_p (frame_unwind_caller_id (frame))) { /* If we have no line number and the step-stop-if-no-debug is set, we stop the step so that the user has a chance to switch in assembly mode. */ end_stepping_range (ecs); return; } else { /* Set a breakpoint at callee's return address (the address at which the caller will resume). */ insert_step_resume_breakpoint_at_caller (frame); keep_going (ecs); return; } } if (ecs->event_thread->control.step_range_end == 1) { /* It is stepi or nexti. We always want to stop stepping after one instruction. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepi/nexti\n"); end_stepping_range (ecs); return; } if (stop_pc_sal.line == 0) { /* We have no line number information. That means to stop stepping (does this always happen right after one instruction, when we do "s" in a function with no line numbers, or can this happen as a result of a return or longjmp?). */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: no line number info\n"); end_stepping_range (ecs); return; } /* Look for "calls" to inlined functions, part one. If the inline frame machinery detected some skipped call sites, we have entered a new inline function. */ if (frame_id_eq (get_frame_id (get_current_frame ()), ecs->event_thread->control.step_frame_id) && inline_skipped_frames (ecs->ptid)) { struct symtab_and_line call_sal; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped into inlined function\n"); find_frame_sal (get_current_frame (), &call_sal); if (ecs->event_thread->control.step_over_calls != STEP_OVER_ALL) { /* For "step", we're going to stop. But if the call site for this inlined function is on the same source line as we were previously stepping, go down into the function first. Otherwise stop at the call site. */ if (call_sal.line == ecs->event_thread->current_line && call_sal.symtab == ecs->event_thread->current_symtab) step_into_inline_frame (ecs->ptid); end_stepping_range (ecs); return; } else { /* For "next", we should stop at the call site if it is on a different source line. Otherwise continue through the inlined function. */ if (call_sal.line == ecs->event_thread->current_line && call_sal.symtab == ecs->event_thread->current_symtab) keep_going (ecs); else end_stepping_range (ecs); return; } } /* Look for "calls" to inlined functions, part two. If we are still in the same real function we were stepping through, but we have to go further up to find the exact frame ID, we are stepping through a more inlined call beyond its call site. */ if (get_frame_type (get_current_frame ()) == INLINE_FRAME && !frame_id_eq (get_frame_id (get_current_frame ()), ecs->event_thread->control.step_frame_id) && stepped_in_from (get_current_frame (), ecs->event_thread->control.step_frame_id)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping through inlined function\n"); if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) keep_going (ecs); else end_stepping_range (ecs); return; } if ((stop_pc == stop_pc_sal.pc) && (ecs->event_thread->current_line != stop_pc_sal.line || ecs->event_thread->current_symtab != stop_pc_sal.symtab)) { /* We are at the start of a different line. So stop. Note that we don't stop if we step into the middle of a different line. That is said to make things like for (;;) statements work better. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different line\n"); end_stepping_range (ecs); return; } /* We aren't done stepping. Optimize by setting the stepping range to the line. (We might not be in the original line, but if we entered a new line in mid-statement, we continue stepping. This makes things like for(;;) statements work better.) */ ecs->event_thread->control.step_range_start = stop_pc_sal.pc; ecs->event_thread->control.step_range_end = stop_pc_sal.end; ecs->event_thread->control.may_range_step = 1; set_step_info (frame, stop_pc_sal); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: keep going\n"); keep_going (ecs); } /* In all-stop mode, if we're currently stepping but have stopped in some other thread, we may need to switch back to the stepped thread. Returns true we set the inferior running, false if we left it stopped (and the event needs further processing). */ static int switch_back_to_stepped_thread (struct execution_control_state *ecs) { if (!target_is_non_stop_p ()) { struct thread_info *tp; struct thread_info *stepping_thread; /* If any thread is blocked on some internal breakpoint, and we simply need to step over that breakpoint to get it going again, do that first. */ /* However, if we see an event for the stepping thread, then we know all other threads have been moved past their breakpoints already. Let the caller check whether the step is finished, etc., before deciding to move it past a breakpoint. */ if (ecs->event_thread->control.step_range_end != 0) return 0; /* Check if the current thread is blocked on an incomplete step-over, interrupted by a random signal. */ if (ecs->event_thread->control.trap_expected && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_TRAP) { if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: need to finish step-over of [%s]\n", target_pid_to_str (ecs->event_thread->ptid)); } keep_going (ecs); return 1; } /* Check if the current thread is blocked by a single-step breakpoint of another thread. */ if (ecs->hit_singlestep_breakpoint) { if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: need to step [%s] over single-step " "breakpoint\n", target_pid_to_str (ecs->ptid)); } keep_going (ecs); return 1; } /* If this thread needs yet another step-over (e.g., stepping through a delay slot), do it first before moving on to another thread. */ if (thread_still_needs_step_over (ecs->event_thread)) { if (debug_infrun) { fprintf_unfiltered (gdb_stdlog, "infrun: thread [%s] still needs step-over\n", target_pid_to_str (ecs->event_thread->ptid)); } keep_going (ecs); return 1; } /* If scheduler locking applies even if not stepping, there's no need to walk over threads. Above we've checked whether the current thread is stepping. If some other thread not the event thread is stepping, then it must be that scheduler locking is not in effect. */ if (schedlock_applies (ecs->event_thread)) return 0; /* Otherwise, we no longer expect a trap in the current thread. Clear the trap_expected flag before switching back -- this is what keep_going does as well, if we call it. */ ecs->event_thread->control.trap_expected = 0; /* Likewise, clear the signal if it should not be passed. */ if (!signal_program[ecs->event_thread->suspend.stop_signal]) ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; /* Do all pending step-overs before actually proceeding with step/next/etc. */ if (start_step_over ()) { prepare_to_wait (ecs); return 1; } /* Look for the stepping/nexting thread. */ stepping_thread = NULL; ALL_NON_EXITED_THREADS (tp) { /* Ignore threads of processes the caller is not resuming. */ if (!sched_multi && ptid_get_pid (tp->ptid) != ptid_get_pid (ecs->ptid)) continue; /* When stepping over a breakpoint, we lock all threads except the one that needs to move past the breakpoint. If a non-event thread has this set, the "incomplete step-over" check above should have caught it earlier. */ if (tp->control.trap_expected) { internal_error (__FILE__, __LINE__, "[%s] has inconsistent state: " "trap_expected=%d\n", target_pid_to_str (tp->ptid), tp->control.trap_expected); } /* Did we find the stepping thread? */ if (tp->control.step_range_end) { /* Yep. There should only one though. */ gdb_assert (stepping_thread == NULL); /* The event thread is handled at the top, before we enter this loop. */ gdb_assert (tp != ecs->event_thread); /* If some thread other than the event thread is stepping, then scheduler locking can't be in effect, otherwise we wouldn't have resumed the current event thread in the first place. */ gdb_assert (!schedlock_applies (tp)); stepping_thread = tp; } } if (stepping_thread != NULL) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: switching back to stepped thread\n"); if (keep_going_stepped_thread (stepping_thread)) { prepare_to_wait (ecs); return 1; } } } return 0; } /* Set a previously stepped thread back to stepping. Returns true on success, false if the resume is not possible (e.g., the thread vanished). */ static int keep_going_stepped_thread (struct thread_info *tp) { struct frame_info *frame; struct execution_control_state ecss; struct execution_control_state *ecs = &ecss; /* If the stepping thread exited, then don't try to switch back and resume it, which could fail in several different ways depending on the target. Instead, just keep going. We can find a stepping dead thread in the thread list in two cases: - The target supports thread exit events, and when the target tries to delete the thread from the thread list, inferior_ptid pointed at the exiting thread. In such case, calling delete_thread does not really remove the thread from the list; instead, the thread is left listed, with 'exited' state. - The target's debug interface does not support thread exit events, and so we have no idea whatsoever if the previously stepping thread is still alive. For that reason, we need to synchronously query the target now. */ if (is_exited (tp->ptid) || !target_thread_alive (tp->ptid)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: not resuming previously " "stepped thread, it has vanished\n"); delete_thread (tp->ptid); return 0; } if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resuming previously stepped thread\n"); reset_ecs (ecs, tp); switch_to_thread (tp->ptid); stop_pc = regcache_read_pc (get_thread_regcache (tp->ptid)); frame = get_current_frame (); /* If the PC of the thread we were trying to single-step has changed, then that thread has trapped or been signaled, but the event has not been reported to GDB yet. Re-poll the target looking for this particular thread's event (i.e. temporarily enable schedlock) by: - setting a break at the current PC - resuming that particular thread, only (by setting trap expected) This prevents us continuously moving the single-step breakpoint forward, one instruction at a time, overstepping. */ if (stop_pc != tp->prev_pc) { ptid_t resume_ptid; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: expected thread advanced also (%s -> %s)\n", paddress (target_gdbarch (), tp->prev_pc), paddress (target_gdbarch (), stop_pc)); /* Clear the info of the previous step-over, as it's no longer valid (if the thread was trying to step over a breakpoint, it has already succeeded). It's what keep_going would do too, if we called it. Do this before trying to insert the sss breakpoint, otherwise if we were previously trying to step over this exact address in another thread, the breakpoint is skipped. */ clear_step_over_info (); tp->control.trap_expected = 0; insert_single_step_breakpoint (get_frame_arch (frame), get_frame_address_space (frame), stop_pc); tp->resumed = 1; resume_ptid = internal_resume_ptid (tp->control.stepping_command); do_target_resume (resume_ptid, 0, GDB_SIGNAL_0); } else { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: expected thread still hasn't advanced\n"); keep_going_pass_signal (ecs); } return 1; } /* Is thread TP in the middle of (software or hardware) single-stepping? (Note the result of this function must never be passed directly as target_resume's STEP parameter.) */ static int currently_stepping (struct thread_info *tp) { return ((tp->control.step_range_end && tp->control.step_resume_breakpoint == NULL) || tp->control.trap_expected || tp->stepped_breakpoint || bpstat_should_step ()); } /* Inferior has stepped into a subroutine call with source code that we should not step over. Do step to the first line of code in it. */ static void handle_step_into_function (struct gdbarch *gdbarch, struct execution_control_state *ecs) { struct compunit_symtab *cust; struct symtab_and_line stop_func_sal, sr_sal; fill_in_stop_func (gdbarch, ecs); cust = find_pc_compunit_symtab (stop_pc); if (cust != NULL && compunit_language (cust) != language_asm) ecs->stop_func_start = gdbarch_skip_prologue (gdbarch, ecs->stop_func_start); stop_func_sal = find_pc_line (ecs->stop_func_start, 0); /* Use the step_resume_break to step until the end of the prologue, even if that involves jumps (as it seems to on the vax under 4.2). */ /* If the prologue ends in the middle of a source line, continue to the end of that source line (if it is still within the function). Otherwise, just go to end of prologue. */ if (stop_func_sal.end && stop_func_sal.pc != ecs->stop_func_start && stop_func_sal.end < ecs->stop_func_end) ecs->stop_func_start = stop_func_sal.end; /* Architectures which require breakpoint adjustment might not be able to place a breakpoint at the computed address. If so, the test ``ecs->stop_func_start == stop_pc'' will never succeed. Adjust ecs->stop_func_start to an address at which a breakpoint may be legitimately placed. Note: kevinb/2004-01-19: On FR-V, if this adjustment is not made, GDB will enter an infinite loop when stepping through optimized code consisting of VLIW instructions which contain subinstructions corresponding to different source lines. On FR-V, it's not permitted to place a breakpoint on any but the first subinstruction of a VLIW instruction. When a breakpoint is set, GDB will adjust the breakpoint address to the beginning of the VLIW instruction. Thus, we need to make the corresponding adjustment here when computing the stop address. */ if (gdbarch_adjust_breakpoint_address_p (gdbarch)) { ecs->stop_func_start = gdbarch_adjust_breakpoint_address (gdbarch, ecs->stop_func_start); } if (ecs->stop_func_start == stop_pc) { /* We are already there: stop now. */ end_stepping_range (ecs); return; } else { /* Put the step-breakpoint there and go until there. */ init_sal (&sr_sal); /* initialize to zeroes */ sr_sal.pc = ecs->stop_func_start; sr_sal.section = find_pc_overlay (ecs->stop_func_start); sr_sal.pspace = get_frame_program_space (get_current_frame ()); /* Do not specify what the fp should be when we stop since on some machines the prologue is where the new fp value is established. */ insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, null_frame_id); /* And make sure stepping stops right away then. */ ecs->event_thread->control.step_range_end = ecs->event_thread->control.step_range_start; } keep_going (ecs); } /* Inferior has stepped backward into a subroutine call with source code that we should not step over. Do step to the beginning of the last line of code in it. */ static void handle_step_into_function_backward (struct gdbarch *gdbarch, struct execution_control_state *ecs) { struct compunit_symtab *cust; struct symtab_and_line stop_func_sal; fill_in_stop_func (gdbarch, ecs); cust = find_pc_compunit_symtab (stop_pc); if (cust != NULL && compunit_language (cust) != language_asm) ecs->stop_func_start = gdbarch_skip_prologue (gdbarch, ecs->stop_func_start); stop_func_sal = find_pc_line (stop_pc, 0); /* OK, we're just going to keep stepping here. */ if (stop_func_sal.pc == stop_pc) { /* We're there already. Just stop stepping now. */ end_stepping_range (ecs); } else { /* Else just reset the step range and keep going. No step-resume breakpoint, they don't work for epilogues, which can have multiple entry paths. */ ecs->event_thread->control.step_range_start = stop_func_sal.pc; ecs->event_thread->control.step_range_end = stop_func_sal.end; keep_going (ecs); } return; } /* Insert a "step-resume breakpoint" at SR_SAL with frame ID SR_ID. This is used to both functions and to skip over code. */ static void insert_step_resume_breakpoint_at_sal_1 (struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id, enum bptype sr_type) { /* There should never be more than one step-resume or longjmp-resume breakpoint per thread, so we should never be setting a new step_resume_breakpoint when one is already active. */ gdb_assert (inferior_thread ()->control.step_resume_breakpoint == NULL); gdb_assert (sr_type == bp_step_resume || sr_type == bp_hp_step_resume); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: inserting step-resume breakpoint at %s\n", paddress (gdbarch, sr_sal.pc)); inferior_thread ()->control.step_resume_breakpoint = set_momentary_breakpoint (gdbarch, sr_sal, sr_id, sr_type); } void insert_step_resume_breakpoint_at_sal (struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id) { insert_step_resume_breakpoint_at_sal_1 (gdbarch, sr_sal, sr_id, bp_step_resume); } /* Insert a "high-priority step-resume breakpoint" at RETURN_FRAME.pc. This is used to skip a potential signal handler. This is called with the interrupted function's frame. The signal handler, when it returns, will resume the interrupted function at RETURN_FRAME.pc. */ static void insert_hp_step_resume_breakpoint_at_frame (struct frame_info *return_frame) { struct symtab_and_line sr_sal; struct gdbarch *gdbarch; gdb_assert (return_frame != NULL); init_sal (&sr_sal); /* initialize to zeros */ gdbarch = get_frame_arch (return_frame); sr_sal.pc = gdbarch_addr_bits_remove (gdbarch, get_frame_pc (return_frame)); sr_sal.section = find_pc_overlay (sr_sal.pc); sr_sal.pspace = get_frame_program_space (return_frame); insert_step_resume_breakpoint_at_sal_1 (gdbarch, sr_sal, get_stack_frame_id (return_frame), bp_hp_step_resume); } /* Insert a "step-resume breakpoint" at the previous frame's PC. This is used to skip a function after stepping into it (for "next" or if the called function has no debugging information). The current function has almost always been reached by single stepping a call or return instruction. NEXT_FRAME belongs to the current function, and the breakpoint will be set at the caller's resume address. This is a separate function rather than reusing insert_hp_step_resume_breakpoint_at_frame in order to avoid get_prev_frame, which may stop prematurely (see the implementation of frame_unwind_caller_id for an example). */ static void insert_step_resume_breakpoint_at_caller (struct frame_info *next_frame) { struct symtab_and_line sr_sal; struct gdbarch *gdbarch; /* We shouldn't have gotten here if we don't know where the call site is. */ gdb_assert (frame_id_p (frame_unwind_caller_id (next_frame))); init_sal (&sr_sal); /* initialize to zeros */ gdbarch = frame_unwind_caller_arch (next_frame); sr_sal.pc = gdbarch_addr_bits_remove (gdbarch, frame_unwind_caller_pc (next_frame)); sr_sal.section = find_pc_overlay (sr_sal.pc); sr_sal.pspace = frame_unwind_program_space (next_frame); insert_step_resume_breakpoint_at_sal (gdbarch, sr_sal, frame_unwind_caller_id (next_frame)); } /* Insert a "longjmp-resume" breakpoint at PC. This is used to set a new breakpoint at the target of a jmp_buf. The handling of longjmp-resume uses the same mechanisms used for handling "step-resume" breakpoints. */ static void insert_longjmp_resume_breakpoint (struct gdbarch *gdbarch, CORE_ADDR pc) { /* There should never be more than one longjmp-resume breakpoint per thread, so we should never be setting a new longjmp_resume_breakpoint when one is already active. */ gdb_assert (inferior_thread ()->control.exception_resume_breakpoint == NULL); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: inserting longjmp-resume breakpoint at %s\n", paddress (gdbarch, pc)); inferior_thread ()->control.exception_resume_breakpoint = set_momentary_breakpoint_at_pc (gdbarch, pc, bp_longjmp_resume); } /* Insert an exception resume breakpoint. TP is the thread throwing the exception. The block B is the block of the unwinder debug hook function. FRAME is the frame corresponding to the call to this function. SYM is the symbol of the function argument holding the target PC of the exception. */ static void insert_exception_resume_breakpoint (struct thread_info *tp, const struct block *b, struct frame_info *frame, struct symbol *sym) { TRY { struct block_symbol vsym; struct value *value; CORE_ADDR handler; struct breakpoint *bp; vsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym), b, VAR_DOMAIN, NULL); value = read_var_value (vsym.symbol, vsym.block, frame); /* If the value was optimized out, revert to the old behavior. */ if (! value_optimized_out (value)) { handler = value_as_address (value); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: exception resume at %lx\n", (unsigned long) handler); bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame), handler, bp_exception_resume); /* set_momentary_breakpoint_at_pc invalidates FRAME. */ frame = NULL; bp->thread = tp->global_num; inferior_thread ()->control.exception_resume_breakpoint = bp; } } CATCH (e, RETURN_MASK_ERROR) { /* We want to ignore errors here. */ } END_CATCH } /* A helper for check_exception_resume that sets an exception-breakpoint based on a SystemTap probe. */ static void insert_exception_resume_from_probe (struct thread_info *tp, const struct bound_probe *probe, struct frame_info *frame) { struct value *arg_value; CORE_ADDR handler; struct breakpoint *bp; arg_value = probe_safe_evaluate_at_pc (frame, 1); if (!arg_value) return; handler = value_as_address (arg_value); if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: exception resume at %s\n", paddress (get_objfile_arch (probe->objfile), handler)); bp = set_momentary_breakpoint_at_pc (get_frame_arch (frame), handler, bp_exception_resume); bp->thread = tp->global_num; inferior_thread ()->control.exception_resume_breakpoint = bp; } /* This is called when an exception has been intercepted. Check to see whether the exception's destination is of interest, and if so, set an exception resume breakpoint there. */ static void check_exception_resume (struct execution_control_state *ecs, struct frame_info *frame) { struct bound_probe probe; struct symbol *func; /* First see if this exception unwinding breakpoint was set via a SystemTap probe point. If so, the probe has two arguments: the CFA and the HANDLER. We ignore the CFA, extract the handler, and set a breakpoint there. */ probe = find_probe_by_pc (get_frame_pc (frame)); if (probe.probe) { insert_exception_resume_from_probe (ecs->event_thread, &probe, frame); return; } func = get_frame_function (frame); if (!func) return; TRY { const struct block *b; struct block_iterator iter; struct symbol *sym; int argno = 0; /* The exception breakpoint is a thread-specific breakpoint on the unwinder's debug hook, declared as: void _Unwind_DebugHook (void *cfa, void *handler); The CFA argument indicates the frame to which control is about to be transferred. HANDLER is the destination PC. We ignore the CFA and set a temporary breakpoint at HANDLER. This is not extremely efficient but it avoids issues in gdb with computing the DWARF CFA, and it also works even in weird cases such as throwing an exception from inside a signal handler. */ b = SYMBOL_BLOCK_VALUE (func); ALL_BLOCK_SYMBOLS (b, iter, sym) { if (!SYMBOL_IS_ARGUMENT (sym)) continue; if (argno == 0) ++argno; else { insert_exception_resume_breakpoint (ecs->event_thread, b, frame, sym); break; } } } CATCH (e, RETURN_MASK_ERROR) { } END_CATCH } static void stop_waiting (struct execution_control_state *ecs) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stop_waiting\n"); clear_step_over_info (); /* Let callers know we don't want to wait for the inferior anymore. */ ecs->wait_some_more = 0; /* If all-stop, but the target is always in non-stop mode, stop all threads now that we're presenting the stop to the user. */ if (!non_stop && target_is_non_stop_p ()) stop_all_threads (); } /* Like keep_going, but passes the signal to the inferior, even if the signal is set to nopass. */ static void keep_going_pass_signal (struct execution_control_state *ecs) { /* Make sure normal_stop is called if we get a QUIT handled before reaching resume. */ struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); gdb_assert (ptid_equal (ecs->event_thread->ptid, inferior_ptid)); gdb_assert (!ecs->event_thread->resumed); /* Save the pc before execution, to compare with pc after stop. */ ecs->event_thread->prev_pc = regcache_read_pc (get_thread_regcache (ecs->ptid)); if (ecs->event_thread->control.trap_expected) { struct thread_info *tp = ecs->event_thread; if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: %s has trap_expected set, " "resuming to collect trap\n", target_pid_to_str (tp->ptid)); /* We haven't yet gotten our trap, and either: intercepted a non-signal event (e.g., a fork); or took a signal which we are supposed to pass through to the inferior. Simply continue. */ discard_cleanups (old_cleanups); resume (ecs->event_thread->suspend.stop_signal); } else if (step_over_info_valid_p ()) { /* Another thread is stepping over a breakpoint in-line. If this thread needs a step-over too, queue the request. In either case, this resume must be deferred for later. */ struct thread_info *tp = ecs->event_thread; if (ecs->hit_singlestep_breakpoint || thread_still_needs_step_over (tp)) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: step-over already in progress: " "step-over for %s deferred\n", target_pid_to_str (tp->ptid)); thread_step_over_chain_enqueue (tp); } else { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: step-over in progress: " "resume of %s deferred\n", target_pid_to_str (tp->ptid)); } discard_cleanups (old_cleanups); } else { struct regcache *regcache = get_current_regcache (); int remove_bp; int remove_wps; step_over_what step_what; /* Either the trap was not expected, but we are continuing anyway (if we got a signal, the user asked it be passed to the child) -- or -- We got our expected trap, but decided we should resume from it. We're going to run this baby now! Note that insert_breakpoints won't try to re-insert already inserted breakpoints. Therefore, we don't care if breakpoints were already inserted, or not. */ /* If we need to step over a breakpoint, and we're not using displaced stepping to do so, insert all breakpoints (watchpoints, etc.) but the one we're stepping over, step one instruction, and then re-insert the breakpoint when that step is finished. */ step_what = thread_still_needs_step_over (ecs->event_thread); remove_bp = (ecs->hit_singlestep_breakpoint || (step_what & STEP_OVER_BREAKPOINT)); remove_wps = (step_what & STEP_OVER_WATCHPOINT); /* We can't use displaced stepping if we need to step past a watchpoint. The instruction copied to the scratch pad would still trigger the watchpoint. */ if (remove_bp && (remove_wps || !use_displaced_stepping (ecs->event_thread))) { set_step_over_info (get_regcache_aspace (regcache), regcache_read_pc (regcache), remove_wps, ecs->event_thread->global_num); } else if (remove_wps) set_step_over_info (NULL, 0, remove_wps, -1); /* If we now need to do an in-line step-over, we need to stop all other threads. Note this must be done before insert_breakpoints below, because that removes the breakpoint we're about to step over, otherwise other threads could miss it. */ if (step_over_info_valid_p () && target_is_non_stop_p ()) stop_all_threads (); /* Stop stepping if inserting breakpoints fails. */ TRY { insert_breakpoints (); } CATCH (e, RETURN_MASK_ERROR) { exception_print (gdb_stderr, e); stop_waiting (ecs); discard_cleanups (old_cleanups); return; } END_CATCH ecs->event_thread->control.trap_expected = (remove_bp || remove_wps); discard_cleanups (old_cleanups); resume (ecs->event_thread->suspend.stop_signal); } prepare_to_wait (ecs); } /* Called when we should continue running the inferior, because the current event doesn't cause a user visible stop. This does the resuming part; waiting for the next event is done elsewhere. */ static void keep_going (struct execution_control_state *ecs) { if (ecs->event_thread->control.trap_expected && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP) ecs->event_thread->control.trap_expected = 0; if (!signal_program[ecs->event_thread->suspend.stop_signal]) ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0; keep_going_pass_signal (ecs); } /* This function normally comes after a resume, before handle_inferior_event exits. It takes care of any last bits of housekeeping, and sets the all-important wait_some_more flag. */ static void prepare_to_wait (struct execution_control_state *ecs) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: prepare_to_wait\n"); ecs->wait_some_more = 1; if (!target_is_async_p ()) mark_infrun_async_event_handler (); } /* We are done with the step range of a step/next/si/ni command. Called once for each n of a "step n" operation. */ static void end_stepping_range (struct execution_control_state *ecs) { ecs->event_thread->control.stop_step = 1; stop_waiting (ecs); } /* Several print_*_reason functions to print why the inferior has stopped. We always print something when the inferior exits, or receives a signal. The rest of the cases are dealt with later on in normal_stop and print_it_typical. Ideally there should be a call to one of these print_*_reason functions functions from handle_inferior_event each time stop_waiting is called. Note that we don't call these directly, instead we delegate that to the interpreters, through observers. Interpreters then call these with whatever uiout is right. */ void print_end_stepping_range_reason (struct ui_out *uiout) { /* For CLI-like interpreters, print nothing. */ if (ui_out_is_mi_like_p (uiout)) { ui_out_field_string (uiout, "reason", async_reason_lookup (EXEC_ASYNC_END_STEPPING_RANGE)); } } void print_signal_exited_reason (struct ui_out *uiout, enum gdb_signal siggnal) { annotate_signalled (); if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", async_reason_lookup (EXEC_ASYNC_EXITED_SIGNALLED)); ui_out_text (uiout, "\nProgram terminated with signal "); annotate_signal_name (); ui_out_field_string (uiout, "signal-name", gdb_signal_to_name (siggnal)); annotate_signal_name_end (); ui_out_text (uiout, ", "); annotate_signal_string (); ui_out_field_string (uiout, "signal-meaning", gdb_signal_to_string (siggnal)); annotate_signal_string_end (); ui_out_text (uiout, ".\n"); ui_out_text (uiout, "The program no longer exists.\n"); } void print_exited_reason (struct ui_out *uiout, int exitstatus) { struct inferior *inf = current_inferior (); const char *pidstr = target_pid_to_str (pid_to_ptid (inf->pid)); annotate_exited (exitstatus); if (exitstatus) { if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", async_reason_lookup (EXEC_ASYNC_EXITED)); ui_out_text (uiout, "[Inferior "); ui_out_text (uiout, plongest (inf->num)); ui_out_text (uiout, " ("); ui_out_text (uiout, pidstr); ui_out_text (uiout, ") exited with code "); ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) exitstatus); ui_out_text (uiout, "]\n"); } else { if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY)); ui_out_text (uiout, "[Inferior "); ui_out_text (uiout, plongest (inf->num)); ui_out_text (uiout, " ("); ui_out_text (uiout, pidstr); ui_out_text (uiout, ") exited normally]\n"); } } /* Some targets/architectures can do extra processing/display of segmentation faults. E.g., Intel MPX boundary faults. Call the architecture dependent function to handle the fault. */ static void handle_segmentation_fault (struct ui_out *uiout) { struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); if (gdbarch_handle_segmentation_fault_p (gdbarch)) gdbarch_handle_segmentation_fault (gdbarch, uiout); } void print_signal_received_reason (struct ui_out *uiout, enum gdb_signal siggnal) { struct thread_info *thr = inferior_thread (); annotate_signal (); if (ui_out_is_mi_like_p (uiout)) ; else if (show_thread_that_caused_stop ()) { const char *name; ui_out_text (uiout, "\nThread "); ui_out_field_fmt (uiout, "thread-id", "%s", print_thread_id (thr)); name = thr->name != NULL ? thr->name : target_thread_name (thr); if (name != NULL) { ui_out_text (uiout, " \""); ui_out_field_fmt (uiout, "name", "%s", name); ui_out_text (uiout, "\""); } } else ui_out_text (uiout, "\nProgram"); if (siggnal == GDB_SIGNAL_0 && !ui_out_is_mi_like_p (uiout)) ui_out_text (uiout, " stopped"); else { ui_out_text (uiout, " received signal "); annotate_signal_name (); if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "reason", async_reason_lookup (EXEC_ASYNC_SIGNAL_RECEIVED)); ui_out_field_string (uiout, "signal-name", gdb_signal_to_name (siggnal)); annotate_signal_name_end (); ui_out_text (uiout, ", "); annotate_signal_string (); ui_out_field_string (uiout, "signal-meaning", gdb_signal_to_string (siggnal)); if (siggnal == GDB_SIGNAL_SEGV) handle_segmentation_fault (uiout); annotate_signal_string_end (); } ui_out_text (uiout, ".\n"); } void print_no_history_reason (struct ui_out *uiout) { ui_out_text (uiout, "\nNo more reverse-execution history.\n"); } /* Print current location without a level number, if we have changed functions or hit a breakpoint. Print source line if we have one. bpstat_print contains the logic deciding in detail what to print, based on the event(s) that just occurred. */ static void print_stop_location (struct target_waitstatus *ws) { int bpstat_ret; enum print_what source_flag; int do_frame_printing = 1; struct thread_info *tp = inferior_thread (); bpstat_ret = bpstat_print (tp->control.stop_bpstat, ws->kind); switch (bpstat_ret) { case PRINT_UNKNOWN: /* FIXME: cagney/2002-12-01: Given that a frame ID does (or should) carry around the function and does (or should) use that when doing a frame comparison. */ if (tp->control.stop_step && frame_id_eq (tp->control.step_frame_id, get_frame_id (get_current_frame ())) && tp->control.step_start_function == find_pc_function (stop_pc)) { /* Finished step, just print source line. */ source_flag = SRC_LINE; } else { /* Print location and source line. */ source_flag = SRC_AND_LOC; } break; case PRINT_SRC_AND_LOC: /* Print location and source line. */ source_flag = SRC_AND_LOC; break; case PRINT_SRC_ONLY: source_flag = SRC_LINE; break; case PRINT_NOTHING: /* Something bogus. */ source_flag = SRC_LINE; do_frame_printing = 0; break; default: internal_error (__FILE__, __LINE__, _("Unknown value.")); } /* The behavior of this routine with respect to the source flag is: SRC_LINE: Print only source line LOCATION: Print only location SRC_AND_LOC: Print location and source line. */ if (do_frame_printing) print_stack_frame (get_selected_frame (NULL), 0, source_flag, 1); } /* See infrun.h. */ void print_stop_event (struct ui_out *uiout) { struct target_waitstatus last; ptid_t last_ptid; struct thread_info *tp; get_last_target_status (&last_ptid, &last); { scoped_restore save_uiout = make_scoped_restore (&current_uiout, uiout); print_stop_location (&last); /* Display the auto-display expressions. */ do_displays (); } tp = inferior_thread (); if (tp->thread_fsm != NULL && thread_fsm_finished_p (tp->thread_fsm)) { struct return_value_info *rv; rv = thread_fsm_return_value (tp->thread_fsm); if (rv != NULL) print_return_value (uiout, rv); } } /* See infrun.h. */ void maybe_remove_breakpoints (void) { if (!breakpoints_should_be_inserted_now () && target_has_execution) { if (remove_breakpoints ()) { target_terminal_ours_for_output (); printf_filtered (_("Cannot remove breakpoints because " "program is no longer writable.\nFurther " "execution is probably impossible.\n")); } } } /* The execution context that just caused a normal stop. */ struct stop_context { /* The stop ID. */ ULONGEST stop_id; /* The event PTID. */ ptid_t ptid; /* If stopp for a thread event, this is the thread that caused the stop. */ struct thread_info *thread; /* The inferior that caused the stop. */ int inf_num; }; /* Returns a new stop context. If stopped for a thread event, this takes a strong reference to the thread. */ static struct stop_context * save_stop_context (void) { struct stop_context *sc = XNEW (struct stop_context); sc->stop_id = get_stop_id (); sc->ptid = inferior_ptid; sc->inf_num = current_inferior ()->num; if (!ptid_equal (inferior_ptid, null_ptid)) { /* Take a strong reference so that the thread can't be deleted yet. */ sc->thread = inferior_thread (); sc->thread->refcount++; } else sc->thread = NULL; return sc; } /* Release a stop context previously created with save_stop_context. Releases the strong reference to the thread as well. */ static void release_stop_context_cleanup (void *arg) { struct stop_context *sc = (struct stop_context *) arg; if (sc->thread != NULL) sc->thread->refcount--; xfree (sc); } /* Return true if the current context no longer matches the saved stop context. */ static int stop_context_changed (struct stop_context *prev) { if (!ptid_equal (prev->ptid, inferior_ptid)) return 1; if (prev->inf_num != current_inferior ()->num) return 1; if (prev->thread != NULL && prev->thread->state != THREAD_STOPPED) return 1; if (get_stop_id () != prev->stop_id) return 1; return 0; } /* See infrun.h. */ int normal_stop (void) { struct target_waitstatus last; ptid_t last_ptid; struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); ptid_t pid_ptid; get_last_target_status (&last_ptid, &last); new_stop_id (); /* If an exception is thrown from this point on, make sure to propagate GDB's knowledge of the executing state to the frontend/user running state. A QUIT is an easy exception to see here, so do this before any filtered output. */ if (!non_stop) make_cleanup (finish_thread_state_cleanup, &minus_one_ptid); else if (last.kind == TARGET_WAITKIND_SIGNALLED || last.kind == TARGET_WAITKIND_EXITED) { /* On some targets, we may still have live threads in the inferior when we get a process exit event. E.g., for "checkpoint", when the current checkpoint/fork exits, linux-fork.c automatically switches to another fork from within target_mourn_inferior. */ if (!ptid_equal (inferior_ptid, null_ptid)) { pid_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid)); make_cleanup (finish_thread_state_cleanup, &pid_ptid); } } else if (last.kind != TARGET_WAITKIND_NO_RESUMED) make_cleanup (finish_thread_state_cleanup, &inferior_ptid); /* As we're presenting a stop, and potentially removing breakpoints, update the thread list so we can tell whether there are threads running on the target. With target remote, for example, we can only learn about new threads when we explicitly update the thread list. Do this before notifying the interpreters about signal stops, end of stepping ranges, etc., so that the "new thread" output is emitted before e.g., "Program received signal FOO", instead of after. */ update_thread_list (); if (last.kind == TARGET_WAITKIND_STOPPED && stopped_by_random_signal) observer_notify_signal_received (inferior_thread ()->suspend.stop_signal); /* As with the notification of thread events, we want to delay notifying the user that we've switched thread context until the inferior actually stops. There's no point in saying anything if the inferior has exited. Note that SIGNALLED here means "exited with a signal", not "received a signal". Also skip saying anything in non-stop mode. In that mode, as we don't want GDB to switch threads behind the user's back, to avoid races where the user is typing a command to apply to thread x, but GDB switches to thread y before the user finishes entering the command, fetch_inferior_event installs a cleanup to restore the current thread back to the thread the user had selected right after this event is handled, so we're not really switching, only informing of a stop. */ if (!non_stop && !ptid_equal (previous_inferior_ptid, inferior_ptid) && target_has_execution && last.kind != TARGET_WAITKIND_SIGNALLED && last.kind != TARGET_WAITKIND_EXITED && last.kind != TARGET_WAITKIND_NO_RESUMED) { SWITCH_THRU_ALL_UIS () { target_terminal_ours_for_output (); printf_filtered (_("[Switching to %s]\n"), target_pid_to_str (inferior_ptid)); annotate_thread_changed (); } previous_inferior_ptid = inferior_ptid; } if (last.kind == TARGET_WAITKIND_NO_RESUMED) { SWITCH_THRU_ALL_UIS () if (current_ui->prompt_state == PROMPT_BLOCKED) { target_terminal_ours_for_output (); printf_filtered (_("No unwaited-for children left.\n")); } } /* Note: this depends on the update_thread_list call above. */ maybe_remove_breakpoints (); /* If an auto-display called a function and that got a signal, delete that auto-display to avoid an infinite recursion. */ if (stopped_by_random_signal) disable_current_display (); SWITCH_THRU_ALL_UIS () { async_enable_stdin (); } /* Let the user/frontend see the threads as stopped. */ do_cleanups (old_chain); /* Select innermost stack frame - i.e., current frame is frame 0, and current location is based on that. Handle the case where the dummy call is returning after being stopped. E.g. the dummy call previously hit a breakpoint. (If the dummy call returns normally, we won't reach here.) Do this before the stop hook is run, so that it doesn't get to see the temporary dummy frame, which is not where we'll present the stop. */ if (has_stack_frames ()) { if (stop_stack_dummy == STOP_STACK_DUMMY) { /* Pop the empty frame that contains the stack dummy. This also restores inferior state prior to the call (struct infcall_suspend_state). */ struct frame_info *frame = get_current_frame (); gdb_assert (get_frame_type (frame) == DUMMY_FRAME); frame_pop (frame); /* frame_pop calls reinit_frame_cache as the last thing it does which means there's now no selected frame. */ } select_frame (get_current_frame ()); /* Set the current source location. */ set_current_sal_from_frame (get_current_frame ()); } /* Look up the hook_stop and run it (CLI internally handles problem of stop_command's pre-hook not existing). */ if (stop_command != NULL) { struct stop_context *saved_context = save_stop_context (); struct cleanup *old_chain = make_cleanup (release_stop_context_cleanup, saved_context); catch_errors (hook_stop_stub, stop_command, "Error while running hook_stop:\n", RETURN_MASK_ALL); /* If the stop hook resumes the target, then there's no point in trying to notify about the previous stop; its context is gone. Likewise if the command switches thread or inferior -- the observers would print a stop for the wrong thread/inferior. */ if (stop_context_changed (saved_context)) { do_cleanups (old_chain); return 1; } do_cleanups (old_chain); } /* Notify observers about the stop. This is where the interpreters print the stop event. */ if (!ptid_equal (inferior_ptid, null_ptid)) observer_notify_normal_stop (inferior_thread ()->control.stop_bpstat, stop_print_frame); else observer_notify_normal_stop (NULL, stop_print_frame); annotate_stopped (); if (target_has_execution) { if (last.kind != TARGET_WAITKIND_SIGNALLED && last.kind != TARGET_WAITKIND_EXITED) /* Delete the breakpoint we stopped at, if it wants to be deleted. Delete any breakpoint that is to be deleted at the next stop. */ breakpoint_auto_delete (inferior_thread ()->control.stop_bpstat); } /* Try to get rid of automatically added inferiors that are no longer needed. Keeping those around slows down things linearly. Note that this never removes the current inferior. */ prune_inferiors (); return 0; } static int hook_stop_stub (void *cmd) { execute_cmd_pre_hook ((struct cmd_list_element *) cmd); return (0); } int signal_stop_state (int signo) { return signal_stop[signo]; } int signal_print_state (int signo) { return signal_print[signo]; } int signal_pass_state (int signo) { return signal_program[signo]; } static void signal_cache_update (int signo) { if (signo == -1) { for (signo = 0; signo < (int) GDB_SIGNAL_LAST; signo++) signal_cache_update (signo); return; } signal_pass[signo] = (signal_stop[signo] == 0 && signal_print[signo] == 0 && signal_program[signo] == 1 && signal_catch[signo] == 0); } int signal_stop_update (int signo, int state) { int ret = signal_stop[signo]; signal_stop[signo] = state; signal_cache_update (signo); return ret; } int signal_print_update (int signo, int state) { int ret = signal_print[signo]; signal_print[signo] = state; signal_cache_update (signo); return ret; } int signal_pass_update (int signo, int state) { int ret = signal_program[signo]; signal_program[signo] = state; signal_cache_update (signo); return ret; } /* Update the global 'signal_catch' from INFO and notify the target. */ void signal_catch_update (const unsigned int *info) { int i; for (i = 0; i < GDB_SIGNAL_LAST; ++i) signal_catch[i] = info[i] > 0; signal_cache_update (-1); target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass); } static void sig_print_header (void) { printf_filtered (_("Signal Stop\tPrint\tPass " "to program\tDescription\n")); } static void sig_print_info (enum gdb_signal oursig) { const char *name = gdb_signal_to_name (oursig); int name_padding = 13 - strlen (name); if (name_padding <= 0) name_padding = 0; printf_filtered ("%s", name); printf_filtered ("%*.*s ", name_padding, name_padding, " "); printf_filtered ("%s\t", signal_stop[oursig] ? "Yes" : "No"); printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No"); printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No"); printf_filtered ("%s\n", gdb_signal_to_string (oursig)); } /* Specify how various signals in the inferior should be handled. */ static void handle_command (char *args, int from_tty) { char **argv; int digits, wordlen; int sigfirst, signum, siglast; enum gdb_signal oursig; int allsigs; int nsigs; unsigned char *sigs; struct cleanup *old_chain; if (args == NULL) { error_no_arg (_("signal to handle")); } /* Allocate and zero an array of flags for which signals to handle. */ nsigs = (int) GDB_SIGNAL_LAST; sigs = (unsigned char *) alloca (nsigs); memset (sigs, 0, nsigs); /* Break the command line up into args. */ argv = gdb_buildargv (args); old_chain = make_cleanup_freeargv (argv); /* Walk through the args, looking for signal oursigs, signal names, and actions. Signal numbers and signal names may be interspersed with actions, with the actions being performed for all signals cumulatively specified. Signal ranges can be specified as <LOW>-<HIGH>. */ while (*argv != NULL) { wordlen = strlen (*argv); for (digits = 0; isdigit ((*argv)[digits]); digits++) {; } allsigs = 0; sigfirst = siglast = -1; if (wordlen >= 1 && !strncmp (*argv, "all", wordlen)) { /* Apply action to all signals except those used by the debugger. Silently skip those. */ allsigs = 1; sigfirst = 0; siglast = nsigs - 1; } else if (wordlen >= 1 && !strncmp (*argv, "stop", wordlen)) { SET_SIGS (nsigs, sigs, signal_stop); SET_SIGS (nsigs, sigs, signal_print); } else if (wordlen >= 1 && !strncmp (*argv, "ignore", wordlen)) { UNSET_SIGS (nsigs, sigs, signal_program); } else if (wordlen >= 2 && !strncmp (*argv, "print", wordlen)) { SET_SIGS (nsigs, sigs, signal_print); } else if (wordlen >= 2 && !strncmp (*argv, "pass", wordlen)) { SET_SIGS (nsigs, sigs, signal_program); } else if (wordlen >= 3 && !strncmp (*argv, "nostop", wordlen)) { UNSET_SIGS (nsigs, sigs, signal_stop); } else if (wordlen >= 3 && !strncmp (*argv, "noignore", wordlen)) { SET_SIGS (nsigs, sigs, signal_program); } else if (wordlen >= 4 && !strncmp (*argv, "noprint", wordlen)) { UNSET_SIGS (nsigs, sigs, signal_print); UNSET_SIGS (nsigs, sigs, signal_stop); } else if (wordlen >= 4 && !strncmp (*argv, "nopass", wordlen)) { UNSET_SIGS (nsigs, sigs, signal_program); } else if (digits > 0) { /* It is numeric. The numeric signal refers to our own internal signal numbering from target.h, not to host/target signal number. This is a feature; users really should be using symbolic names anyway, and the common ones like SIGHUP, SIGINT, SIGALRM, etc. will work right anyway. */ sigfirst = siglast = (int) gdb_signal_from_command (atoi (*argv)); if ((*argv)[digits] == '-') { siglast = (int) gdb_signal_from_command (atoi ((*argv) + digits + 1)); } if (sigfirst > siglast) { /* Bet he didn't figure we'd think of this case... */ signum = sigfirst; sigfirst = siglast; siglast = signum; } } else { oursig = gdb_signal_from_name (*argv); if (oursig != GDB_SIGNAL_UNKNOWN) { sigfirst = siglast = (int) oursig; } else { /* Not a number and not a recognized flag word => complain. */ error (_("Unrecognized or ambiguous flag word: \"%s\"."), *argv); } } /* If any signal numbers or symbol names were found, set flags for which signals to apply actions to. */ for (signum = sigfirst; signum >= 0 && signum <= siglast; signum++) { switch ((enum gdb_signal) signum) { case GDB_SIGNAL_TRAP: case GDB_SIGNAL_INT: if (!allsigs && !sigs[signum]) { if (query (_("%s is used by the debugger.\n\ Are you sure you want to change it? "), gdb_signal_to_name ((enum gdb_signal) signum))) { sigs[signum] = 1; } else { printf_unfiltered (_("Not confirmed, unchanged.\n")); gdb_flush (gdb_stdout); } } break; case GDB_SIGNAL_0: case GDB_SIGNAL_DEFAULT: case GDB_SIGNAL_UNKNOWN: /* Make sure that "all" doesn't print these. */ break; default: sigs[signum] = 1; break; } } argv++; } for (signum = 0; signum < nsigs; signum++) if (sigs[signum]) { signal_cache_update (-1); target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass); target_program_signals ((int) GDB_SIGNAL_LAST, signal_program); if (from_tty) { /* Show the results. */ sig_print_header (); for (; signum < nsigs; signum++) if (sigs[signum]) sig_print_info ((enum gdb_signal) signum); } break; } do_cleanups (old_chain); } /* Complete the "handle" command. */ static VEC (char_ptr) * handle_completer (struct cmd_list_element *ignore, const char *text, const char *word) { VEC (char_ptr) *vec_signals, *vec_keywords, *return_val; static const char * const keywords[] = { "all", "stop", "ignore", "print", "pass", "nostop", "noignore", "noprint", "nopass", NULL, }; vec_signals = signal_completer (ignore, text, word); vec_keywords = complete_on_enum (keywords, word, word); return_val = VEC_merge (char_ptr, vec_signals, vec_keywords); VEC_free (char_ptr, vec_signals); VEC_free (char_ptr, vec_keywords); return return_val; } enum gdb_signal gdb_signal_from_command (int num) { if (num >= 1 && num <= 15) return (enum gdb_signal) num; error (_("Only signals 1-15 are valid as numeric signals.\n\ Use \"info signals\" for a list of symbolic signals.")); } /* Print current contents of the tables set by the handle command. It is possible we should just be printing signals actually used by the current target (but for things to work right when switching targets, all signals should be in the signal tables). */ static void signals_info (char *signum_exp, int from_tty) { enum gdb_signal oursig; sig_print_header (); if (signum_exp) { /* First see if this is a symbol name. */ oursig = gdb_signal_from_name (signum_exp); if (oursig == GDB_SIGNAL_UNKNOWN) { /* No, try numeric. */ oursig = gdb_signal_from_command (parse_and_eval_long (signum_exp)); } sig_print_info (oursig); return; } printf_filtered ("\n"); /* These ugly casts brought to you by the native VAX compiler. */ for (oursig = GDB_SIGNAL_FIRST; (int) oursig < (int) GDB_SIGNAL_LAST; oursig = (enum gdb_signal) ((int) oursig + 1)) { QUIT; if (oursig != GDB_SIGNAL_UNKNOWN && oursig != GDB_SIGNAL_DEFAULT && oursig != GDB_SIGNAL_0) sig_print_info (oursig); } printf_filtered (_("\nUse the \"handle\" command " "to change these tables.\n")); } /* The $_siginfo convenience variable is a bit special. We don't know for sure the type of the value until we actually have a chance to fetch the data. The type can change depending on gdbarch, so it is also dependent on which thread you have selected. 1. making $_siginfo be an internalvar that creates a new value on access. 2. making the value of $_siginfo be an lval_computed value. */ /* This function implements the lval_computed support for reading a $_siginfo value. */ static void siginfo_value_read (struct value *v) { LONGEST transferred; /* If we can access registers, so can we access $_siginfo. Likewise vice versa. */ validate_registers_access (); transferred = target_read (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL, value_contents_all_raw (v), value_offset (v), TYPE_LENGTH (value_type (v))); if (transferred != TYPE_LENGTH (value_type (v))) error (_("Unable to read siginfo")); } /* This function implements the lval_computed support for writing a $_siginfo value. */ static void siginfo_value_write (struct value *v, struct value *fromval) { LONGEST transferred; /* If we can access registers, so can we access $_siginfo. Likewise vice versa. */ validate_registers_access (); transferred = target_write (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL, value_contents_all_raw (fromval), value_offset (v), TYPE_LENGTH (value_type (fromval))); if (transferred != TYPE_LENGTH (value_type (fromval))) error (_("Unable to write siginfo")); } static const struct lval_funcs siginfo_value_funcs = { siginfo_value_read, siginfo_value_write }; /* Return a new value with the correct type for the siginfo object of the current thread using architecture GDBARCH. Return a void value if there's no object available. */ static struct value * siginfo_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore) { if (target_has_stack && !ptid_equal (inferior_ptid, null_ptid) && gdbarch_get_siginfo_type_p (gdbarch)) { struct type *type = gdbarch_get_siginfo_type (gdbarch); return allocate_computed_value (type, &siginfo_value_funcs, NULL); } return allocate_value (builtin_type (gdbarch)->builtin_void); } /* infcall_suspend_state contains state about the program itself like its registers and any signal it received when it last stopped. This state must be restored regardless of how the inferior function call ends (either successfully, or after it hits a breakpoint or signal) if the program is to properly continue where it left off. */ struct infcall_suspend_state { struct thread_suspend_state thread_suspend; /* Other fields: */ CORE_ADDR stop_pc; struct regcache *registers; /* Format of SIGINFO_DATA or NULL if it is not present. */ struct gdbarch *siginfo_gdbarch; /* The inferior format depends on SIGINFO_GDBARCH and it has a length of TYPE_LENGTH (gdbarch_get_siginfo_type ()). For different gdbarch the content would be invalid. */ gdb_byte *siginfo_data; }; struct infcall_suspend_state * save_infcall_suspend_state (void) { struct infcall_suspend_state *inf_state; struct thread_info *tp = inferior_thread (); struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); gdb_byte *siginfo_data = NULL; if (gdbarch_get_siginfo_type_p (gdbarch)) { struct type *type = gdbarch_get_siginfo_type (gdbarch); size_t len = TYPE_LENGTH (type); struct cleanup *back_to; siginfo_data = (gdb_byte *) xmalloc (len); back_to = make_cleanup (xfree, siginfo_data); if (target_read (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL, siginfo_data, 0, len) == len) discard_cleanups (back_to); else { /* Errors ignored. */ do_cleanups (back_to); siginfo_data = NULL; } } inf_state = XCNEW (struct infcall_suspend_state); if (siginfo_data) { inf_state->siginfo_gdbarch = gdbarch; inf_state->siginfo_data = siginfo_data; } inf_state->thread_suspend = tp->suspend; /* run_inferior_call will not use the signal due to its `proceed' call with GDB_SIGNAL_0 anyway. */ tp->suspend.stop_signal = GDB_SIGNAL_0; inf_state->stop_pc = stop_pc; inf_state->registers = regcache_dup (regcache); return inf_state; } /* Restore inferior session state to INF_STATE. */ void restore_infcall_suspend_state (struct infcall_suspend_state *inf_state) { struct thread_info *tp = inferior_thread (); struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = get_regcache_arch (regcache); tp->suspend = inf_state->thread_suspend; stop_pc = inf_state->stop_pc; if (inf_state->siginfo_gdbarch == gdbarch) { struct type *type = gdbarch_get_siginfo_type (gdbarch); /* Errors ignored. */ target_write (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL, inf_state->siginfo_data, 0, TYPE_LENGTH (type)); } /* The inferior can be gone if the user types "print exit(0)" (and perhaps other times). */ if (target_has_execution) /* NB: The register write goes through to the target. */ regcache_cpy (regcache, inf_state->registers); discard_infcall_suspend_state (inf_state); } static void do_restore_infcall_suspend_state_cleanup (void *state) { restore_infcall_suspend_state ((struct infcall_suspend_state *) state); } struct cleanup * make_cleanup_restore_infcall_suspend_state (struct infcall_suspend_state *inf_state) { return make_cleanup (do_restore_infcall_suspend_state_cleanup, inf_state); } void discard_infcall_suspend_state (struct infcall_suspend_state *inf_state) { regcache_xfree (inf_state->registers); xfree (inf_state->siginfo_data); xfree (inf_state); } struct regcache * get_infcall_suspend_state_regcache (struct infcall_suspend_state *inf_state) { return inf_state->registers; } /* infcall_control_state contains state regarding gdb's control of the inferior itself like stepping control. It also contains session state like the user's currently selected frame. */ struct infcall_control_state { struct thread_control_state thread_control; struct inferior_control_state inferior_control; /* Other fields: */ enum stop_stack_kind stop_stack_dummy; int stopped_by_random_signal; /* ID if the selected frame when the inferior function call was made. */ struct frame_id selected_frame_id; }; /* Save all of the information associated with the inferior<==>gdb connection. */ struct infcall_control_state * save_infcall_control_state (void) { struct infcall_control_state *inf_status = XNEW (struct infcall_control_state); struct thread_info *tp = inferior_thread (); struct inferior *inf = current_inferior (); inf_status->thread_control = tp->control; inf_status->inferior_control = inf->control; tp->control.step_resume_breakpoint = NULL; tp->control.exception_resume_breakpoint = NULL; /* Save original bpstat chain to INF_STATUS; replace it in TP with copy of chain. If caller's caller is walking the chain, they'll be happier if we hand them back the original chain when restore_infcall_control_state is called. */ tp->control.stop_bpstat = bpstat_copy (tp->control.stop_bpstat); /* Other fields: */ inf_status->stop_stack_dummy = stop_stack_dummy; inf_status->stopped_by_random_signal = stopped_by_random_signal; inf_status->selected_frame_id = get_frame_id (get_selected_frame (NULL)); return inf_status; } static int restore_selected_frame (void *args) { struct frame_id *fid = (struct frame_id *) args; struct frame_info *frame; frame = frame_find_by_id (*fid); /* If inf_status->selected_frame_id is NULL, there was no previously selected frame. */ if (frame == NULL) { warning (_("Unable to restore previously selected frame.")); return 0; } select_frame (frame); return (1); } /* Restore inferior session state to INF_STATUS. */ void restore_infcall_control_state (struct infcall_control_state *inf_status) { struct thread_info *tp = inferior_thread (); struct inferior *inf = current_inferior (); if (tp->control.step_resume_breakpoint) tp->control.step_resume_breakpoint->disposition = disp_del_at_next_stop; if (tp->control.exception_resume_breakpoint) tp->control.exception_resume_breakpoint->disposition = disp_del_at_next_stop; /* Handle the bpstat_copy of the chain. */ bpstat_clear (&tp->control.stop_bpstat); tp->control = inf_status->thread_control; inf->control = inf_status->inferior_control; /* Other fields: */ stop_stack_dummy = inf_status->stop_stack_dummy; stopped_by_random_signal = inf_status->stopped_by_random_signal; if (target_has_stack) { /* The point of catch_errors is that if the stack is clobbered, walking the stack might encounter a garbage pointer and error() trying to dereference it. */ if (catch_errors (restore_selected_frame, &inf_status->selected_frame_id, "Unable to restore previously selected frame:\n", RETURN_MASK_ERROR) == 0) /* Error in restoring the selected frame. Select the innermost frame. */ select_frame (get_current_frame ()); } xfree (inf_status); } static void do_restore_infcall_control_state_cleanup (void *sts) { restore_infcall_control_state ((struct infcall_control_state *) sts); } struct cleanup * make_cleanup_restore_infcall_control_state (struct infcall_control_state *inf_status) { return make_cleanup (do_restore_infcall_control_state_cleanup, inf_status); } void discard_infcall_control_state (struct infcall_control_state *inf_status) { if (inf_status->thread_control.step_resume_breakpoint) inf_status->thread_control.step_resume_breakpoint->disposition = disp_del_at_next_stop; if (inf_status->thread_control.exception_resume_breakpoint) inf_status->thread_control.exception_resume_breakpoint->disposition = disp_del_at_next_stop; /* See save_infcall_control_state for info on stop_bpstat. */ bpstat_clear (&inf_status->thread_control.stop_bpstat); xfree (inf_status); } /* restore_inferior_ptid() will be used by the cleanup machinery to restore the inferior_ptid value saved in a call to save_inferior_ptid(). */ static void restore_inferior_ptid (void *arg) { ptid_t *saved_ptid_ptr = (ptid_t *) arg; inferior_ptid = *saved_ptid_ptr; xfree (arg); } /* Save the value of inferior_ptid so that it may be restored by a later call to do_cleanups(). Returns the struct cleanup pointer needed for later doing the cleanup. */ struct cleanup * save_inferior_ptid (void) { ptid_t *saved_ptid_ptr = XNEW (ptid_t); *saved_ptid_ptr = inferior_ptid; return make_cleanup (restore_inferior_ptid, saved_ptid_ptr); } /* See infrun.h. */ void clear_exit_convenience_vars (void) { clear_internalvar (lookup_internalvar ("_exitsignal")); clear_internalvar (lookup_internalvar ("_exitcode")); } /* User interface for reverse debugging: Set exec-direction / show exec-direction commands (returns error unless target implements to_set_exec_direction method). */ enum exec_direction_kind execution_direction = EXEC_FORWARD; static const char exec_forward[] = "forward"; static const char exec_reverse[] = "reverse"; static const char *exec_direction = exec_forward; static const char *const exec_direction_names[] = { exec_forward, exec_reverse, NULL }; static void set_exec_direction_func (char *args, int from_tty, struct cmd_list_element *cmd) { if (target_can_execute_reverse) { if (!strcmp (exec_direction, exec_forward)) execution_direction = EXEC_FORWARD; else if (!strcmp (exec_direction, exec_reverse)) execution_direction = EXEC_REVERSE; } else { exec_direction = exec_forward; error (_("Target does not support this operation.")); } } static void show_exec_direction_func (struct ui_file *out, int from_tty, struct cmd_list_element *cmd, const char *value) { switch (execution_direction) { case EXEC_FORWARD: fprintf_filtered (out, _("Forward.\n")); break; case EXEC_REVERSE: fprintf_filtered (out, _("Reverse.\n")); break; default: internal_error (__FILE__, __LINE__, _("bogus execution_direction value: %d"), (int) execution_direction); } } static void show_schedule_multiple (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { fprintf_filtered (file, _("Resuming the execution of threads " "of all processes is %s.\n"), value); } /* Implementation of `siginfo' variable. */ static const struct internalvar_funcs siginfo_funcs = { siginfo_make_value, NULL, NULL }; /* Callback for infrun's target events source. This is marked when a thread has a pending status to process. */ static void infrun_async_inferior_event_handler (gdb_client_data data) { inferior_event_handler (INF_REG_EVENT, NULL); } void _initialize_infrun (void) { int i; int numsigs; struct cmd_list_element *c; /* Register extra event sources in the event loop. */ infrun_async_inferior_event_token = create_async_event_handler (infrun_async_inferior_event_handler, NULL); add_info ("signals", signals_info, _("\ What debugger does when program gets various signals.\n\ Specify a signal as argument to print info on that signal only.")); add_info_alias ("handle", "signals", 0); c = add_com ("handle", class_run, handle_command, _("\ Specify how to handle signals.\n\ Usage: handle SIGNAL [ACTIONS]\n\ Args are signals and actions to apply to those signals.\n\ If no actions are specified, the current settings for the specified signals\n\ will be displayed instead.\n\ \n\ Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\ from 1-15 are allowed for compatibility with old versions of GDB.\n\ Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\ The special arg \"all\" is recognized to mean all signals except those\n\ used by the debugger, typically SIGTRAP and SIGINT.\n\ \n\ Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\ \"pass\", \"nopass\", \"ignore\", or \"noignore\".\n\ Stop means reenter debugger if this signal happens (implies print).\n\ Print means print a message if this signal happens.\n\ Pass means let program see this signal; otherwise program doesn't know.\n\ Ignore is a synonym for nopass and noignore is a synonym for pass.\n\ Pass and Stop may be combined.\n\ \n\ Multiple signals may be specified. Signal numbers and signal names\n\ may be interspersed with actions, with the actions being performed for\n\ all signals cumulatively specified.")); set_cmd_completer (c, handle_completer); if (!dbx_commands) stop_command = add_cmd ("stop", class_obscure, not_just_help_class_command, _("\ There is no `stop' command, but you can set a hook on `stop'.\n\ This allows you to set a list of commands to be run each time execution\n\ of the program stops."), &cmdlist); add_setshow_zuinteger_cmd ("infrun", class_maintenance, &debug_infrun, _("\ Set inferior debugging."), _("\ Show inferior debugging."), _("\ When non-zero, inferior specific debugging is enabled."), NULL, show_debug_infrun, &setdebuglist, &showdebuglist); add_setshow_boolean_cmd ("displaced", class_maintenance, &debug_displaced, _("\ Set displaced stepping debugging."), _("\ Show displaced stepping debugging."), _("\ When non-zero, displaced stepping specific debugging is enabled."), NULL, show_debug_displaced, &setdebuglist, &showdebuglist); add_setshow_boolean_cmd ("non-stop", no_class, &non_stop_1, _("\ Set whether gdb controls the inferior in non-stop mode."), _("\ Show whether gdb controls the inferior in non-stop mode."), _("\ When debugging a multi-threaded program and this setting is\n\ off (the default, also called all-stop mode), when one thread stops\n\ (for a breakpoint, watchpoint, exception, or similar events), GDB stops\n\ all other threads in the program while you interact with the thread of\n\ interest. When you continue or step a thread, you can allow the other\n\ threads to run, or have them remain stopped, but while you inspect any\n\ thread's state, all threads stop.\n\ \n\ In non-stop mode, when one thread stops, other threads can continue\n\ to run freely. You'll be able to step each thread independently,\n\ leave it stopped or free to run as needed."), set_non_stop, show_non_stop, &setlist, &showlist); numsigs = (int) GDB_SIGNAL_LAST; signal_stop = XNEWVEC (unsigned char, numsigs); signal_print = XNEWVEC (unsigned char, numsigs); signal_program = XNEWVEC (unsigned char, numsigs); signal_catch = XNEWVEC (unsigned char, numsigs); signal_pass = XNEWVEC (unsigned char, numsigs); for (i = 0; i < numsigs; i++) { signal_stop[i] = 1; signal_print[i] = 1; signal_program[i] = 1; signal_catch[i] = 0; } /* Signals caused by debugger's own actions should not be given to the program afterwards. Do not deliver GDB_SIGNAL_TRAP by default, except when the user explicitly specifies that it should be delivered to the target program. Typically, that would occur when a user is debugging a target monitor on a simulator: the target monitor sets a breakpoint; the simulator encounters this breakpoint and halts the simulation handing control to GDB; GDB, noting that the stop address doesn't map to any known breakpoint, returns control back to the simulator; the simulator then delivers the hardware equivalent of a GDB_SIGNAL_TRAP to the program being debugged. */ signal_program[GDB_SIGNAL_TRAP] = 0; signal_program[GDB_SIGNAL_INT] = 0; /* Signals that are not errors should not normally enter the debugger. */ signal_stop[GDB_SIGNAL_ALRM] = 0; signal_print[GDB_SIGNAL_ALRM] = 0; signal_stop[GDB_SIGNAL_VTALRM] = 0; signal_print[GDB_SIGNAL_VTALRM] = 0; signal_stop[GDB_SIGNAL_PROF] = 0; signal_print[GDB_SIGNAL_PROF] = 0; signal_stop[GDB_SIGNAL_CHLD] = 0; signal_print[GDB_SIGNAL_CHLD] = 0; signal_stop[GDB_SIGNAL_IO] = 0; signal_print[GDB_SIGNAL_IO] = 0; signal_stop[GDB_SIGNAL_POLL] = 0; signal_print[GDB_SIGNAL_POLL] = 0; signal_stop[GDB_SIGNAL_URG] = 0; signal_print[GDB_SIGNAL_URG] = 0; signal_stop[GDB_SIGNAL_WINCH] = 0; signal_print[GDB_SIGNAL_WINCH] = 0; signal_stop[GDB_SIGNAL_PRIO] = 0; signal_print[GDB_SIGNAL_PRIO] = 0; /* These signals are used internally by user-level thread implementations. (See signal(5) on Solaris.) Like the above signals, a healthy program receives and handles them as part of its normal operation. */ signal_stop[GDB_SIGNAL_LWP] = 0; signal_print[GDB_SIGNAL_LWP] = 0; signal_stop[GDB_SIGNAL_WAITING] = 0; signal_print[GDB_SIGNAL_WAITING] = 0; signal_stop[GDB_SIGNAL_CANCEL] = 0; signal_print[GDB_SIGNAL_CANCEL] = 0; signal_stop[GDB_SIGNAL_LIBRT] = 0; signal_print[GDB_SIGNAL_LIBRT] = 0; /* Update cached state. */ signal_cache_update (-1); add_setshow_zinteger_cmd ("stop-on-solib-events", class_support, &stop_on_solib_events, _("\ Set stopping for shared library events."), _("\ Show stopping for shared library events."), _("\ If nonzero, gdb will give control to the user when the dynamic linker\n\ notifies gdb of shared library events. The most common event of interest\n\ to the user would be loading/unloading of a new library."), set_stop_on_solib_events, show_stop_on_solib_events, &setlist, &showlist); add_setshow_enum_cmd ("follow-fork-mode", class_run, follow_fork_mode_kind_names, &follow_fork_mode_string, _("\ Set debugger response to a program call of fork or vfork."), _("\ Show debugger response to a program call of fork or vfork."), _("\ A fork or vfork creates a new process. follow-fork-mode can be:\n\ parent - the original process is debugged after a fork\n\ child - the new process is debugged after a fork\n\ The unfollowed process will continue to run.\n\ By default, the debugger will follow the parent process."), NULL, show_follow_fork_mode_string, &setlist, &showlist); add_setshow_enum_cmd ("follow-exec-mode", class_run, follow_exec_mode_names, &follow_exec_mode_string, _("\ Set debugger response to a program call of exec."), _("\ Show debugger response to a program call of exec."), _("\ An exec call replaces the program image of a process.\n\ \n\ follow-exec-mode can be:\n\ \n\ new - the debugger creates a new inferior and rebinds the process\n\ to this new inferior. The program the process was running before\n\ the exec call can be restarted afterwards by restarting the original\n\ inferior.\n\ \n\ same - the debugger keeps the process bound to the same inferior.\n\ The new executable image replaces the previous executable loaded in\n\ the inferior. Restarting the inferior after the exec call restarts\n\ the executable the process was running after the exec call.\n\ \n\ By default, the debugger will use the same inferior."), NULL, show_follow_exec_mode_string, &setlist, &showlist); add_setshow_enum_cmd ("scheduler-locking", class_run, scheduler_enums, &scheduler_mode, _("\ Set mode for locking scheduler during execution."), _("\ Show mode for locking scheduler during execution."), _("\ off == no locking (threads may preempt at any time)\n\ on == full locking (no thread except the current thread may run)\n\ This applies to both normal execution and replay mode.\n\ step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\ In this mode, other threads may run during other commands.\n\ This applies to both normal execution and replay mode.\n\ replay == scheduler locked in replay mode and unlocked during normal execution."), set_schedlock_func, /* traps on target vector */ show_scheduler_mode, &setlist, &showlist); add_setshow_boolean_cmd ("schedule-multiple", class_run, &sched_multi, _("\ Set mode for resuming threads of all processes."), _("\ Show mode for resuming threads of all processes."), _("\ When on, execution commands (such as 'continue' or 'next') resume all\n\ threads of all processes. When off (which is the default), execution\n\ commands only resume the threads of the current process. The set of\n\ threads that are resumed is further refined by the scheduler-locking\n\ mode (see help set scheduler-locking)."), NULL, show_schedule_multiple, &setlist, &showlist); add_setshow_boolean_cmd ("step-mode", class_run, &step_stop_if_no_debug, _("\ Set mode of the step operation."), _("\ Show mode of the step operation."), _("\ When set, doing a step over a function without debug line information\n\ will stop at the first instruction of that function. Otherwise, the\n\ function is skipped and the step command stops at a different source line."), NULL, show_step_stop_if_no_debug, &setlist, &showlist); add_setshow_auto_boolean_cmd ("displaced-stepping", class_run, &can_use_displaced_stepping, _("\ Set debugger's willingness to use displaced stepping."), _("\ Show debugger's willingness to use displaced stepping."), _("\ If on, gdb will use displaced stepping to step over breakpoints if it is\n\ supported by the target architecture. If off, gdb will not use displaced\n\ stepping to step over breakpoints, even if such is supported by the target\n\ architecture. If auto (which is the default), gdb will use displaced stepping\n\ if the target architecture supports it and non-stop mode is active, but will not\n\ use it in all-stop mode (see help set non-stop)."), NULL, show_can_use_displaced_stepping, &setlist, &showlist); add_setshow_enum_cmd ("exec-direction", class_run, exec_direction_names, &exec_direction, _("Set direction of execution.\n\ Options are 'forward' or 'reverse'."), _("Show direction of execution (forward/reverse)."), _("Tells gdb whether to execute forward or backward."), set_exec_direction_func, show_exec_direction_func, &setlist, &showlist); /* Set/show detach-on-fork: user-settable mode. */ add_setshow_boolean_cmd ("detach-on-fork", class_run, &detach_fork, _("\ Set whether gdb will detach the child of a fork."), _("\ Show whether gdb will detach the child of a fork."), _("\ Tells gdb whether to detach the child of a fork."), NULL, NULL, &setlist, &showlist); /* Set/show disable address space randomization mode. */ add_setshow_boolean_cmd ("disable-randomization", class_support, &disable_randomization, _("\ Set disabling of debuggee's virtual address space randomization."), _("\ Show disabling of debuggee's virtual address space randomization."), _("\ When this mode is on (which is the default), randomization of the virtual\n\ address space is disabled. Standalone programs run with the randomization\n\ enabled by default on some platforms."), &set_disable_randomization, &show_disable_randomization, &setlist, &showlist); /* ptid initializations */ inferior_ptid = null_ptid; target_last_wait_ptid = minus_one_ptid; observer_attach_thread_ptid_changed (infrun_thread_ptid_changed); observer_attach_thread_stop_requested (infrun_thread_stop_requested); observer_attach_thread_exit (infrun_thread_thread_exit); observer_attach_inferior_exit (infrun_inferior_exit); /* Explicitly create without lookup, since that tries to create a value with a void typed value, and when we get here, gdbarch isn't initialized yet. At this point, we're quite sure there isn't another convenience variable of the same name. */ create_internalvar_type_lazy ("_siginfo", &siginfo_funcs, NULL); add_setshow_boolean_cmd ("observer", no_class, &observer_mode_1, _("\ Set whether gdb controls the inferior in observer mode."), _("\ Show whether gdb controls the inferior in observer mode."), _("\ In observer mode, GDB can get data from the inferior, but not\n\ affect its execution. Registers and memory may not be changed,\n\ breakpoints may not be set, and the program cannot be interrupted\n\ or signalled."), set_observer_mode, show_observer_mode, &setlist, &showlist); }
gpl-3.0
yonahbox/ardupilot
libraries/AP_HAL_SITL/SITL_State.h
6609
#pragma once #include <AP_HAL/AP_HAL.h> #if CONFIG_HAL_BOARD == HAL_BOARD_SITL #include "AP_HAL_SITL.h" #include "AP_HAL_SITL_Namespace.h" #include "HAL_SITL_Class.h" #include "RCInput.h" #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/udp.h> #include <arpa/inet.h> #include <AP_Baro/AP_Baro.h> #include <AP_InertialSensor/AP_InertialSensor.h> #include <AP_Compass/AP_Compass.h> #include <AP_Terrain/AP_Terrain.h> #include <SITL/SITL.h> #include <SITL/SIM_Gimbal.h> #include <SITL/SIM_ADSB.h> #include <SITL/SIM_Vicon.h> #include <AP_HAL/utility/Socket.h> class HAL_SITL; class HALSITL::SITL_State { friend class HALSITL::Scheduler; friend class HALSITL::Util; friend class HALSITL::GPIO; public: void init(int argc, char * const argv[]); enum vehicle_type { ArduCopter, APMrover2, ArduPlane, ArduSub }; int gps_pipe(void); int gps2_pipe(void); ssize_t gps_read(int fd, void *buf, size_t count); uint16_t pwm_output[SITL_NUM_CHANNELS]; uint16_t pwm_input[SITL_RC_INPUT_CHANNELS]; bool output_ready = false; bool new_rc_input; void loop_hook(void); uint16_t base_port(void) const { return _base_port; } // create a file desciptor attached to a virtual device; type of // device is given by name parameter int sim_fd(const char *name, const char *arg); bool use_rtscts(void) const { return _use_rtscts; } // simulated airspeed, sonar and battery monitor uint16_t sonar_pin_value; // pin 0 uint16_t airspeed_pin_value; // pin 1 uint16_t airspeed_2_pin_value; // pin 2 uint16_t voltage_pin_value; // pin 13 uint16_t current_pin_value; // pin 12 uint16_t voltage2_pin_value; // pin 15 uint16_t current2_pin_value; // pin 14 // paths for UART devices const char *_uart_path[7] { "tcp:0:wait", "GPS1", "tcp:2", "tcp:3", "GPS2", "tcp:5", "tcp:6", }; private: void _parse_command_line(int argc, char * const argv[]); void _set_param_default(const char *parm); void _usage(void); void _sitl_setup(const char *home_str); void _setup_fdm(void); void _setup_timer(void); void _setup_adc(void); void set_height_agl(void); void _update_rangefinder(float range_value); void _set_signal_handlers(void) const; struct gps_data { double latitude; double longitude; float altitude; double speedN; double speedE; double speedD; bool have_lock; }; #define MAX_GPS_DELAY 100 gps_data _gps_data[MAX_GPS_DELAY]; bool _gps_has_basestation_position; gps_data _gps_basestation_data; void _gps_write(const uint8_t *p, uint16_t size, uint8_t instance); void _gps_send_ubx(uint8_t msgid, uint8_t *buf, uint16_t size, uint8_t instance); void _update_gps_ubx(const struct gps_data *d, uint8_t instance); void _update_gps_mtk(const struct gps_data *d, uint8_t instance); void _update_gps_mtk16(const struct gps_data *d, uint8_t instance); void _update_gps_mtk19(const struct gps_data *d, uint8_t instance); uint16_t _gps_nmea_checksum(const char *s); void _gps_nmea_printf(uint8_t instance, const char *fmt, ...); void _update_gps_nmea(const struct gps_data *d, uint8_t instance); void _sbp_send_message(uint16_t msg_type, uint16_t sender_id, uint8_t len, uint8_t *payload, uint8_t instance); void _update_gps_sbp(const struct gps_data *d, uint8_t instance); void _update_gps_sbp2(const struct gps_data *d, uint8_t instance); void _update_gps_file(uint8_t instance); void _update_gps_nova(const struct gps_data *d, uint8_t instance); void _nova_send_message(uint8_t *header, uint8_t headerlength, uint8_t *payload, uint8_t payloadlen, uint8_t instance); uint32_t CRC32Value(uint32_t icrc); uint32_t CalculateBlockCRC32(uint32_t length, uint8_t *buffer, uint32_t crc); void _update_gps(double latitude, double longitude, float altitude, double speedN, double speedE, double speedD, bool have_lock); void _update_airspeed(float airspeed); void _update_gps_instance(SITL::SITL::GPSType gps_type, const struct gps_data *d, uint8_t instance); void _check_rc_input(void); void _fdm_input_local(void); void _output_to_flightgear(void); void _simulator_servos(SITL::Aircraft::sitl_input &input); void _simulator_output(bool synthetic_clock_mode); uint16_t _airspeed_sensor(float airspeed); uint16_t _ground_sonar(); void _fdm_input_step(void); void wait_clock(uint64_t wait_time_usec); // internal state enum vehicle_type _vehicle; uint16_t _framerate; uint8_t _instance; uint16_t _base_port; pid_t _parent_pid; uint32_t _update_count; AP_Baro *_barometer; AP_InertialSensor *_ins; Scheduler *_scheduler; Compass *_compass; #if AP_TERRAIN_AVAILABLE AP_Terrain *_terrain; #endif SocketAPM _sitl_rc_in{true}; SITL::SITL *_sitl; uint16_t _rcin_port; uint16_t _fg_view_port; uint16_t _irlock_port; float _current; bool _synthetic_clock_mode; bool _use_rtscts; bool _use_fg_view; const char *_fg_address; // delay buffer variables static const uint8_t mag_buffer_length = 250; static const uint8_t wind_buffer_length = 50; // magnetometer delay buffer variables struct readings_mag { uint32_t time; Vector3f data; }; uint8_t store_index_mag; uint32_t last_store_time_mag; VectorN<readings_mag,mag_buffer_length> buffer_mag; uint32_t time_delta_mag; uint32_t delayed_time_mag; // airspeed sensor delay buffer variables struct readings_wind { uint32_t time; float data; }; uint8_t store_index_wind; uint32_t last_store_time_wind; VectorN<readings_wind,wind_buffer_length> buffer_wind; VectorN<readings_wind,wind_buffer_length> buffer_wind_2; uint32_t time_delta_wind; uint32_t delayed_time_wind; uint32_t wind_start_delay_micros; // internal SITL model SITL::Aircraft *sitl_model; // simulated gimbal bool enable_gimbal; SITL::Gimbal *gimbal; // simulated ADSb SITL::ADSB *adsb; // simulated vicon system: SITL::Vicon *vicon; // output socket for flightgear viewing SocketAPM fg_socket{true}; const char *defaults_path = HAL_PARAM_DEFAULTS_PATH; const char *_home_str; }; #endif // CONFIG_HAL_BOARD == HAL_BOARD_SITL
gpl-3.0
prutseltje/ansible
.github/ISSUE_TEMPLATE/documentation_report.md
2040
--- name: 📝 Documentation Report about: Ask us about docs --- <!--- Verify first that your issue/request is not already reported on GitHub. THIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED. Also test if the latest release, and devel branch are affected too. ALWAYS add information AFTER (OUTSIDE) these html comments. Otherwise it may end up being automatically closed by our bot. --> ##### ISSUE TYPE - Documentation Report ##### COMPONENT NAME <!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature. Do not include extra details here, e.g. "vyos_command" not "the network module vyos_command" or the full path--> ##### ANSIBLE VERSION <!--- Paste, BELOW THIS COMMENT, verbatim output from "ansible --version" between quotes below --> ``` ``` ##### CONFIGURATION <!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of "ansible-config dump --only-changed" Otherwise, mention any settings you have changed/added/removed in ansible.cfg (or using the ANSIBLE_* environment variables).--> ##### OS / ENVIRONMENT <!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are managing, or say "N/A" for anything that is not platform-specific. Also mention the specific version of what you are trying to control, e.g. if this is a network bug the version of firmware on the network device.--> ##### SUMMARY <!--- Explain the problem briefly --> ##### STEPS TO REPRODUCE <!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case. For new features, show how the feature would be used. --> <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- You can also paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- What did you expect to happen when running the steps above? --> ##### ACTUAL RESULTS <!--- What actually happened? If possible run with extra verbosity (-vvvv) --> <!--- Paste verbatim command output between quotes below --> ``` ```
gpl-3.0
pandazheng/openiBoot
menu/menu.c
4311
/* * menu.c - OpeniBoot Menu * * Copyright 2010 iDroid Project * * This file is part of iDroid. An android distribution for Apple products. * For more information, please visit http://www.idroidproject.org/. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "openiboot.h" #include "util.h" #include "framebuffer.h" #include "buttons.h" #include "timer.h" /*#include "images/ConsolePNG.h" #include "images/iPhoneOSPNG.h" #include "images/AndroidOSPNG.h" #include "images/ConsoleSelectedPNG.h" #include "images/iPhoneOSSelectedPNG.h" #include "images/AndroidOSSelectedPNG.h" #include "images/HeaderPNG.h"*/ #include "images.h" #include "actions.h" #include "stb_image.h" #include "pmu.h" #include "hfs/fs.h" #include "scripting.h" #include "nvram.h" #include "tasks.h" int globalFtlHasBeenRestored; /**< int global variable to tell wether a ftl_restore has been done. */ static TaskDescriptor menu_task; /**< TaskDescriptor Menu task */ /** * menu_draw. * * Draws the openiboot menu to the framebuffer. * */ void menu_draw() { framebuffer_clear(); int y = 0; BootEntry *entry = setup_root()->list_ptr.next; for(;entry != setup_root(); entry = entry->list_ptr.next) { if(entry == setup_current()) framebuffer_setcolors(COLOR_BLACK, COLOR_WHITE); else framebuffer_setcolors(COLOR_WHITE, COLOR_BLACK); framebuffer_setloc(0, y); framebuffer_print_force(entry->title); y++; } if(setup_root() == setup_current()) framebuffer_setcolors(COLOR_BLACK, COLOR_WHITE); else framebuffer_setcolors(COLOR_WHITE, COLOR_BLACK); framebuffer_setloc(0, y); framebuffer_print_force("Console"); framebuffer_setloc(0, 47); framebuffer_setcolors(COLOR_WHITE, COLOR_BLACK); framebuffer_print_force(OPENIBOOT_VERSION_STR); } /** * menu_run. * * Checks for button presses and executes the appropriate task. * * @param _V nickp666 does not yet know why this is here. */ static void menu_run(uint32_t _V) { while(TRUE) { #ifdef BUTTONS_VOLDOWN if(buttons_is_pushed(BUTTONS_HOLD) || !buttons_is_pushed(BUTTONS_VOLDOWN)) #else if(buttons_is_pushed(BUTTONS_HOLD)) #endif { setup_entry(setup_current()->list_ptr.next); menu_draw(); udelay(200000); } #ifdef BUTTONS_VOLUP if(!buttons_is_pushed(BUTTONS_VOLUP)) { setup_entry(setup_current()->list_ptr.prev); menu_draw(); udelay(200000); } #endif if(buttons_is_pushed(BUTTONS_HOME)) { framebuffer_setdisplaytext(TRUE); framebuffer_clear(); // Special case for console if(setup_current() == setup_root()) OpenIBootConsole(); else if(setup_boot() < 0) continue; task_stop(); return; } task_yield(); } } /** * menu_main. * * Main openiboot menu initialisation routine, reads /boot/menu.lst if it exists. * */ void menu_main() { task_init(&menu_task, "menu", TASK_DEFAULT_STACK_SIZE); init_modules(); if(script_run_file("(0)/boot/menu.lst")) { bufferPrintf("menu.lst NOT FOUND - Switching to console...\n"); OpenIBootConsole(); return; } const char* sTempOS = nvram_getvar("opib-temp-os"); if(sTempOS && *sTempOS) { nvram_setvar("opib-temp-os",""); nvram_save(); setup_title(sTempOS); setup_boot(); } setup_entry(setup_default()); pmu_set_iboot_stage(0); framebuffer_setdisplaytext(FALSE); framebuffer_clear(); menu_draw(); task_start(&menu_task, &menu_run, NULL); } /** * menu_init_boot. * * Clears the framebuffer and loads the openiboot main menu. * */ static void menu_init_boot() { framebuffer_clear(); bufferPrintf("Loading openiBoot...\n"); OpenIBootMain = &menu_main; } MODULE_INIT_BOOT(menu_init_boot);
gpl-3.0
akimdi/laba2
axis2c_2/docs/api/html/axutil__thread__pool_8h-source.html
9505
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Axis2/C: axutil_thread_pool.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> <div class="nav"> <a class="el" href="dir_f60961de8e5edc3b2658ef023e959e45.html">deploy</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_6b4e91e54b7316b376882a6402adbf44.html">include</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_df3a7695d5a9e696f30b948b566829e7.html">axis2-1.6.0</a></div> <h1>axutil_thread_pool.h</h1><a href="axutil__thread__pool_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00002"></a>00002 <span class="comment">/*</span> <a name="l00003"></a>00003 <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span> <a name="l00004"></a>00004 <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span> <a name="l00005"></a>00005 <span class="comment"> * this work for additional information regarding copyright ownership.</span> <a name="l00006"></a>00006 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span> <a name="l00007"></a>00007 <span class="comment"> * (the "License"); you may not use this file except in compliance with</span> <a name="l00008"></a>00008 <span class="comment"> * the License. You may obtain a copy of the License at</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> <a name="l00011"></a>00011 <span class="comment"> *</span> <a name="l00012"></a>00012 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> <a name="l00013"></a>00013 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> <a name="l00014"></a>00014 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <a name="l00015"></a>00015 <span class="comment"> * See the License for the specific language governing permissions and</span> <a name="l00016"></a>00016 <span class="comment"> * limitations under the License.</span> <a name="l00017"></a>00017 <span class="comment"> */</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifndef AXUTIL_THREAD_POOL_H</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define AXUTIL_THREAD_POOL_H</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00027"></a>00027 <span class="preprocessor">#include &lt;axutil_utils_defines.h&gt;</span> <a name="l00028"></a>00028 <span class="preprocessor">#include &lt;<a class="code" href="axutil__allocator_8h.html" title="Axis2 memory allocator interface.">axutil_allocator.h</a>&gt;</span> <a name="l00029"></a>00029 <span class="preprocessor">#include &lt;<a class="code" href="axutil__thread_8h.html" title="axis2 thread api">axutil_thread.h</a>&gt;</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> <a name="l00033"></a>00033 { <a name="l00034"></a>00034 <span class="preprocessor">#endif</span> <a name="l00035"></a>00035 <span class="preprocessor"></span> <a name="l00042"></a>00042 <span class="keyword">typedef</span> <span class="keyword">struct </span>axutil_thread_pool axutil_thread_pool_t; <a name="l00043"></a>00043 <span class="keyword">struct </span><a class="code" href="structaxutil__env.html" title="Axis2 Environment struct.">axutil_env</a>; <a name="l00044"></a>00044 <a name="l00051"></a>00051 AXIS2_EXTERN <a class="code" href="group__axutil__thread.html#g7b2442c6150883ffac05fd2c4844b7cc">axutil_thread_t</a> *AXIS2_CALL <a name="l00052"></a>00052 <a class="code" href="group__axutil__thread__pool.html#ge09dd79634b658499b98114aa41661c1">axutil_thread_pool_get_thread</a>( <a name="l00053"></a>00053 axutil_thread_pool_t * pool, <a name="l00054"></a>00054 <a class="code" href="group__axutil__thread.html#g8b1ee6e8fa770ee290503c43c087f633">axutil_thread_start_t</a> func, <a name="l00055"></a>00055 <span class="keywordtype">void</span> *data); <a name="l00056"></a>00056 <a name="l00062"></a>00062 AXIS2_EXTERN axis2_status_t AXIS2_CALL <a name="l00063"></a>00063 <a class="code" href="group__axutil__thread__pool.html#g0ddd6d44254100fbbeb71db92112e7bd">axutil_thread_pool_join_thread</a>( <a name="l00064"></a>00064 axutil_thread_pool_t * pool, <a name="l00065"></a>00065 <a class="code" href="group__axutil__thread.html#g7b2442c6150883ffac05fd2c4844b7cc">axutil_thread_t</a> * thd); <a name="l00066"></a>00066 <a name="l00072"></a>00072 AXIS2_EXTERN axis2_status_t AXIS2_CALL <a name="l00073"></a>00073 <a class="code" href="group__axutil__thread__pool.html#g4918b9dbaed331af5602f5a9e6ebb6ef">axutil_thread_pool_exit_thread</a>( <a name="l00074"></a>00074 axutil_thread_pool_t * pool, <a name="l00075"></a>00075 <a class="code" href="group__axutil__thread.html#g7b2442c6150883ffac05fd2c4844b7cc">axutil_thread_t</a> * thd); <a name="l00076"></a>00076 <a name="l00082"></a>00082 AXIS2_EXTERN axis2_status_t AXIS2_CALL <a name="l00083"></a>00083 <a class="code" href="group__axutil__thread__pool.html#ga9a805c61ea2a61f0d92f2d298ea9fa1">axutil_thread_pool_thread_detach</a>( <a name="l00084"></a>00084 axutil_thread_pool_t * pool, <a name="l00085"></a>00085 <a class="code" href="group__axutil__thread.html#g7b2442c6150883ffac05fd2c4844b7cc">axutil_thread_t</a> * thd); <a name="l00086"></a>00086 <a name="l00091"></a>00091 AXIS2_EXTERN <span class="keywordtype">void</span> AXIS2_CALL <a name="l00092"></a>00092 <a class="code" href="group__axutil__thread__pool.html#gc0cc0e6ac3ceae901d69907955be7c8f">axutil_thread_pool_free</a>( <a name="l00093"></a>00093 axutil_thread_pool_t * pool); <a name="l00094"></a>00094 <a name="l00100"></a>00100 AXIS2_EXTERN axutil_thread_pool_t *AXIS2_CALL <a name="l00101"></a>00101 <a class="code" href="group__axutil__thread__pool.html#gfadbfea2d099917420634549da19444e">axutil_thread_pool_init</a>( <a name="l00102"></a>00102 <a class="code" href="structaxutil__allocator.html" title="Axis2 memory allocator.">axutil_allocator_t</a> * <a class="code" href="structaxutil__env.html#87272b6ccdf0c983d462705f78c466f0">allocator</a>); <a name="l00103"></a>00103 <a name="l00108"></a>00108 AXIS2_EXTERN <span class="keyword">struct </span><a class="code" href="structaxutil__env.html" title="Axis2 Environment struct.">axutil_env</a> *AXIS2_CALL <a name="l00109"></a>00109 <a class="code" href="group__axutil__thread__pool.html#gbc008925cad197747506eb338fd26b1f">axutil_init_thread_env</a>( <a name="l00110"></a>00110 <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structaxutil__env.html" title="Axis2 Environment struct.">axutil_env</a> *system_env); <a name="l00111"></a>00111 <a name="l00116"></a>00116 AXIS2_EXTERN <span class="keywordtype">void</span> AXIS2_CALL <a name="l00117"></a>00117 <a class="code" href="group__axutil__thread__pool.html#g86828fbfa2efa9e9f864fad6fccfee11">axutil_free_thread_env</a>( <a name="l00118"></a>00118 <span class="keyword">struct</span> <a class="code" href="structaxutil__env.html" title="Axis2 Environment struct.">axutil_env</a> *thread_env); <a name="l00119"></a>00119 <a name="l00122"></a>00122 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00123"></a>00123 <span class="preprocessor"></span>} <a name="l00124"></a>00124 <span class="preprocessor">#endif</span> <a name="l00125"></a>00125 <span class="preprocessor"></span> <a name="l00126"></a>00126 <span class="preprocessor">#endif </span><span class="comment">/* AXIS2_THREAD_POOL_H */</span> </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 11:54:19 2009 for Axis2/C by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> </body> </html>
gpl-3.0
sabel83/metashell
3rd/templight/clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
3859
// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX // RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS int __attribute__((target("sse4.2"))) foo_overload(int) { return 0; } int __attribute__((target("arch=sandybridge"))) foo_overload(int); int __attribute__((target("arch=ivybridge"))) foo_overload(int) {return 1;} int __attribute__((target("default"))) foo_overload(int) { return 2; } int __attribute__((target("sse4.2"))) foo_overload(void) { return 0; } int __attribute__((target("arch=sandybridge"))) foo_overload(void); int __attribute__((target("arch=ivybridge"))) foo_overload(void) {return 1;} int __attribute__((target("default"))) foo_overload(void) { return 2; } int bar2() { return foo_overload() + foo_overload(1); } // LINUX: @_Z12foo_overloadv.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @_Z12foo_overloadv.resolver // LINUX: @_Z12foo_overloadi.ifunc = weak_odr ifunc i32 (i32), i32 (i32)* ()* @_Z12foo_overloadi.resolver // LINUX: define{{.*}} i32 @_Z12foo_overloadi.sse4.2(i32 %0) // LINUX: ret i32 0 // LINUX: define{{.*}} i32 @_Z12foo_overloadi.arch_ivybridge(i32 %0) // LINUX: ret i32 1 // LINUX: define{{.*}} i32 @_Z12foo_overloadi(i32 %0) // LINUX: ret i32 2 // LINUX: define{{.*}} i32 @_Z12foo_overloadv.sse4.2() // LINUX: ret i32 0 // LINUX: define{{.*}} i32 @_Z12foo_overloadv.arch_ivybridge() // LINUX: ret i32 1 // LINUX: define{{.*}} i32 @_Z12foo_overloadv() // LINUX: ret i32 2 // WINDOWS: define dso_local i32 @"?foo_overload@@[email protected]"(i32 %0) // WINDOWS: ret i32 0 // WINDOWS: define dso_local i32 @"?foo_overload@@[email protected]_ivybridge"(i32 %0) // WINDOWS: ret i32 1 // WINDOWS: define dso_local i32 @"?foo_overload@@YAHH@Z"(i32 %0) // WINDOWS: ret i32 2 // WINDOWS: define dso_local i32 @"?foo_overload@@YAHXZ.sse4.2"() // WINDOWS: ret i32 0 // WINDOWS: define dso_local i32 @"?foo_overload@@YAHXZ.arch_ivybridge"() // WINDOWS: ret i32 1 // WINDOWS: define dso_local i32 @"?foo_overload@@YAHXZ"() // WINDOWS: ret i32 2 // LINUX: define{{.*}} i32 @_Z4bar2v() // LINUX: call i32 @_Z12foo_overloadv.ifunc() // LINUX: call i32 @_Z12foo_overloadi.ifunc(i32 1) // WINDOWS: define dso_local i32 @"?bar2@@YAHXZ"() // WINDOWS: call i32 @"?foo_overload@@YAHXZ.resolver"() // WINDOWS: call i32 @"?foo_overload@@[email protected]"(i32 1) // LINUX: define weak_odr i32 ()* @_Z12foo_overloadv.resolver() comdat // LINUX: ret i32 ()* @_Z12foo_overloadv.arch_sandybridge // LINUX: ret i32 ()* @_Z12foo_overloadv.arch_ivybridge // LINUX: ret i32 ()* @_Z12foo_overloadv.sse4.2 // LINUX: ret i32 ()* @_Z12foo_overloadv // WINDOWS: define weak_odr dso_local i32 @"?foo_overload@@YAHXZ.resolver"() comdat // WINDOWS: call i32 @"?foo_overload@@YAHXZ.arch_sandybridge" // WINDOWS: call i32 @"?foo_overload@@YAHXZ.arch_ivybridge" // WINDOWS: call i32 @"?foo_overload@@YAHXZ.sse4.2" // WINDOWS: call i32 @"?foo_overload@@YAHXZ" // LINUX: define weak_odr i32 (i32)* @_Z12foo_overloadi.resolver() comdat // LINUX: ret i32 (i32)* @_Z12foo_overloadi.arch_sandybridge // LINUX: ret i32 (i32)* @_Z12foo_overloadi.arch_ivybridge // LINUX: ret i32 (i32)* @_Z12foo_overloadi.sse4.2 // LINUX: ret i32 (i32)* @_Z12foo_overloadi // WINDOWS: define weak_odr dso_local i32 @"?foo_overload@@[email protected]"(i32 %0) comdat // WINDOWS: call i32 @"?foo_overload@@[email protected]_sandybridge" // WINDOWS: call i32 @"?foo_overload@@[email protected]_ivybridge" // WINDOWS: call i32 @"?foo_overload@@[email protected]" // WINDOWS: call i32 @"?foo_overload@@YAHH@Z" // LINUX: declare i32 @_Z12foo_overloadv.arch_sandybridge() // LINUX: declare i32 @_Z12foo_overloadi.arch_sandybridge(i32) // WINDOWS: declare dso_local i32 @"?foo_overload@@YAHXZ.arch_sandybridge"() // WINDOWS: declare dso_local i32 @"?foo_overload@@[email protected]_sandybridge"(i32)
gpl-3.0
apavlo/h-store
third_party/cpp/berkeleydb/docs/api_reference/CXX/envset_app_dispatch.html
12459
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>DbEnv::set_app_dispatch()</title> <link rel="stylesheet" href="apiReference.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" /> <link rel="up" href="env.html" title="Chapter 5.  The DbEnv Handle" /> <link rel="prev" href="envset_alloc.html" title="DbEnv::set_alloc()" /> <link rel="next" href="envset_backup_callbacks.html" title="DbEnv::set_backup_callbacks()" /> </head> <body> <div xmlns="" class="navheader"> <div class="libver"> <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">DbEnv::set_app_dispatch()</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="envset_alloc.html">Prev</a> </td> <th width="60%" align="center">Chapter 5.  The DbEnv Handle </th> <td width="20%" align="right"> <a accesskey="n" href="envset_backup_callbacks.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="envset_app_dispatch"></a>DbEnv::set_app_dispatch()</h2> </div> </div> </div> <pre class="programlisting">#include &lt;db_cxx.h&gt; int DbEnv::set_app_dispatch(int (*tx_recover)(DbEnv *dbenv, Dbt *log_rec, DbLsn *lsn, db_recops op));</pre> <p> Declare a function to be called during transaction abort and recovery to process application-specific log records. </p> <p> The <code class="methodname">DbEnv::set_app_dispatch()</code> method configures operations performed using the specified <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle, not all operations performed on the underlying database environment. </p> <p> The <code class="methodname">DbEnv::set_app_dispatch()</code> method may not be called after the <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method is called. If the database environment already exists when <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> is called, the information specified to <code class="methodname">DbEnv::set_app_dispatch()</code> must be consistent with the existing environment or corruption can occur. </p> <p> The <code class="methodname">DbEnv::set_app_dispatch()</code> method returns a non-zero error value on failure and 0 on success. </p> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp2843952"></a>Parameters</h3> </div> </div> </div> <div class="sect3" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h4 class="title"><a id="idp2848944"></a>tx_recover</h4> </div> </div> </div> <p> The <span class="bold"><strong>tx_recover</strong></span> parameter is the application's abort and recovery function. The function takes four parameters: </p> <div class="itemizedlist"> <ul type="disc"> <li> <p> <code class="literal">dbenv</code> </p> <p> The <span class="bold"><strong>dbenv</strong></span> parameter is the enclosing database environment handle. </p> </li> <li> <p> <code class="literal">log_rec</code> </p> <p> The <span class="bold"><strong>log_rec</strong></span> parameter is a log record. </p> </li> <li> <p> <code class="literal">lsn</code> </p> <p> The <span class="bold"><strong>lsn</strong></span> parameter is a log sequence number. </p> </li> <li> <p> <code class="literal">op</code> </p> <p> The <span class="bold"><strong>op</strong></span> parameter is one of the following values: </p> <div class="itemizedlist"> <ul type="circle"> <li> <p><a id="set_app_dispatch_DB_TXN_BACKWARD_ROLL"></a> <code class="literal">DB_TXN_BACKWARD_ROLL</code> </p> <p> The log is being read backward to determine which transactions have been committed and to abort those operations that were not; undo the operation described by the log record. </p> </li> <li> <p><a id="set_app_dispatch_DB_TXN_FORWARD_ROLL"></a> <code class="literal">DB_TXN_FORWARD_ROLL</code> </p> <p> The log is being played forward; redo the operation described by the log record. </p> </li> <li> <p><a id="set_app_dispatch_DB_TXN_ABORT"></a> <code class="literal">DB_TXN_ABORT</code> </p> <p> The log is being read backward during a transaction abort; undo the operation described by the log record. </p> </li> <li> <p><a id="set_app_dispatch_DB_TXN_APPLY"></a> <code class="literal">DB_TXN_APPLY</code> </p> <p> The log is being applied on a replica site; redo the operation described by the log record. </p> </li> <li> <p><a id="set_app_dispatch_DB_TXN_PRINT"></a> <code class="literal">DB_TXN_PRINT</code> </p> <p> The log is being printed for debugging purposes; print the contents of this log record in the desired format. </p> </li> </ul> </div> <p> The DB_TXN_FORWARD_ROLL and DB_TXN_APPLY operations frequently imply the same actions, redoing changes that appear in the log record, although if a recovery function is to be used on a replication client where reads may be taking place concurrently with the processing of incoming messages, DB_TXN_APPLY operations should also perform appropriate locking. The macro DB_REDO(op) checks that the operation is one of DB_TXN_FORWARD_ROLL or DB_TXN_APPLY, and should be used in the recovery code to refer to the conditions under which operations should be redone. Similarly, the macro DB_UNDO(op) checks if the operation is one of DB_TXN_BACKWARD_ROLL or DB_TXN_ABORT. </p> </li> </ul> </div> <p> The function must return 0 on success and either <span class="bold"><strong>errno</strong></span> or a value outside of the Berkeley DB error name space on failure. </p> </div> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp2864864"></a>Errors</h3> </div> </div> </div> <p> The <code class="methodname">DbEnv::set_app_dispatch()</code> <span> <span> method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors: </span> </span> </p> <div class="sect3" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h4 class="title"><a id="idp2872408"></a>EINVAL</h4> </div> </div> </div> <p> If the method was called after <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> was called; or if an invalid flag value or parameter was specified. </p> </div> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp2874816"></a>Class</h3> </div> </div> </div> <p> <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>, <a class="link" href="txn.html" title="Chapter 13.  The DbTxn Handle">DbTxn</a> </p> </div> <div class="sect2" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h3 class="title"><a id="idp2848024"></a>See Also</h3> </div> </div> </div> <p> <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="envset_alloc.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="env.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="envset_backup_callbacks.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">DbEnv::set_alloc() </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> DbEnv::set_backup_callbacks()</td> </tr> </table> </div> </body> </html>
gpl-3.0
Dunbaratu/KOS-1
src/kOS/Properties/Resources.Designer.cs
2772
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace kOS.Properties { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("kOS.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
gpl-3.0
blazedDeveloper/hyos
src/kernel/arch/i386/tty.c
1530
#include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <string.h> #include <kernel/tty.h> #include "vga.h" static const size_t VGA_WIDTH = 80; static const size_t VGA_HEIGHT = 25; static uint16_t* const VGA_MEMORY = (uint16_t*) 0xB8000; static size_t terminal_row; static size_t terminal_column; static uint8_t terminal_color; static uint16_t* terminal_buffer; void terminal_initialize(void) { terminal_row = 0; terminal_column = 0; terminal_color = vga_entry_color(VGA_COLOR_LIGHT_GREY, VGA_COLOR_BLACK); terminal_buffer = VGA_MEMORY; for (size_t y = 0; y < VGA_HEIGHT; y++) { for (size_t x = 0; x < VGA_WIDTH; x++) { const size_t index = y * VGA_WIDTH + x; terminal_buffer[index] = vga_entry(' ', terminal_color); } } } void terminal_setcolor(uint8_t color) { terminal_color = color; } void terminal_putentryat(unsigned char c, uint8_t color, size_t x, size_t y) { const size_t index = y * VGA_WIDTH + x; terminal_buffer[index] = vga_entry(c, color); } void terminal_putchar(char c) { if ( c == '\n' ) { ++terminal_row; terminal_column = 0; return; } unsigned char uc = c; terminal_putentryat(uc, terminal_color, terminal_column, terminal_row); if (++terminal_column == VGA_WIDTH) { terminal_column = 0; if (++terminal_row == VGA_HEIGHT) terminal_row = 0; } } void terminal_write(const char* data, size_t size) { for (size_t i = 0; i < size; i++) terminal_putchar(data[i]); } void terminal_writestring(const char* data) { terminal_write(data, strlen(data)); }
gpl-3.0
geowe/geowe-core
src/main/java/org/geowe/client/local/main/tool/project/OpenProjectTool.java
5059
/* * #%L * GeoWE Project * %% * Copyright (C) 2015 - 2016 GeoWE.org * %% * This file is part of GeoWE.org. * * GeoWE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GeoWE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GeoWE. If not, see <http://www.gnu.org/licenses/>. * #L% */ package org.geowe.client.local.main.tool.project; import javax.annotation.PostConstruct; import javax.enterprise.context.ApplicationScoped; import org.geowe.client.local.ImageProvider; import org.geowe.client.local.main.tool.ButtonTool; import org.geowe.client.local.messages.UIMessages; import org.geowe.client.local.ui.ProgressBarDialog; import org.jboss.errai.common.client.api.tasks.ClientTaskManager; import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.DOM; import com.google.inject.Inject; import com.sencha.gxt.core.client.Style.Side; import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton; import com.sencha.gxt.widget.core.client.box.AlertMessageBox; import com.sencha.gxt.widget.core.client.event.SelectEvent; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.event.SubmitCompleteEvent; import com.sencha.gxt.widget.core.client.event.SubmitCompleteEvent.SubmitCompleteHandler; /** * Responsable de cargar la configuración de un proyecto de geowe * * @author [email protected] * @since 11-02-2017 * @author [email protected] * fix issue 303 * */ @ApplicationScoped public class OpenProjectTool extends ButtonTool { private ProgressBarDialog autoMessageBox; @Inject private ClientTaskManager taskManager; @Inject private OpenProjectDialog openProjectDialog; @Inject private ProjectLoader projectLoader; @Inject private URLProjectLoader urlProjectLoader; public OpenProjectTool() { super(UIMessages.INSTANCE.openProject(), ImageProvider.INSTANCE .openProject24()); setToolTipConfig(createTooltipConfig(UIMessages.INSTANCE.openProject(), UIMessages.INSTANCE.openProjectToolTipText(), Side.LEFT)); } @Override protected void onRelease() { openProjectDialog.clear(); openProjectDialog.show(); } @PostConstruct private void initialize() { addDialogListener(); addCloseButtonHandler(); openProjectDialog.getUploadPanel().addSubmitCompleteHandler(new SubmitCompleteHandler() { public void onSubmitComplete(final SubmitCompleteEvent event) { final Element label = DOM.createLabel(); label.setInnerHTML(event.getResults()); final String jsonProject = label.getInnerText(); openProjectDialog.hide(); if (hasError(jsonProject)) { autoMessageBox.hide(); showAlert("Error: " + jsonProject); return; } projectLoader.load(jsonProject); autoMessageBox.hide(); } private boolean hasError(final String contentFile) { return contentFile.startsWith("413") || contentFile.startsWith("500") || contentFile.startsWith("204") || contentFile.startsWith("406"); } }); } private void showAlert(final String errorMsg) { AlertMessageBox messageBox = new AlertMessageBox( UIMessages.INSTANCE.warning(), errorMsg); messageBox.show(); } private void addDialogListener() { openProjectDialog.getButton(PredefinedButton.OK).addSelectHandler(new SelectHandler() { @Override public void onSelect(final SelectEvent event) { taskManager.execute(new Runnable() { @Override public void run() { if (openProjectDialog.getActiveTab().equals(UIMessages.INSTANCE.file())) { if(openProjectDialog.isFileFieldCorrectFilled()){ autoMessageBox = new ProgressBarDialog(false, UIMessages.INSTANCE.processing()); autoMessageBox.show(); openProjectDialog.getUploadPanel().submit(); }else{ showAlert(UIMessages.INSTANCE.lrasterdAlertMessageBoxLabel(UIMessages.INSTANCE.file())); } } if (openProjectDialog.getActiveTab().equals(UIMessages.INSTANCE.url())) { if(openProjectDialog.isurlFieldCorrectFilled()){ urlProjectLoader.open(urlProjectLoader, openProjectDialog.getUrl()); openProjectDialog.hide(); }else{ showAlert(UIMessages.INSTANCE.lrasterdAlertMessageBoxLabel(UIMessages.INSTANCE.url())); } } } }); } }); } protected void addCloseButtonHandler() { openProjectDialog.getButton(PredefinedButton.CANCEL).addSelectHandler( new SelectHandler() { @Override public void onSelect(SelectEvent event) { openProjectDialog.hide(); } }); } }
gpl-3.0
Codeinwp/zerif-lite
woocommerce.php
594
<?php /** * The template for displaying all WooCommerce pages. * * @package zerif-lite */ get_header(); ?> <div class="clear"></div> </header> <!-- / END HOME SECTION --> <?php zerif_after_header_trigger(); ?> <div id="content" class="site-content"> <div class="container"> <div class="content-left-wrap col-md-12"> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php woocommerce_content(); ?> </main><!-- #main --> </div><!-- #primary --> </div><!-- .content-left-wrap --> </div><!-- .container --> <?php get_footer(); ?>
gpl-3.0
grokys/OmniXAML
Source/OmniXaml.Wpf/WpfWindow.cs
400
namespace OmniXaml.Wpf { using System.Threading.Tasks; using System.Windows; using Services.Mvvm; public class WpfWindow : Window, IView { public new Task ShowDialog() { return new Task(() => this.ShowDialog()); } public void SetViewModel(object viewModel) { this.DataContext = viewModel; } } }
gpl-3.0
henrique-silva/afcipm
FreeRTOS/portable/oWatcom/16BitDOS/Flsh186/portmacro.h
4018
/* * FreeRTOS Kernel V10.0.1 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * http://www.FreeRTOS.org * http://aws.amazon.com/freertos * * 1 tab == 4 spaces! */ #ifndef PORTMACRO_H #define PORTMACRO_H #ifdef __cplusplus extern "C" { #endif /*----------------------------------------------------------- * Port specific definitions. * * The settings in this file configure FreeRTOS correctly for the * given hardware and compiler. * * These settings should not be altered. *----------------------------------------------------------- */ /* Type definitions. */ #define portCHAR char #define portFLOAT float #define portDOUBLE long #define portLONG long #define portSHORT int #define portSTACK_TYPE uint16_t #define portBASE_TYPE short typedef portSTACK_TYPE StackType_t; typedef short BaseType_t; typedef unsigned short UBaseType_t; #if( configUSE_16_BIT_TICKS == 1 ) typedef uint16_t TickType_t; #define portMAX_DELAY ( TickType_t ) 0xffff #else typedef uint32_t TickType_t; #define portMAX_DELAY ( TickType_t ) 0xffffffffUL #endif /*-----------------------------------------------------------*/ /* Critical section management. */ void portENTER_CRITICAL( void ); #pragma aux portENTER_CRITICAL = "pushf" \ "cli"; void portEXIT_CRITICAL( void ); #pragma aux portEXIT_CRITICAL = "popf"; void portDISABLE_INTERRUPTS( void ); #pragma aux portDISABLE_INTERRUPTS = "cli"; void portENABLE_INTERRUPTS( void ); #pragma aux portENABLE_INTERRUPTS = "sti"; /*-----------------------------------------------------------*/ /* Architecture specifics. */ #define portSTACK_GROWTH ( -1 ) #define portSWITCH_INT_NUMBER 0x80 #define portYIELD() __asm{ int portSWITCH_INT_NUMBER } #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) #define portBYTE_ALIGNMENT 2 #define portINITIAL_SW ( ( portSTACK_TYPE ) 0x0202 ) /* Start the tasks with interrupts enabled. */ #define portNOP() __asm{ nop } /*-----------------------------------------------------------*/ /* Compiler specifics. */ #define portINPUT_BYTE( xAddr ) inp( xAddr ) #define portOUTPUT_BYTE( xAddr, ucValue ) outp( xAddr, ucValue ) #define portINPUT_WORD( xAddr ) inpw( xAddr ) #define portOUTPUT_WORD( xAddr, usValue ) outpw( xAddr, usValue ) /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) #ifdef __cplusplus } #endif #endif /* PORTMACRO_H */
gpl-3.0
andrei14vl/cubrid
src/cci/cci_log.cpp
18272
/* * Copyright (C) 2008 Search Solution Corporation. All rights reserved by Search Solution. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of the <ORGANIZATION> nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * */ /* * cci_log.cpp - */ #include <errno.h> #include <stdarg.h> #if defined(WINDOWS) #include <winsock2.h> #include <windows.h> #include <time.h> #include <direct.h> #include <io.h> #else #include <sys/time.h> #include <sys/stat.h> #if !defined(AIX) #include <sys/syscall.h> #endif #include <unistd.h> #endif #include <iostream> #include <fstream> #include <string> #include <map> #include <list> #include <sstream> #include "cci_common.h" #include "cci_mutex.h" #include "cci_log.h" static const int ONE_DAY = 86400; static const int LOG_BUFFER_SIZE = 1024 * 20; static const int LOG_ER_OPEN = -1; static const long int LOG_FLUSH_SIZE = 1024 * 1024; /* byte */ static const long int LOG_FLUSH_USEC = 1 * 1000000; /* usec */ static const long int LOG_CHECK_FILE_INTERVAL_USEC = 10 * 1000000; /* usec */ static const char *cci_log_level_string[] = { "OFF", "ERROR", "WARN", "INFO", "DEBUG" }; struct _LoggerContext; class _Logger; class _LogAppender { public: _LogAppender(const _LoggerContext &context); virtual ~_LogAppender() {} virtual void open() = 0; virtual void close() = 0; virtual void write(const char *msg) = 0; virtual void flush() = 0; protected: const _LoggerContext &context; }; class _LogAppenderBase : public _LogAppender { public: _LogAppenderBase(const _LoggerContext &context); virtual ~_LogAppenderBase(); virtual void open(); virtual void close(); virtual void write(const char *msg); virtual void flush(); protected: virtual void roll() = 0; virtual bool isRolling() = 0; std::string rename(const char *newPath, const char *postfix); int getLogSizeKBytes(); std::string getCurrDate(); std::string getCurrDateTime(); void makeLogDir(); private: void checkFileIsOpen(); protected: std::ofstream out; long int nextCheckTime; }; class _PostFixAppender : public _LogAppenderBase { public: _PostFixAppender(const _LoggerContext &context, CCI_LOG_POSTFIX postfix); virtual ~_PostFixAppender() {} virtual void open(); protected: virtual void roll(); virtual bool isRolling(); private: void checkFileIsOpen(); std::string getNewPath(); private: CCI_LOG_POSTFIX postfix; int prevDate; }; class _MaxSizeLogAppender : public _LogAppenderBase { public: _MaxSizeLogAppender(const _LoggerContext &context, int maxFileSizeKBytes, int maxBackupCount); virtual ~_MaxSizeLogAppender() {} protected: virtual void roll(); virtual bool isRolling(); private: int maxFileSizeKBytes; int maxBackupCount; int currBackupCount; std::list<std::string> backupList; }; class _DailyLogAppender : public _LogAppenderBase { public: _DailyLogAppender(const _LoggerContext &context); virtual ~_DailyLogAppender() {} protected: virtual void roll(); virtual bool isRolling(); private: int prevDate; }; struct _LoggerContext { std::string path; struct timeval now; }; class _Logger { public: _Logger(const char *path); virtual ~_Logger(); void setLogLevel(CCI_LOG_LEVEL level); void setUseDefaultPrefix(bool useDefaultPrefix); void setUseDefaultNewLine(bool useDefaultNewLine); void setForceFlush(bool isForceFlush); void log(CCI_LOG_LEVEL level, const char *msg); void changeMaxFileSizeAppender(int maxFileSizeKBytes, int maxBackupCount); void changePostfixAppender(CCI_LOG_POSTFIX postfix); public: const char *getPath(); bool isWritable(CCI_LOG_LEVEL level); private: void write(const char *msg); void logPrefix(CCI_LOG_LEVEL level); private: cci::_Mutex critical; _LoggerContext context; _LogAppender *logAppender; CCI_LOG_LEVEL level; bool useDefaultPrefix; bool useDefaultNewLine; bool isForceFlush; int unflushedBytes; unsigned long nextFlushTime; }; _LogAppender::_LogAppender(const _LoggerContext &context) : context(context) { } _LogAppenderBase::_LogAppenderBase(const _LoggerContext &context) : _LogAppender(context), nextCheckTime(0) { open(); } _LogAppenderBase::~_LogAppenderBase() { close(); } void _LogAppenderBase::open() { if (out.is_open()) { return; } makeLogDir(); out.open(context.path.c_str(), std::fstream::out | std::fstream::app); if (out.fail()) { out.open(context.path.c_str(), std::fstream::out | std::fstream::app); if (out.fail()) { throw LOG_ER_OPEN; } } } void _LogAppenderBase::close() { if (!out.is_open()) { return; } out.close(); } void _LogAppenderBase::write(const char *msg) { checkFileIsOpen(); try { if (!out.is_open()) { open(); } if (this->isRolling()) { this->roll(); } out << msg; } catch (...) { } } void _LogAppenderBase::flush() { if (!out.is_open()) { return; } out.flush(); } std::string _LogAppenderBase::rename(const char *newPath, const char *postfix) { std::stringstream newPathStream; newPathStream << newPath; close(); if (access(newPath, F_OK) == 0 && postfix != NULL) { newPathStream << postfix; } int e = std::rename(context.path.c_str(), newPathStream.str().c_str()); if (e != 0) { } try { open(); } catch (...) { } return newPathStream.str(); } int _LogAppenderBase::getLogSizeKBytes() { if (!out.is_open()) { return 0; } else { return out.tellp() / 1024; } } std::string _LogAppenderBase::getCurrDate() { struct tm cal; char buf[16]; time_t t = context.now.tv_sec; localtime_r(&t, &cal); cal.tm_year += 1900; cal.tm_mon += 1; snprintf(buf, 16, "%d-%02d-%02d", cal.tm_year, cal.tm_mon, cal.tm_mday); return buf; } std::string _LogAppenderBase::getCurrDateTime() { struct tm cal; char buf[16]; time_t t = context.now.tv_sec; localtime_r(&t, &cal); cal.tm_year += 1900; cal.tm_mon += 1; snprintf(buf, 16, "%d%02d%02d%02d%02d%02d", cal.tm_year, cal.tm_mon, cal.tm_mday, cal.tm_hour, cal.tm_min, cal.tm_sec); return buf; } void _LogAppenderBase::makeLogDir() { const char *sep = "/\\"; char dir[FILENAME_MAX]; char *p = dir; const char *q = context.path.c_str(); while (*q) { *p++ = *q; *p = '\0'; if (*q == sep[0] || *q == sep[1]) { mkdir(dir, 0755); } q++; } } void _LogAppenderBase::checkFileIsOpen() { long int currentTime = context.now.tv_sec * 1000000 + context.now.tv_usec; if (nextCheckTime == 0 || currentTime >= nextCheckTime) { if (access(context.path.c_str(), F_OK) != 0) { if (out.is_open()) { out.close(); } try { open(); } catch (...) { } } nextCheckTime = currentTime + LOG_CHECK_FILE_INTERVAL_USEC; } } _PostFixAppender::_PostFixAppender(const _LoggerContext &context, CCI_LOG_POSTFIX postfix) : _LogAppenderBase(context), postfix(postfix), prevDate(time(NULL) / ONE_DAY) { } void _PostFixAppender::open() { if (out.is_open()) { return; } makeLogDir(); std::string newPath = getNewPath(); out.open(newPath.c_str(), std::fstream::out | std::fstream::app); if (out.fail()) { out.open(newPath.c_str(), std::fstream::out | std::fstream::app); if (out.fail()) { throw LOG_ER_OPEN; } } } void _PostFixAppender::roll() { close(); try { open(); } catch (...) { } prevDate = context.now.tv_sec / ONE_DAY; } bool _PostFixAppender::isRolling() { if (postfix == CCI_LOG_POSTFIX_DATE) { int nowDay = context.now.tv_sec / ONE_DAY; return prevDate < nowDay; } else { return false; } } void _PostFixAppender::checkFileIsOpen() { long int currentTime = context.now.tv_sec * 1000000 + context.now.tv_usec; if (nextCheckTime == 0 || currentTime >= nextCheckTime) { std::string newPath = getNewPath(); if (access(newPath.c_str(), F_OK) != 0) { if (out.is_open()) { out.close(); } try { open(); } catch (...) { } } nextCheckTime = currentTime + LOG_CHECK_FILE_INTERVAL_USEC; } } std::string _PostFixAppender::getNewPath() { std::stringstream newPath; newPath << context.path; if (postfix == CCI_LOG_POSTFIX_DATE) { newPath << "." << getCurrDate(); } return newPath.str(); } _MaxSizeLogAppender::_MaxSizeLogAppender(const _LoggerContext &context, int maxFileSizeKBytes, int maxBackupCount) : _LogAppenderBase(context), maxFileSizeKBytes(maxFileSizeKBytes), maxBackupCount(maxBackupCount), currBackupCount(0) { } void _MaxSizeLogAppender::roll() { std::stringstream newPath_stream; newPath_stream << context.path << "." << getCurrDateTime(); std::stringstream postfix_stream; postfix_stream << "(" << currBackupCount++ << ")"; std::string newPath = rename(newPath_stream.str().c_str(), postfix_stream.str().c_str()); backupList.push_back(newPath); if (backupList.size() > (size_t) maxBackupCount) { std::string remove_path = backupList.front(); backupList.pop_front(); int e = remove(remove_path.c_str()); if (e != 0) { perror("remove"); } } } bool _MaxSizeLogAppender::isRolling() { return getLogSizeKBytes() > maxFileSizeKBytes; } _DailyLogAppender::_DailyLogAppender(const _LoggerContext &context) : _LogAppenderBase(context), prevDate(time(NULL) / ONE_DAY) { } void _DailyLogAppender::roll() { prevDate = context.now.tv_sec / ONE_DAY; std::stringstream newPathStream; newPathStream << context.path << "." << getCurrDate(); rename(newPathStream.str().c_str(), NULL); } bool _DailyLogAppender::isRolling() { int nowDay = context.now.tv_sec / ONE_DAY; return prevDate < nowDay; } _Logger::_Logger(const char *path) : logAppender(NULL), level(CCI_LOG_LEVEL_INFO), useDefaultPrefix(true), useDefaultNewLine(true), isForceFlush(true), unflushedBytes(0), nextFlushTime(0) { context.path = path; gettimeofday(&context.now, NULL); nextFlushTime = context.now.tv_usec + LOG_FLUSH_USEC; logAppender = new _DailyLogAppender(context); } _Logger::~_Logger() { cci::_MutexAutolock lock(&critical); if (logAppender != NULL) { delete logAppender; } } void _Logger::setLogLevel(CCI_LOG_LEVEL level) { cci::_MutexAutolock lock(&critical); this->level = level; } void _Logger::setUseDefaultPrefix(bool useDefaultPrefix) { cci::_MutexAutolock lock(&critical); this->useDefaultPrefix = useDefaultPrefix; } void _Logger::setUseDefaultNewLine(bool useDefaultNewLine) { cci::_MutexAutolock lock(&critical); this->useDefaultNewLine = useDefaultNewLine; } void _Logger::setForceFlush(bool isForceFlush) { cci::_MutexAutolock lock(&critical); this->isForceFlush = isForceFlush; } void _Logger::log(CCI_LOG_LEVEL level, const char *msg) { cci::_MutexAutolock lock(&critical); gettimeofday(&context.now, NULL); if (useDefaultPrefix) { logPrefix(level); } write(msg); if (useDefaultNewLine) { write("\n"); } } void _Logger::changeMaxFileSizeAppender(int maxFileSizeKBytes, int maxBackupCount) { cci::_MutexAutolock lock(&critical); if (this->logAppender != NULL) { delete this->logAppender; } this->logAppender = new _MaxSizeLogAppender(context, maxFileSizeKBytes, maxBackupCount); } void _Logger::changePostfixAppender(CCI_LOG_POSTFIX postfix) { cci::_MutexAutolock lock(&critical); if (this->logAppender != NULL) { delete this->logAppender; } if (postfix == CCI_LOG_POSTFIX_NONE) { this->logAppender = new _DailyLogAppender(context); } else { this->logAppender = new _PostFixAppender(context, postfix); } } const char *_Logger::getPath() { cci::_MutexAutolock lock(&critical); return context.path.c_str(); } bool _Logger::isWritable(CCI_LOG_LEVEL level) { cci::_MutexAutolock lock(&critical); return this->level >= level; } void _Logger::write(const char *msg) { logAppender->write(msg); unflushedBytes += strlen(msg); if (isForceFlush || unflushedBytes >= LOG_FLUSH_SIZE || nextFlushTime >= (unsigned long) context.now.tv_usec) { logAppender->flush(); unflushedBytes = 0; nextFlushTime = context.now.tv_usec + LOG_FLUSH_USEC; } } void _Logger::logPrefix(CCI_LOG_LEVEL level) { struct tm cal; time_t t; t = context.now.tv_sec; localtime_r((const time_t *) &t, &cal); cal.tm_year += 1900; cal.tm_mon += 1; char buf[128]; unsigned long tid = gettid(); snprintf(buf, 128, "%d-%02d-%02d %02d:%02d:%02d.%03d [TID:%lu] [%5s]", cal.tm_year, cal.tm_mon, cal.tm_mday, cal.tm_hour, cal.tm_min, cal.tm_sec, (int)(context.now.tv_usec / 1000), tid, cci_log_level_string[level]); write(buf); } typedef std::pair<_Logger *, int> _LoggerReference; typedef std::map<std::string, _LoggerReference> _LoggerMap; class _LoggerManager { public: _LoggerManager() {} virtual ~_LoggerManager() {} _Logger *getLogger(const char *path); void removeLogger(const char *path); void clearLogger(); private: cci::_Mutex critical; _LoggerMap map; }; _Logger *_LoggerManager::getLogger(const char *path) { cci::_MutexAutolock lock(&critical); _LoggerMap::iterator it = map.find(path); if (it == map.end()) { try { _Logger *logger = new _Logger(path); map[path] = _LoggerReference(logger, 1); return logger; } catch (...) { return NULL; } } else { it->second.second++; } return it->second.first; } void _LoggerManager::removeLogger(const char *path) { cci::_MutexAutolock lock(&critical); _LoggerMap::iterator it = map.find(path); if (it != map.end()) { it->second.second--; if (it->second.second == 0) { delete it->second.first; map.erase(it); } } } void _LoggerManager::clearLogger() { cci::_MutexAutolock lock(&critical); _LoggerMap::iterator it = map.begin(); for (; it != map.end(); it++) { delete it->second.first; } map.clear(); } static _LoggerManager loggerManager; Logger cci_log_add(const char *path) { return loggerManager.getLogger(path); } Logger cci_log_get(const char *path) { return loggerManager.getLogger(path); } void cci_log_finalize(void) { loggerManager.clearLogger(); } void cci_log_writef(CCI_LOG_LEVEL level, Logger logger, const char *format, ...) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } char buf[LOG_BUFFER_SIZE]; va_list vl; va_start(vl, format); vsnprintf(buf, LOG_BUFFER_SIZE, format, vl); va_end(vl); l->log(level, buf); } void cci_log_write(CCI_LOG_LEVEL level, Logger logger, const char *log) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->log(level, (char *) log); } void cci_log_remove(const char *path) { loggerManager.removeLogger(path); } void cci_log_set_level(Logger logger, CCI_LOG_LEVEL level) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->setLogLevel(level); } bool cci_log_is_writable(Logger logger, CCI_LOG_LEVEL level) { _Logger *l = (_Logger *) logger; if (l == NULL) { return false; } return l->isWritable(level); } void cci_log_set_force_flush(Logger logger, bool force_flush) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->setForceFlush(force_flush); } void cci_log_use_default_newline(Logger logger, bool use_default_newline) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->setUseDefaultNewLine(use_default_newline); } void cci_log_use_default_prefix(Logger logger, bool use_default_prefix) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->setUseDefaultPrefix(use_default_prefix); } void cci_log_change_max_file_size_appender(Logger logger, int maxFileSizeKBytes, int maxBackupCount) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } try { l->changeMaxFileSizeAppender(maxFileSizeKBytes, maxBackupCount); } catch (...) { } } void cci_log_set_default_postfix(Logger logger, CCI_LOG_POSTFIX postfix) { _Logger *l = (_Logger *) logger; if (l == NULL) { return; } l->changePostfixAppender(postfix); }
gpl-3.0
mrotondo/SuperCollider
Help/GUI/EZ-GUI/EZPopUpMenu.html
22082
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <title></title> <meta name="Generator" content="Cocoa HTML Writer"> <meta name="CocoaVersion" content="949.54"> <style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0000bf} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica} p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px} p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica} p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px} p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica} p.p10 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica; min-height: 14.0px} p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco} p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #606060} p.p13 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #bf0000} p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco} p.p15 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica} p.p16 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000} span.s1 {font: 18.0px Helvetica} span.s2 {color: #0000bf} span.s3 {color: #000000} span.s4 {text-decoration: underline} span.s5 {font: 11.0px Monaco} span.s6 {color: #007300} span.s7 {color: #606060} span.s8 {color: #bf0000} span.Apple-tab-span {white-space:pre} </style> </head> <body> <p class="p1"><span class="s1"><b>EZPopUpMenu<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>a wrapper class for a label plus a popUpMenu with per item actions</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p> <p class="p2"><br></p> <p class="p1"><b>Inherits from: </b><a href="../../Core/Object.html"><span class="s2"><b>Object</b></span></a><b> : </b><a href="EZGui.html"><span class="s2"><b>EZGui</b></span></a><b> : </b><a href="EZLists.html"><span class="s2"><b>EZLists</b></span></a></p> <p class="p3"><br></p> <p class="p1">EZPopUpMenu is wrapper class which creates an (optional) label and a popUpMenu. It includes per item actions as well as a global action which are both evaluated upon selection of an item. Convenience methods for inserting and deleting menu items are also included . If the parent is nil, then EZPopUpMenu will create its own window.See <a href="EZGui.html"><span class="s2">EZGui</span></a> and <a href="EZLists.html"><span class="s2">EZLists</span></a> for all of the options.</p> <p class="p2"><br></p> <p class="p4"><span class="s3"><b>See also:</b> <a href="../Main-GUI/PopUpMenu.html"><span class="s4">PopUpMenu</span></a></span></p> <p class="p2"><br></p> <p class="p5"><b>Some Important Issues Regarding EZPopUpMenu</b></p> <p class="p2"><br></p> <p class="p1">The convenience methods for EZPopUpMenu require that the items array is an array of associations of labels and functions, not like in <a href="../Main-GUI/PopUpMenu.html"><span class="s2">PopUpMenu</span></a>, where items is simply an array of strings. If <b>label</b> is nil, then no staticText is created. I</p> <p class="p2"><br></p> <p class="p5"><b>Creation / Class Methods</b></p> <p class="p6"><br></p> <p class="p7"><b><span class="Apple-tab-span"> </span>*new (parentView, bounds, label, items, globalAction, initVal, initAction, labelWidth, labelHeight,layout,gap)</b></p> <p class="p8"><b><span class="Apple-tab-span"> </span></b></p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>parentView </b>- The parent view or window. If the parent is nil, then EZPopUpMenu will create its own <a href="../Main-GUI/Window.html"><span class="s2">Window</span></a>, and place it conveniently on the screen if the bounds are a <a href="../../Geometry/Point.html"><span class="s2">Point</span></a>. If the bounds are a <a href="../../Geometry/Rect.html"><span class="s2">Rect</span></a>, then the Rect determines the window bounds.</p> <p class="p10"><br></p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds </b>- An instance of <a href="../../Geometry/Rect.html"><span class="s2">Rect</span></a> or <a href="../../Geometry/Point.html"><span class="s2">Point</span></a>. Default value is <span class="s5">160@22</span>.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>label </b>- the label. Default value is nil. If nil, then no StaticText is created.<span class="Apple-converted-space"> </span></p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>items </b>- Default value is nil. An Array of <a href="../../Collections/Association.html"><span class="s2">Association</span></a>s ['label' -&gt; {arg menuObj; value}, ]. Or and Array Symbols (if you are only using <b>globalAction</b>).</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>globalAction </b>- a Global function to be performed in addition to the item functions {arg menuObj; value}.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>initVal </b>- Initial <b>value</b> of the Menu, i.e. the index selected. Default value is 0.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>initAction </b>- An instance of <a href="../../Core/Boolean.html"><span class="s2">Boolean</span></a>. Performs the action at <b>initVal</b> on creation of the menu, plus the <b>globalAction</b>. Default value is false.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>labelWidth </b>- Default value is 80.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>labelHeight </b>- Default value is 20. Not used if <b>layout</b> is \horz.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>layout</b>- \vert or \horz. default is horz;</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>gap </b>- A <a href="../../Geometry/Point.html"><span class="s2">Point</span></a>. By default, the view tries to get its parent's gap, otherwise it defaults to 2@2. Setting it overrides these.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>margin </b>- A <a href="../../Geometry/Point.html"><span class="s2">Point</span></a>. This will inset the bounds occupied<span class="Apple-converted-space">  </span>by the subviews of view.</p> <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w=<span class="s2">Window</span>.new.front;</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = <span class="s2">FlowLayout</span>(w.view.bounds);</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g = <span class="s2">EZPopUpMenu</span>.new(w,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>230@22,</p> <p class="p12"><span class="s3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>"A PopUpMenu: "<span class="s3">,</span></p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>[<span class="Apple-tab-span"> </span></p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s6">\item0</span> -&gt;{<span class="s2">|a|</span> (<span class="s7">"this is item 0 of "</span> ++ a).postln},</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s6">\item1</span> -&gt;{<span class="s2">|a|</span> (<span class="s7">"this is item 1 of "</span> ++ a).postln},</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s6">\item2</span> -&gt;{<span class="s2">|a|</span> (<span class="s7">"this is item 2 of "</span> ++ a).postln},</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>],</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>globalAction: {<span class="s2">|a|</span> (<span class="s7">"this is a global action of "</span>++a.asString ).postln},</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>initVal: 1,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>initAction: <span class="s2">true</span>,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>labelWidth: 120,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>labelHeight: 20,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>layout: <span class="s6">\horz</span>,</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>gap: 2@2</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p> <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p> <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p13"><span class="s3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// or a more simple syntax:</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w=<span class="s2">Window</span>.new.front;</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>w.view.decorator = <span class="s2">FlowLayout</span>(w.view.bounds);</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g = <span class="s2">EZPopUpMenu</span>.new(w,200@22, <span class="s7">"Menu: "</span>);</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\item0</span>, {<span class="s2">|a|</span> (<span class="s7">"this is item 0 of "</span> ++ a).postln});</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\item1</span>, {<span class="s2">|a|</span> (<span class="s7">"this is item 1 of "</span> ++ a).postln});</p> <p class="p11"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\item2</span>, {<span class="s2">|a|</span> (<span class="s7">"this is item 2 of "</span> ++ a).postln});</p> <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g.value=0;</p> <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p> <p class="p3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p15"><b>Changing Appearance</b></p> <p class="p2"><span class="Apple-tab-span"> </span></p> <p class="p7"><b><span class="Apple-tab-span"> </span>setColors(stringBackground,stringColor,menuBackground,menuStringColor,background)</b></p> <p class="p8"><b><span class="Apple-tab-span"> </span></b></p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>stringBackground </b>- An instance of <a href="../GUI-Tools/Color.html"><span class="s2">Color</span></a>. The <b>background</b> of the label and unit views.</p> <p class="p9"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>stringColor </b>- An instance of <a href="../GUI-Tools/Color.html"><span class="s2">Color</span></a>. The <b>stringColor</b> of the label and unit views.</p> <p class="p9"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>menuBackground </b>- An instance of <a href="../GUI-Tools/Color.html"><span class="s2">Color</span></a>. The <b>background</b> of the menu.</p> <p class="p9"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>menuStringColor </b>- An instance of <a href="../GUI-Tools/Color.html"><span class="s2">Color</span></a>. The <b>stringColor</b> of the menu.</p> <p class="p9"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>background </b>- An instance of <a href="../GUI-Tools/Color.html"><span class="s2">Color</span></a>. The <b>backround</b> of the list view.</p> <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p7"><b><span class="Apple-tab-span"> </span>font_(font)</b></p> <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Set the Font used by all the views.</p> <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>font </b>- An instance of <a href="../Main-GUI/Font.html"><span class="s2">Font</span></a>.<span class="Apple-converted-space"> </span></p> <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p5"><b>Examples</b></p> <p class="p3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p16">// try several examples together</p> <p class="p14">(</p> <p class="p3"><br></p> <p class="p16">// many menus</p> <p class="p16">// inherits the parent's decorator gap</p> <p class="p3"><br></p> <p class="p14">(</p> <p class="p11">w=<span class="s2">Window</span>.new(<span class="s7">"oscillators"</span>, <span class="s2">Rect</span>(200,500,200,160)).front;</p> <p class="p11">w.view.decorator = <span class="s2">FlowLayout</span>(w.view.bounds).gap_(2@2);</p> <p class="p11">5.do{<span class="s2">|i|</span></p> <p class="p11"><span class="Apple-tab-span"> </span>g = <span class="s2">EZPopUpMenu</span>.new(w,190@22, <span class="s7">"Oscillator % : "</span>.format(i+1));</p> <p class="p11"><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\off</span>, {<span class="s7">"off"</span>. postln});</p> <p class="p11"><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\sine</span>, {<span class="s7">"sine"</span>. postln});</p> <p class="p11"><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\saw</span>, {<span class="s7">"saw"</span>. postln});</p> <p class="p11"><span class="Apple-tab-span"> </span>g.addItem(<span class="s6">\pulse</span>, {<span class="s7">"pulse"</span>. postln});</p> <p class="p11"><span class="Apple-tab-span"> </span>g.setColors(<span class="s2">Color</span>.grey,<span class="s2">Color</span>.white);</p> <p class="p11"><span class="Apple-tab-span"> </span>g.value=0;</p> <p class="p11">};</p> <p class="p11">w.bounds=w.bounds.moveBy(300,60);</p> <p class="p14">);</p> <p class="p2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p2"><br></p> <p class="p13">// Creates its own window if parentView is nil:</p> <p class="p14">(</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(<span class="s2">nil</span>,250@22 ,<span class="s7">" Select : "</span>);</p> <p class="p11">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p11">g.setColors(<span class="s2">Color</span>.grey,<span class="s2">Color</span>.white);</p> <p class="p11">g.value=0;</p> <p class="p6"><br></p> <p class="p14">);</p> <p class="p3"><br></p> <p class="p16">// layout vertical:</p> <p class="p14">(</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(<span class="s2">nil</span>,200@42, <span class="s7">" Choose"</span>,layout:<span class="s6">\vert</span>);</p> <p class="p11">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p11">g.setColors(<span class="s2">Color</span>.grey,<span class="s2">Color</span>.white);</p> <p class="p11">g.window.bounds=g.window.bounds.moveBy(300,-200);</p> <p class="p11">g.value=0;</p> <p class="p14">);</p> <p class="p3"><br></p> <p class="p16">// No labelView created, so set the window title;</p> <p class="p14">(</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(bounds:180@22); <span class="s8">// no label</span></p> <p class="p11">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p11">g.value=0;</p> <p class="p11">g.window.name=<span class="s7">" choose item"</span>;</p> <p class="p11">g.window.bounds=g.window.bounds.moveBy(0,-200);</p> <p class="p14">);</p> <p class="p14">)</p> <p class="p16">// insertItem;</p> <p class="p6"><br></p> <p class="p11">(</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(<span class="s2">nil</span>,200@22, <span class="s7">"Menu:"</span>);</p> <p class="p11">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item4</span>, {<span class="s7">"this is item 4"</span>. postln});</p> <p class="p11">g.value=0;</p> <p class="p14">);</p> <p class="p3"><br></p> <p class="p14">g.insertItem(3, <span class="s6">\item3</span>, {<span class="s7">"this is item 3"</span>. postln});</p> <p class="p3"><br></p> <p class="p3"><br></p> <p class="p13">// remove Item ;</p> <p class="p6"><br></p> <p class="p11">(</p> <p class="p11">w=<span class="s2">Window</span>.new.front;</p> <p class="p11">w.view.decorator = <span class="s2">FlowLayout</span>(w.view.bounds);</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(w,200@22, <span class="s7">"Menu:"</span>);</p> <p class="p11">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p11">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item4</span>, {<span class="s7">"this is item 4"</span>. postln});</p> <p class="p14">g.insertItem(3, <span class="s6">\item3</span>, {<span class="s7">"this is item 3"</span>. postln});</p> <p class="p11">g.value=0;</p> <p class="p14">)</p> <p class="p3"><br></p> <p class="p14">g. removeItemAt(0);</p> <p class="p3"><br></p> <p class="p3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p> <p class="p8"><br></p> <p class="p13">// replace item;</p> <p class="p11">(</p> <p class="p11">g = <span class="s2">EZPopUpMenu</span>.new(<span class="s2">nil</span>,200@22, <span class="s7">"List:"</span>);</p> <p class="p14">g.addItem(<span class="s6">\item0</span>, {<span class="s7">"this is item 0"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item1</span>, {<span class="s7">"this is item 1"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item2</span>, {<span class="s7">"this is item 2"</span>. postln});</p> <p class="p14">g.addItem(<span class="s6">\item3</span>, {<span class="s7">"this is item 3"</span>. postln});</p> <p class="p14">)</p> <p class="p3"><br></p> <p class="p14">g.replaceItemAt(2, <span class="s6">\item2_replaced</span>, {<span class="s7">"this is item 2 replaced"</span>. postln});</p> <p class="p3"><br></p> <p class="p8"><br></p> </body> </html>
gpl-3.0
katmutua/electric-book-gui
src/ts/querySelectorAll-extensions.ts
514
export function QuerySelectorAllIterate(el:HTMLElement, query:string) : HTMLElement[] { let els :HTMLElement[] = []; if ('function'==typeof el.matches) { if (el.matches(query)) { els.push(el); } } else if ('function'==typeof (el as any).matchesSelector) { if ((el as any).matchesSelector(query)) { els.push(el as HTMLElement); } } let childSelector = el.querySelectorAll(query); for (let i=0; i<childSelector.length; i++) { els.push(childSelector.item(i) as HTMLElement); } return els; }
gpl-3.0
PersoSim/de.persosim.simulator
de.persosim.simulator/src/de/persosim/simulator/tlv/TlvDataObjectComparatorDer.java
1516
package de.persosim.simulator.tlv; import java.util.Comparator; import de.persosim.simulator.utils.Utils; /** * This class implements a comparator for sorting TLV data objects in DER-TLV * order. Sorting is performed based on the sorting of tags. In detail tags * again are sorted based on their indicated class and tag number. * * !Attention!: Sorting is performed without checking either explicitly or * implicitly for valid DER encoding of the objects to be sorted. Checks for * valid DER encoding must be performed separately. Sorting however will also * work correctly for valid BER but not DER encoded TLV data objects. * * @author slutters * */ public class TlvDataObjectComparatorDer implements Comparator<TlvDataObject> { @Override public int compare(TlvDataObject tlvdo1, TlvDataObject tlvdo2) { TlvTag tlvTag1; TlvTag tlvTag2; tlvTag1 = tlvdo1.getTlvTag(); tlvTag2 = tlvdo2.getTlvTag(); return compare(tlvTag1, tlvTag2); } /** * Performs Comparator's sorting based on tags * @param tlvTag1 tag 1 * @param tlvTag2 tag 2 * @return the Comparator's compare result */ private int compare(TlvTag tlvTag1, TlvTag tlvTag2) { short class1 = Utils.maskUnsignedByteToShort(tlvTag1.getEncodedClass()); short class2 = Utils.maskUnsignedByteToShort(tlvTag2.getEncodedClass()); short classDiff = (short) (class1 - class2); if(classDiff != 0) { return classDiff; } else{ return tlvTag1.getIndicatedTagNo() - tlvTag2.getIndicatedTagNo(); } } }
gpl-3.0
CroceRossaCatania/gaia
inc/attivita.modifica.php
4359
<?php /* * ©2013 Croce Rossa Italiana */ paginaPrivata(); caricaSelettore(); controllaParametri(['id'], 'attivita.gestione&err'); $a = Attivita::id($_GET['id']); paginaAttivita($a); if (!$a->haPosizione()) { redirect('attivita.localita&id=' . $a->id); } $del = $me->delegazioni(APP_ATTIVITA); $comitati = $me->comitatiDelegazioni(APP_ATTIVITA); $domini = $me->dominiDelegazioni(APP_ATTIVITA); $g = GeoPolitica::daOid($a->comitato); $visMinima = $a->visibilitaMinima($g); ?> <form action="?p=attivita.modifica.ok" method="POST"> <input type="hidden" name="id" value="<?php echo $a->id; ?>" /> <div class="row-fluid"> <div class="span7"> <h2><i class="icon-flag muted"></i> Dettagli dell'attività</h2> </div> <div class="btn-group pull-right"> <button type="submit" name="azione" value="salva" class="btn btn-success btn-large"> <i class="icon-save"></i> Salva l'attività </button> </div> </div> <hr /> <div class="row-fluid"> <div class="span8"> <div class="alert alert-info"> <i class="icon-info-sign"></i> Presta molta attenzione quando decidi <strong> quali volontari possono partecipare </strong>:</br> <ul> <li>Se selezioni <strong>Tutti i Volontari della Croce Rossa Italiana</strong> permetti a tutti gli iscritti su Gaia di dare disponibilità per l'attività. </li> <li>Se selezioni <strong>Pubblica</strong> permetti anche a chi <strong>non</strong> è Volontario di partecipare. </li> </ul> </div> <div class="form-horizontal"> <div class="control-group"> <label class="control-label" for="inputNome">Nome</label> <div class="controls"> <input class="input-xlarge grassetto" value="<?php echo $a->nome; ?>" type="text" id="inputNome" name="inputNome" placeholder="Es.: Aggiungi un Posto a Tavola" required autofocus pattern=".{2,}" /> </div> </div> <div class="control-group"> <label class="control-label" for="inputVisibilita">Quali volontari possono chiedere di partecipare?</label> <div class="controls"> <select class="input-xxlarge" name="inputVisibilita"> <?php foreach ( $conf['att_vis'] as $num => $nom ) { if ($num < $visMinima) { continue; }?> <option value="<?php echo $num; ?>" <?php if ( $a->visibilita == $num ) { ?> selected="selected" <?php } ?> > <?php echo $nom; ?> </option> <?php } ?> </select> <p class="text-info"><i class="icon-info-sign"></i> I volontari al di fuori di questa selezione non vedranno l'attività nel calendario.</p> </div> </div> <div class="control-group"> <label class="control-label" for="inputDescrizione">Descrizione ed informazioni per i volontari</label> <div class="controls"> <textarea rows="10" class="input-xlarge conEditor" type="text" id="inputDescrizione" name="inputDescrizione"><?php echo $a->descrizione; ?></textarea> </div> </div> </div> </div> <div class="span4"> <p> <strong>Referente</strong><br /> <?php echo $a->referente()->nomeCompleto(); ?> </p> <p> <strong>Organizzatore</strong><br /> <?php echo $g->nomeCompleto(); ?> </p> <p> <strong>Area d'intervento</strong><br /> <?php echo $a->area()->nomeCompleto(); ?> </p> <p> <strong>Posizione geografica</strong><br /> <?php echo $a->luogo; ?><br /> <a href='?p=attivita.localita&id=<?= $a->id; ?>'> <i class='icon-pencil'></i> modifica la località </a> </p> </div> </div> </form>
gpl-3.0