- ts.setTarget(a(InstructionConstants.POP)); // default case
- a(fac.createNew("org.ibex.nestedvm.Runtime$ExecutionException"));
- a(InstructionConstants.DUP);
- a(fac.createNew("java.lang.StringBuffer"));
- a(InstructionConstants.DUP);
- a(new PUSH(cp,"Jumped to invalid address in trampoline (r2: "));
- a(fac.createInvoke("java.lang.StringBuffer","<init>",Type.VOID,new Type[]{Type.STRING},INVOKESPECIAL));
- a(InstructionConstants.ALOAD_0);
- a(fac.createFieldAccess(fullClassName,"r2",Type.INT, GETFIELD));
- a(fac.createInvoke("java.lang.StringBuffer","append",Type.STRINGBUFFER,new Type[]{Type.INT},INVOKEVIRTUAL));
- a(new PUSH(cp," pc:"));
- a(fac.createInvoke("java.lang.StringBuffer","append",Type.STRINGBUFFER,new Type[]{Type.STRING},INVOKEVIRTUAL));
- a(InstructionConstants.ALOAD_0);
- a(fac.createFieldAccess(fullClassName,"pc",Type.INT, GETFIELD));
- a(fac.createInvoke("java.lang.StringBuffer","append",Type.STRINGBUFFER,new Type[]{Type.INT},INVOKEVIRTUAL));
- a(new PUSH(cp,')'));
- a(fac.createInvoke("java.lang.StringBuffer","append",Type.STRINGBUFFER,new Type[]{Type.CHAR},INVOKEVIRTUAL));
- a(fac.createInvoke("java.lang.StringBuffer","toString",Type.STRING,Type.NO_ARGS,INVOKEVIRTUAL));
- a(fac.createInvoke("org.ibex.nestedvm.Runtime$ExecutionException","<init>",Type.VOID,new Type[]{Type.STRING},INVOKESPECIAL));
- a(InstructionConstants.ATHROW);
-
- stateCheck.setTarget(a(InstructionConstants.RETURN));
-
- tramp.setMaxStack();
- tramp.setMaxLocals();
+ tramp.add(POP);
+ tramp.add(NEW,new Type.Object("org.ibex.nestedvm.Runtime$ExecutionException"));
+ tramp.add(DUP);
+ tramp.add(NEW, Type.STRINGBUFFER);
+ tramp.add(DUP);
+ tramp.add(LDC,"Jumped to invalid address in trampoline (r2: ");
+ tramp.add(INVOKESPECIAL,new MethodRef(Type.STRINGBUFFER,"<init>",Type.VOID,new Type[]{Type.STRING}));
+ tramp.add(ALOAD_0);
+ tramp.add(GETFIELD, new FieldRef(me,"r2",Type.INT));
+ tramp.add(INVOKEVIRTUAL,new MethodRef(Type.STRINGBUFFER,"append",Type.STRINGBUFFER,new Type[]{Type.INT}));
+ tramp.add(LDC," pc: ");
+ tramp.add(INVOKEVIRTUAL,new MethodRef(Type.STRINGBUFFER,"append",Type.STRINGBUFFER,new Type[]{Type.STRING}));
+ tramp.add(ALOAD_0);
+ tramp.add(GETFIELD, new FieldRef(me,"pc",Type.INT));
+ tramp.add(INVOKEVIRTUAL,new MethodRef(Type.STRINGBUFFER,"append",Type.STRINGBUFFER,new Type[]{Type.INT}));
+ tramp.add(LDC,")");
+ tramp.add(INVOKEVIRTUAL,new MethodRef(Type.STRINGBUFFER,"append",Type.STRINGBUFFER,new Type[]{Type.STRING}));
+ tramp.add(INVOKEVIRTUAL,new MethodRef(Type.STRINGBUFFER,"toString",Type.STRING,Type.NO_ARGS));
+ tramp.add(INVOKESPECIAL,new MethodRef(new Type.Object("org.ibex.nestedvm.Runtime$ExecutionException"),"<init>",Type.VOID,new Type[]{Type.STRING}));
+ tramp.add(ATHROW);
+