initial checkin
[org.ibex.nanogoat.git] / upstream / mips / javaone.tex
1 %
2 % FIXME: - Add something about size limits on the constant pool
3 %          how we worked around that and the performance impact
4 %          of -o lessconstants
5 %        - Add something about encoding data sections as string constants
6 %          and the UTF8 non-7-bit-ascii penalty 
7 %
8
9 \documentclass[twocolumn]{article}
10 \usepackage{amssymb,amsmath,epsfig}
11 \setcounter{page}{1}
12 \sloppy         % better line breaks
13
14 \def\twoauthors#1#2#3#4{\gdef\@address{}
15    \gdef\@name{}}
16
17 \usepackage{palatino}
18 \usepackage{parskip}
19 \bibliographystyle{alpha}
20
21 \title{\textbf{\textsf{
22 Running Legacy C/C++ Libraries in a Pure Java Environment
23 }}}
24 \date{}
25 \author{\begin{tabular}{@{}c@{}}
26         {\em {Adam Megacz}} \\ \\
27         {The XWT Foundation}\relax
28    \end{tabular}\hskip 1in\begin{tabular}{@{}c@{}}
29         {\em {Brian Alliet}} \\ \\
30         {{\it Affiliation Goes Here}}\relax
31 \end{tabular}}
32 \begin{document}
33
34 \maketitle
35
36 \begin{abstract}
37 Abstract
38 \end{abstract}
39
40 \section{Introduction}
41
42 \subsection{Why would you want to do this?}
43
44 \begin{itemize}
45 \item applets
46 \item untrusting servlet containers (mass hosting)
47 \item unsure of deployment architecture
48 \item JNI not available (ie J2ME)
49 \item simplicity
50 \item security against buffer overflows
51 \item True WORA
52 \end{itemize}
53
54
55 \section{Existing Work: Source-to-Source Translation}
56
57 \section{Mips2Java: Binary-to-Binary Translation}
58
59 \subsection{Why MIPS?}
60
61 \subsection{Interpreter}
62
63 \subsection{Compiler}
64
65 \subsection{Advantages (over src2src)}
66 \begin{itemize}
67
68 \item You get to use a {\it real} C/C++ compiler that's been tested
69       for over a decade; it won't choke on flaky code.
70
71 \item You can keep your existing build scripts and source layout (just
72       swap in the new compiler)
73
74 \item Zero post-translation tweaking means that you can change the
75       library (fix bugs, fix security holes, upgrade) without having
76       to remember what tweaks you made last time.
77
78 \end{itemize}
79
80
81 \subsection{Virtualization}
82 \begin{itemize}
83 \item libc
84 \item stdin/stdout
85 \item arvg, argc
86 \item syscalls
87 \end{itemize}
88
89
90 \section{Performance}
91
92 \subsection{Charts}
93
94 (Note that none of these libraries have pure-Java equivalents.)
95
96 \begin{itemize}
97 \item libjpeg
98 \item libfreetype
99 \item libmspack
100 \end{itemize}
101
102 \subsection{Optimizations}
103
104 \begin{itemize}
105 \item trampoline
106 \item optimal method size
107 \item -msingle-float
108 \item -mmemcpy
109 \item fastmem
110 \item local vars for registers (useless)
111 \item -fno-rename-registers
112 \item -ffast-math
113 \item -fno-trapping-math
114 \item -fsingle-precision-constant
115 \item -mfused-madd
116 \item -freg-struct-return
117 \item -freduce-all-givs
118 \item -fno-peephole
119 \item -fno-peephole2
120 \item -fmove-all-movables
121 \item -fno-sched-spec-load
122 \item -fno-sched-spec
123 \item -fno-schedule-insns
124 \item -fno-schedule-insns2
125 \item -fno-delayed-branch
126 \item -fno-function-cse
127 \item -ffunction-sections
128 \item -fdata-sections
129 \item array bounds checking
130 \item -falign-functions=n
131 \item -falign-labels=n
132 \item -falign-loops=n
133 \item -falign-jumps=n
134 \item -fno-function-cse
135 \end{itemize}
136
137 \section{Future Directions}
138
139 \section{Conclusion}
140
141 \section{References}
142
143
144 \end{document}
145