equal
deleted
inserted
replaced
41 iload 3 |
41 iload 3 |
42 istore 1 |
42 istore 1 |
43 ifeq label |
43 ifeq label |
44 if_icmpge label |
44 if_icmpge label |
45 \end{lstlisting} |
45 \end{lstlisting} |
|
46 |
|
47 |
|
48 \item What does the following LLVM function calculate. Give the |
|
49 |
|
50 \begin{lstlisting}[language=LLVM,numbers=none] |
|
51 define i32 @foo(i32 %a, i32 %b) { |
|
52 %1 = mul i32 %a, %a |
|
53 %2 = mul i32 %a, 2 |
|
54 %3 = mul i32 %2, %b |
|
55 %4 = add i32 %1, %3 |
|
56 %5 = mul i32 %b, %b |
|
57 %6 = add i32 %5, %4 |
|
58 ret i32 %6 |
|
59 } |
|
60 \end{lstlisting} |
|
61 |
|
62 |
46 |
63 |
47 |
64 |
48 |
65 |
49 \item \POSTSCRIPT |
66 \item \POSTSCRIPT |
50 |
67 |