- a(InstructionConstants.ALOAD_1);
- a(fac.createFieldAccess("org.ibex.nestedvm.Runtime$CPUState","f",new ArrayType(Type.INT,1),GETFIELD));
- a(InstructionConstants.ASTORE_2);
- for(int i=0;i<32;i++) {
- a(InstructionConstants.ALOAD_0);
- a(InstructionConstants.ALOAD_2);
- pushConst(i);
- a(InstructionConstants.IALOAD);
- a(fac.createFieldAccess(fullClassName,"f"+i,Type.INT, PUTFIELD));
- }
- a(InstructionConstants.ALOAD_0);
- a(InstructionConstants.ALOAD_1);
- a(fac.createFieldAccess("org.ibex.nestedvm.Runtime$CPUState","hi",Type.INT,GETFIELD));
- a(fac.createFieldAccess(fullClassName,"hi",Type.INT, PUTFIELD));
- a(InstructionConstants.ALOAD_0);
- a(InstructionConstants.ALOAD_1);
- a(fac.createFieldAccess("org.ibex.nestedvm.Runtime$CPUState","lo",Type.INT,GETFIELD));
- a(fac.createFieldAccess(fullClassName,"lo",Type.INT, PUTFIELD));
- a(InstructionConstants.ALOAD_0);
- a(InstructionConstants.ALOAD_1);
- a(fac.createFieldAccess("org.ibex.nestedvm.Runtime$CPUState","fcsr",Type.INT,GETFIELD));
- a(fac.createFieldAccess(fullClassName,"fcsr",Type.INT, PUTFIELD));
- a(InstructionConstants.ALOAD_0);
- a(InstructionConstants.ALOAD_1);
- a(fac.createFieldAccess("org.ibex.nestedvm.Runtime$CPUState","pc",Type.INT,GETFIELD));
- a(fac.createFieldAccess(fullClassName,"pc",Type.INT, PUTFIELD));
- a(InstructionConstants.RETURN);
- setCPUState.setMaxLocals();
- setCPUState.setMaxStack();
- cl.addMethod(setCPUState.getMethod());
-
- MethodGen getCPUState = newMethod(ACC_PROTECTED,Type.getType("Lorg/ibex/nestedvm/Runtime$CPUState;"),Type.NO_ARGS,"getCPUState");
- selectMethod(getCPUState);
- a(fac.createNew("org.ibex.nestedvm.Runtime$CPUState"));
- a(InstructionConstants.DUP);
- a(fac.createInvoke("org.ibex.nestedvm.Runtime$CPUState","<init>",Type.VOID,Type.NO_ARGS,INVOKESPECIAL));
- a(InstructionConstants.ASTORE_1);