- 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());