ソースを参照

Saque un par de cosas y añadi descripcion del shuffle.

Fabian 11 年 前
コミット
97861052e5
1 ファイル変更18 行追加13 行削除
  1. 18 13
      machete/machete.tex

+ 18 - 13
machete/machete.tex

@@ -5,6 +5,7 @@
 \usepackage{array}
 \usepackage{listings} 		% Para insertar codigo
 \usepackage[usenames,dvipsnames]{color} % Colores custom
+\usepackage{pbox}
 \newcolumntype{@}{>{\global\let\currentrowstyle\relax}}
 \newcolumntype{^}{>{\currentrowstyle}}
 \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
@@ -77,18 +78,17 @@
 
 \section{Registros} 
 \begin{itemize}
-\setlength\itemsep{1em}
 \item \textbf{8 bits}: AL, BL, CL, DL, DIL, SIL, BPL, SPL, R8L, R9L, R10L, R11L, R12L, R13L, R14L, R15L \item \textbf{16 bits}: AX, BX, CX, DX, DI, SI, BP, SP, R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W
 \item \textbf{32 bits}: EAX, EBX, ECX, EDX, EDI, ESI, EBP, ESP, R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D
 \item \textbf{64 bits}: RAX, RBX, RCX, RDX, RSI, RDI, RPB, RSP, R8, R9, R10, R11, R12, R13, R14, R15
 \item \textbf{128 bits}: XMM0-XMM15 
 \end{itemize}
 
-\section{Secciones y Etiquetas}
-\subsection*{Secciones}
-\textbf{.data}: Variables \\
-\textbf{.rodata}: Constantes \\
-\textbf{.text}: C\'odigo \\
+%\section{Secciones y Etiquetas}
+%\subsection*{Secciones}
+%\textbf{.data}: Variables \\
+%\textbf{.rodata}: Constantes \\
+%\textbf{.text}: C\'odigo \\
 
 %\subsection*{Etiquetas}
 %\textbf{global}: Define un s\'imbolo que va a ser visto externamente \\
@@ -247,13 +247,18 @@ Indica que el struct no va a ser alineado
 
 
 \subsection*{Shuffles}
-Las intrucciones de Shuffles permiten reordenar datos en registros. Sus par\'ametros ser\'an el registro a reordenar y una mascara que indicar\'a como hacerlo
-\begin{itemize}
-\item \textbf{PSHUF\{B,W,D\}}: Shuffle Packed Bytes, Words, Doublewords
-\item \textbf{PSHUF\{H,L\}W}: Shuffle High, low 16bit values
-\item \textbf{SHUFP\{S,D\}}: Shuffle Packed single, Double FP Values
-\end{itemize}
-\textbf{PSHUFHW} xmm1, xmm2/m128, imm8
+Las intrucciones de Shuffles permiten reordenar datos en registros. Sus par\'ametros ser\'an el registro a reordenar y una mascara que indicar\'a como hacerlo \\
+\begin{tabular}[l]{ |@l|>{\itshape}^l|^p{10cm}| }
+\hline
+\rowstyle{\bfseries}
+Instruccion & Formato & Descripcion \\
+\hline
+PSHUFB & xmm1, xmm2/m128 &  Shuffle bytes in xmm1 according to contents of xmm2/m128. Each byte in the shuffle control mask forms an index to permute the corresponding byte in the destination operand. \\ \hline
+PSHUFD & xmm1, xmm2/m128, imm8 & Shuffle the doublewords in xmm2/m128 based on the encoding in imm8 and store the result in xmm1. \pbox{10cm}{
+//0x00 set all elems to 1st elem, 0000 0000. \\ //0x55 set all elems to 2nd elem, 0101 0101 \\ //0xAA set all elems to 3rd elem, 1010 1010 \\ //0xFF set all elems to 4th elem, 1111 1111 \\ //0x1B reverse order, 0001 1011} \\ \hline
+PSHUF\{H,L\}W & xmm1, xmm2/m128, imm8 & Shuffle the high words in xmm2/m128 based on the encoding in imm8 and store the result in xmm1. \\ \hline
+PSIGN\{B,W,D\} & PSIGNB xmm1, xmm2/m128 &  Negate/zero/preserve packed byte integers in xmm1 depending on the corresponding sign in xmm2/m128. \\ \hline
+\end{tabular}
 
 
 \subsection*{Insert/Extract}