Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.ibex.nestedvm.JavaSourceCompiler.class Maven / Gradle / Ivy
???? /? ??
??
? ?? ??
?
?
?
?
?? ?? ?? ?? ?? ???
? ?? ?? ???
? ????
? ?
?
?
?
? ?
?
?
?
? ? ? !"#$% ?&' ?( )* +, +- +.
/01
?23
+4
L5
?6789:;
?<=>
??@
?ABCD ?E
FGHIJKL ?MN ?OPQ )R ST
?UVWX ?Y Z- ?[\] Z.^_`abcdefghijklmnopqrstu ?vw ?xyz
){ |} Z~ Z Z,??
??????????? ??? ????
??????????????
????
??
????? ???
???
??
? ??
????????? ??? ???? ????
L???
??
??
?? ??
????
??
L??
/?
L? ? ????
??
???????????????? ?????????????????????????????????????
5?
?? !"#$%&'()*+,-.
?/0
?12345
?6789:;<=>?@ABCDEFGH
?IJKLMNOPQ
?RSTUVWXYZ[\]^
?_`abcdefghijkl ?mnop ?qrs ?tuvwxyz{|}~?????????? runs Ljava/lang/StringBuffer; inits
classLevel out Ljava/io/PrintWriter; indent I indents [Ljava/lang/String;
startOfMethod endOfMethod
relativeAddrs Ljava/util/HashMap; textDone Z
initDataCount unreachable p ()V Code LineNumberTable (Ljava/lang/String;)V pblock (Ljava/lang/StringBuffer;)V F(Lorg/ibex/nestedvm/util/Seekable;Ljava/lang/String;Ljava/io/Writer;)V
Exceptions? _go startMethod (I)V endMethod constant (I)Ljava/lang/String; branch (II)V leaveMethod emitText (ILjava/io/DataInputStream;I)V emitData (ILjava/io/DataInputStream;IZ)V emitBSS emitInstruction (III)V memWrite '(Ljava/lang/String;Ljava/lang/String;)V memRead getFloat getDouble setFloat '(ILjava/lang/String;)Ljava/lang/String; setDouble
SourceFile JavaSourceCompiler.java???? java/lang/StringBuffer?????????????????????????? java/util/HashMap?????? java/io/PrintWriter???? org/ibex/nestedvm/Compiler$Exn Exn InnerClasses .JavaSourceCompiler doesn't support singleFloat???????????? /* This file was generated from ?? by Mips2Java on ?? */?? package ;?? import java.util.*;?? public final class extends ?? { /* program counter */ private int pc = 0;?? private int lastPC = 0; /* General Purpose registers */ private final static int r0 = 0; 2private int r1, r2, r3, r4, r5, r6, r7, 3 r8, r9, r10, r11, r12, r13, r14, r15, 3 r16, r17, r18, r19, r20, r21, r22, r23, 3 r24, r25, r26, r27, r28, r29, r30, r31, hi = 0, lo = 0; /* FP registers */ 2private int f0, f1, f2, f3, f4, f5, f6, f7, 3 f8, f9, f10, f11, f12, f13, f14, f15, 3 f16, f17, f18, f19, f20, f21, f22, f23, 3 f24, f25, f26, f27, f28, f29, f30, f31; /* FP Control Register */ private int fcsr = 0;?? (private final int[] page = readPages[0];????????P?????? .text?? java/io/DataInputStream?????? .data .sdata .rodata .ctors .dtors?? .bss .sbss?? Unknown segment: ?? ;private final void trampoline() throws ExecutionException { while(state == RUNNING) { switch(pc>>>???? ) { tdefault: throw new ExecutionException("invalid address 0x" + Long.toString(this.pc&0xffffffffL,16) + ": r2: " + r2); } public () { super(?? ,?? ); $protected int entryPoint() { return ??????? ; } #protected int heapStart() { return protected int gp() { return ????? &protected int userInfoBase() { return &protected int userInfoSize() { return 9public static void main(String[] args) throws Exception {
me = new (); int status = me.run(" ",args); me.printStats(); System.exit(status); Eprotected void _execute() throws ExecutionException { trampoline(); } ,protected void setCPUState(CPUState state) { r =state.r[ ]; f =state.f[ *hi=state.hi; lo=state.lo; fcsr=state.fcsr; pc=state.pc; ,protected void getCPUState(CPUState state) { state.r[ ]=r state.f[ ]=f *state.hi=hi; state.lo=lo; state.fcsr=fcsr; state.pc=pc;?? private static final ?? symbols = new static {????????? _call_helper _??
symbols.put(" ",new Integer( )); ypublic int lookupSymbol(String symbol) { Integer i = (Integer) symbols.get(symbol); return i==null ? -1 : i.intValue(); } )private HashMap counters = new HashMap(); yprivate void inc(String k) { Long i = (Long)counters.get(k); counters.put(k,new Long(i==null ? 1 : i.longValue() + 1)); } private void printStats() { 8 Iterator i = new TreeSet(counters.keySet()).iterator(); a while(i.hasNext()) { Object o = i.next(); System.err.println("" + o + ": " + counters.get(o)); }?? run_??? case : (); break;
private final void () throws ExecutionException { / * - * / int addr, tmp; for(;;) { switch(pc) {?? : pc=???? ?default: throw new ExecutionException("invalid address 0x" + Long.toString(pc&0xffffffffL,16) + " (got here from 0x" + Long.toString(lastPC&0xffffffffL,16)+")"); _default: throw new ExecutionException("invalid address 0x" + Long.toString(pc&0xffffffffL,16)); /* NOT REACHED */?? N_?? java/lang/Integer????????? private static int = ;
( + ) lastPC = 3throw new ExecutionException("Branch to addr 0x0");?? continue;?? (); return; return;?? Multiple text segments Section on weird boundaries?? java/lang/Error Actually read -1 at ??????? /* pc = *???? Data section on weird boundaries???? \n \r \\ \"?? \?? _data private static final int[] = decodeData(" ",
initPages( true false );
BSS section on weird boundaries clearPages(
insn is -1 /* Next insn is delay slot */
inc("opcode: "); inc("opcode: 0/ = r << >>> >> << (r &0x1f); >>> (r >> (r pc modifying insn in delay slot pc=r r31= pc = #r2 = syscall(r2,r4,r5,r6,r7,r8,r9); if (state != RUNNING) { &throw new ExecutionException("Break"); = hi; hi = r = lo; lo = r { long hilo = (long)(r ) * ((long)r ); hi = (int) (hilo >>> 32); lo = (int) hilo; } { long hilo = (r & 0xffffffffL) * (r & 0xffffffffL); lo = (int) hilo; } %r ; lo = r /r if(r !=0) {
hi = (int)((r & 0xffffffffL) % (r & 0xffffffffL));
lo = (int)((r & 0xffffffffL) / (r & 0xffffffffL)); (ADD (add with oveflow trap) not suported + r (SUB (add with oveflow trap) not suported - r & r | r ^ r = ~(r < r ? 1 : 0; = ((r & 0xffffffffL) < (r & 0xffffffffL)) ? 1 : 0; java/lang/RuntimeException Illegal instruction 0/ < 0) {?? >= 0) { Illegal Instruction 1/ == r != r <= 0) { > 0) { < = (r &0xffffffffL) < ( &0xffffffffL) ? 1 : 0; & | ^ << 16; %TLB/Exception support not implemented = f FCR unavailable = fcsr; fcsr = r if(((fcsr&0x800000)!=0) == ( !=0)) {?? +?? - Math.abs(
; // MOV.S (float)?? switch(fcsr & 3) { case 0: f = (int)Math.floor( !+0.5); break; // Round to nearest case 1: f = (int) ; break; // Round towards zero case 2: f = (int)Math.ceil( (); break; // Round towards plus infinity case 3: f )); break; // Round towards minus infinity fcsr = (fcsr&~0x800000) | (( == ) ? 0x800000 : 0x000000); < <= Invalid Instruction 17/?? // CVS.S.W ((float)f
((double)f .coprocessor 2 and 3 instructions not available
inc("LB"); addr=r addr tmp?? &tmp = (tmp>>>(((~addr)&3)<<3)) & 0xff; 6if((tmp&0x80)!=0) tmp |= 0xffffff00; /* sign extend */ = tmp;
inc("LH"); (tmp = (tmp>>>(((~addr)&2)<<3)) & 0xffff; 8if((tmp&0x8000)!=0) tmp |= 0xffff0000; /* sign extend */ 7&(0x00ffffff>>>(((~addr)&3)<<3)))|(tmp<<((addr&3)<<3));
inc("LW"); 7&(0xffffff00<<((addr&3)<<3)))|(tmp>>>(((~addr)&3)<<3));
inc("SB"); -tmp = (tmp&~(0xff000000>>>((addr&3)<<3)))|((r &0xff)<<(((~addr)&3)<<3));??
inc("SH"); 'tmp = (tmp&(0xffff<<((addr&2)<<3)))|((r &0xffff)<<(((~addr)&2)<<3)); // SWL -tmp = (tmp&(0xffffff00<<(((~addr)&3)<<3)))|(r >>>((addr&3)<<3));
inc("SW"); // SWR +tmp = (tmp&(0x00ffffff>>>((addr&3)<<3)))|(r <<(((~addr)&3)<<3)); =1; Invalid Instruction: at ?? nullPointerCheck( page[( )>>>2] = ?? writePages[( )>>>?? ][(( )>>>2)& ] = unsafeMemWrite( = page[( )>>>2]; = readPages[( = unsafeMemRead( (Float.intBitsToFloat(f )) (Double.longBitsToDouble(((f &0xffffffffL) << 32) | (f &0xffffffffL))) =Float.floatToRawIntBits( #{ long l = Double.doubleToLongBits( = (int)(l >>> 32); f = (int)l; } java/lang/String $org/ibex/nestedvm/JavaSourceCompiler org/ibex/nestedvm/Compiler java/io/IOException println append ,(Ljava/lang/String;)Ljava/lang/StringBuffer; toString ()Ljava/lang/String; print 6(Lorg/ibex/nestedvm/util/Seekable;Ljava/lang/String;)V (Ljava/io/Writer;)V singleFloat
fullClassName Ljava/lang/String; indexOf (I)I lastIndexOf substring (II)Ljava/lang/String; source dateTime runtimeStats runtimeClass
debugCompiler onePage elf Lorg/ibex/nestedvm/util/ELF; org/ibex/nestedvm/util/ELF sheaders SHeader %[Lorg/ibex/nestedvm/util/ELF$SHeader; "org/ibex/nestedvm/util/ELF$SHeader name size java/lang/Math max (II)I equals (Ljava/lang/Object;)Z getInputStream ()Ljava/io/InputStream; (Ljava/io/InputStream;)V methodShift (I)Ljava/lang/StringBuffer; pageSize
totalPages header ELFHeader &Lorg/ibex/nestedvm/util/ELF$ELFHeader; $org/ibex/nestedvm/util/ELF$ELFHeader entry toHex gp Symbol #Lorg/ibex/nestedvm/util/ELF$Symbol; !org/ibex/nestedvm/util/ELF$Symbol userInfo supportCall hashClass getSymtab Symtab %()Lorg/ibex/nestedvm/util/ELF$Symtab; !org/ibex/nestedvm/util/ELF$Symtab symbols $[Lorg/ibex/nestedvm/util/ELF$Symbol; type B binding
startsWith (Ljava/lang/String;)Z maxBytesPerMethod java/lang/Long (JI)Ljava/lang/String;
lessConstants toHex8 get &(Ljava/lang/Object;)Ljava/lang/Object; java/lang/Boolean TRUE Ljava/lang/Boolean; put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
methodMask assumeTailCalls readInt ()I jumpableAddresses Ljava/util/Hashtable; java/util/Hashtable close min readByte ()B (C)Ljava/lang/StringBuffer; toOctal3 nullPointerCheck fastMem pageShift !?? ?? ?? ?? ?? ??
?? ?? ?? ?? ?? ?? ?? ?? ? *? ? ? ? ?? ? 9 !*? ? Y? ? *? 2? +? ? ? ? ? ?? ? $ *? +? ?
? ? ?? ? ? S*+,? *? Y? ? *? Y? ?
*? Y? ? *? *? *? Y? ? *? *? *? Y-? ? ? ? . #
' ? , ? 1 ? <6 A_ F $ R %? ? ?? ? ?*? ?
? Y? ?*? .? ? +*? *? .? ? L*? *? .? `? M?
*? ML*? Y? !? *? "? #? ? $? %? ? ? &+? *? Y? '? +? (? ? ? &*? )? **? &*? +*? Y? ,? ,? -? *? .? /? ? ? &*Y? `? *0? &*1? &*? 2? *3? &*? +*4? &*5? &*6? &*7? &*8? &*9? &*:? &*;? &*? &*?? &*@? &*A? &*? +*? B? *C? &>6*? D? E?? ?*? D? E2:? F:? G? ? ?? G? H`? I>J? K? *? G? LY? M? N? H? O? ?P? K? +Q? K? !R? K? S? K?
T? K? '*? G? LY? M? N? HR? K? U? DV? K?
W? K? *? G? H? X? ? Y? Y? Y? ? ? ? ????*? +**? ? Z*? +*[? &*Y? `? *\? &*Y? `? *? Y? ]? *? ^? _`? ? ? &*Y? `? **? ? Z*a? &*Y? d? *b? &*Y? d? *b? &*Y? d? *b? &*? +*? Y? c? ,? d? ? ? &*Y? `? *? Y? e? *? f? _g? *? h? _i? ? ? &**?
? Z*Y? d? *b? &*? +*? Y? j? *? D? k? l? m? n? ? ? &*? Y? o? ? m? n? ? ? &*? Y? p? *? q? r? m? n? ? ? &*? s? M*? Y? t? *? s? r? m? n? ? ? &*? Y? u? *? s? v? m? n? ? ? &*w? &*Y? `? *? Y? x? ,? y? ,? z? ? ? &*? Y? {? *? ? |? ? ? &*? )? *}? &*~? &*Y? d? *b? &*? +*? &*? +*?? &*Y? `? 6 ? 0*? Y? ?? ? _?? ? _?? ? ? &????6 ? 0*? Y? ?? ? _?? ? _?? ? ? &????*?? &*?? &*Y? d? *b? &*?? &*Y? `? 6 ? 0*? Y? ?? ? _?? ? _(? ? ? &????6 ? 0*? Y? ?? ? _?? ? _(? ? ? &????*?? &*?? &*Y? d? *b? &*? +*? ?? ?*? Y? ?? *? ?? ?? *? ?? z? ? ? &*?? &*Y? `? *? D? ?? ?:6?? l2:? ?? V? ?? M? ??? K? ? ??? ?? 3*? Y? ?? ? ?? ?? ? r? m? ?? ? ? &????*Y? d? *b? &*?? &*? +*? )? +*?? &*?? &*?? &*?? &*?? &*b? &*? +*Y? d? *b? &? ? ? ( + , 0 - F / K 0 M 3 w 4 ? 5 ? 6 ? 7 ? 8 ? : ? ; ? <