From 48ba0474d11608869717c7bc1a9b9fe4e1196977 Mon Sep 17 00:00:00 2001
From: Iru Cai <mytbk920423@gmail.com>
Date: Sat, 11 May 2019 23:09:45 +0800
Subject: add tables

---
 chap/chap2.tex | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'chap/chap2.tex')

diff --git a/chap/chap2.tex b/chap/chap2.tex
index 0366d03..3224d22 100644
--- a/chap/chap2.tex
+++ b/chap/chap2.tex
@@ -477,11 +477,14 @@ Spectre-PHT 利用分支预测器，攻击者可以训练转移预测器，使
 Spectre v1 是最早提出的 Spectre 攻击，属于 Spectre-PHT 类型。它利用受
 害者程序中的分支，一个例子如下：
 
-\begin{minted}{C}
+\begin{figure}[htbp]
+\begin{minted}[frame=single,linenos=true]{C}
 if (x < array1_size)
     y = array2[array1[x] * 4096];
 \end{minted}
-
+\caption{Spectre v1 受害者代码}
+\label{lst:spectre_v1}
+\end{figure}
 
 %%%%%%%%%%%%%%%%%%%%%%% gtran: spectre v1 %%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-- 
cgit v1.2.3

