Examples of Opcode


Examples of com.strobel.reflection.emit.OpCode

        }
        else {
            compareType = equalityOperand.getType();
        }

        final OpCode opCode;

        emitRelationalBranchOp(op, compareType, branch, label);
    }
View Full Code Here

Examples of fr.xlim.ssd.capmanipulator.library.bytecodereader.OpCode

            //we search in the map defining the bytecode if whe have the value read
            if (mBytecode.containsKey(methodInfo.getBytecodes().get(i))) {


                //we clone the object describing the opcode in the map
                OpCode myOp = (OpCode) mBytecode.get(methodInfo.getBytecodes().get(i)).clone();

                //we add it in our opcodeMap
                methodInfo.getOpcodeMap().put((short) (i + byteCodeOffset), myOp);

                i++;

                //we'll read the argument of the opcode
                for (Argument a : myOp.getArguments()) {
                    a.setValue(new byte[a.getSize()]);

                    for (int j = 0; j < a.getSize(); j++) {
                        a.getValue()[j] = methodInfo.getBytecodes().get(i++);
                    }
                }


                // specific case management
                // we will manage the case of opcode wich have
                // a variable number of argument
                switch (myOp.getValue()) {

                    case 0x73:    //case of stableswitch
                    case 0x74:    //case of itableswitch
                        short low = (short) ((myOp.getArguments().get(1).getValue()[0] << 8) | myOp.getArguments().get(1).getValue()[1]);
                        short high = (short) ((myOp.getArguments().get(2).getValue()[0] << 8) | myOp.getArguments().get(2).getValue()[1]);


                        //whe should add (high - low) + 1 pairs in the argument array
                        for (int j = 0; j < (high - low) + 1; j++) {

                            //we get the value of the pair
                            byte[] value = new byte[2];
                            value[0] = methodInfo.getBytecodes().get(i++);
                            value[1] = methodInfo.getBytecodes().get(i++);

                            Offset o = new Offset(value, (short) 2, true, Destination.BYTECODE);
                            myOp.getArguments().add(o);

                        }

                        break;

                    case 0x75: //case of slookupswitch
                    case 0x76: //case of ilookupswitch
                        short npair = (short) (myOp.getArguments().get(1).getValue()[0] >> 8 | myOp.getArguments().get(1).getValue()[1]);

                        for (int j = 0; j < npair; j++) {
                            //we create the operand describing the matchByte 1 and 2
                            byte[] value = new byte[2];
                            value[0] = methodInfo.getBytecodes().get(i++);
                            value[1] = methodInfo.getBytecodes().get(i++);

                            Operand op = new Operand(value, (short) 2, true);
                            myOp.getArguments().add(op);


                            //we create the offset
                            value=new byte[2];
                            value[0] = methodInfo.getBytecodes().get(i++);
                            value[1] = methodInfo.getBytecodes().get(i++);

                            Offset off = new Offset(value, (short) 2, true, Destination.BYTECODE);
                            myOp.getArguments().add(off);
                        }

                        break;

View Full Code Here

Examples of fr.xlim.ssd.capmanipulator.library.bytecodereader.OpCode

                    }
                }
                for (j = taille; j < 6; j++)
                    ret.append(" ");
                //ret.append(CurrentEntry.getValue());
                OpCode op = CurrentEntry.getValue();
                ret.append(String.format("%-16s", op.getName()));
                if (op.getName().equals("checkcast")) {
                    Argument a = op.getArguments().get(0);
                    int val = getValue(a);
                    switch (val) {
                        case 10:
                            ret.append("T_BOOLEAN");
                            break;
                        case 11:
                            ret.append("T_BYTE");
                            break;
                        case 12:
                            ret.append("T_SHORT");
                            break;
                        case 13:
                            ret.append("T_INT");
                            break;
                        case 14:
                            ret.append("T_REFERENCE");
                            break;
                        default :
                            ret.append("unknown");
                            break;
                    }
                    ret.append(" , index: ").append(op.getArguments().get(1));
                }
                else if (op.getName().equals("invokeinterface")) {
                    ret.append(" nargs : ").append(op.getArguments().get(0)).append(",index : 0 const: ");
                    ret.append(op.getArguments().get(1)).append(",method: ").append(op.getArguments().get(2));
                }
                else if (op.getName().equals("newarray")) {
                    Argument a = op.getArguments().get(0);
                    int val = getValue(a);
                    switch (val) {
                        case 10:
                            ret.append("boolean ");
                            break;
                        case 11:
                            ret.append("byte    ");
                            break;
                        case 12:
                            ret.append("short   ");
                            break;
                        case 13:
                            ret.append("int     ");
                            break;
                    }
                }
                else if (op.getName().equals("slookupswitch")) {
                    ret.append("\n//   default: goto ").append(calculateGoto(CurrentEntry.getKey(), getValue(op.getArguments().get(0)), labels));
                    ret.append("\n//   npairs : ").append(op.getArguments().get(1));
                    for (j = 2; j < op.getArguments().size() - 1; j += 2) {
                        ret.append("\n//   case ").append(op.getArguments().get(j)).append(": goto ");
                        ret.append(calculateGoto(CurrentEntry.getKey(), getValue(op.getArguments().get(j + 1)), labels));
                    }
                }
                else if (op.getName().equals("stableswitch")) {
                    ret.append("\n//   default: goto ").append(calculateGoto(CurrentEntry.getKey(), getValue(op.getArguments().get(0)), labels));
                    int low = getValue(op.getArguments().get(1));
                    int high = getValue(op.getArguments().get(2));
                    ret.append("\n//   low    : 0x").append(Integer.toHexString(low)).append(" //").append(low);
                    ret.append("\n//   high   : 0x").append(Integer.toHexString(high)).append(" //").append(high);
                    for (j = 3; low <= high; j++, low++) {
                        ret.append("\n//   case ").append(low).append(" : goto ");
                        ret.append(calculateGoto(CurrentEntry.getKey(), getValue(op.getArguments().get(j)), labels));
                    }
                }
                else {
                    for (j = 0; j < op.getArguments().size(); j++) {
                        if (j != 0)
                            ret.append(", ");
                        if (op.getArguments().get(j) instanceof Offset) {
                            ret.append(calculateGoto(CurrentEntry.getKey(), getValue(op.getArguments().get(j)), labels));
                        }
                        else
                            ret.append(op.getArguments().get(j));
                    }
                }
                ret.append(rl);
            }
            ret.append("}");
View Full Code Here

Examples of info.s5d.assembly.instruction.Instruction.Opcode

    return opcodeToToken.get(opcode);
  }
 
  public Instruction getInstructionByToken(String token)
  {
    Opcode opcode = getOpcodeByToken(token);
    if (opcode == null)
      return null;
   
    return Instruction.getInstructionByOpcode(opcode);
  }
View Full Code Here

Examples of org.adoptopenjdk.jitwatch.model.bytecode.Opcode

      {
        if (mouseEvent.getButton().equals(MouseButton.PRIMARY))
        {
          if (mouseEvent.getClickCount() == 2)
          {
            Opcode opcode = instruction.getOpcode();

            browseMnemonic(opcode);
          }
          else if (mouseEvent.getClickCount() == 1)
          {
View Full Code Here

Examples of org.apache.directory.server.dns.messages.OpCode

   
   
    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
View Full Code Here

Examples of org.apache.directory.server.dns.messages.OpCode

   
   
    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
View Full Code Here

Examples of org.apache.directory.server.dns.messages.OpCode


    private static String monitorMessage( DnsMessage message, String direction )
    {
        MessageType messageType = message.getMessageType();
        OpCode opCode = message.getOpCode();
        ResponseCode responseCode = message.getResponseCode();
        int transactionId = message.getTransactionId();

        StringBuffer sb = new StringBuffer();
        sb.append( "Monitoring " + direction + ":" );
View Full Code Here

Examples of org.freud.analysed.classbytecode.method.instruction.Opcode

        final Instruction[] found = new Instruction[1];
        analysed.findInstruction(new AbstractInstructionVisitor() {
            @Override
            public void noArgInstruction(final Instruction instruction) {
                for (int i = 0; i < opcodes.length; i++) {
                    Opcode opcode = opcodes[i];
                    if (instruction.getOpcode() == opcode) {
                        found[0] = instruction;
                        break;
                    }
                }
View Full Code Here

Examples of org.freud.analysed.classbytecode.method.instruction.Opcode

        final Instruction instruction = new Instruction(instructionList.size(), OPCODES_ARRAY[opcode], currentLineNumber);
        updateCurrentState(instruction);
    }

    public void visitIntInsn(final int opcodeUsed, final int operand) {
        final Opcode opcode = OPCODES_ARRAY[opcodeUsed];
        final Instruction instruction;
        if (opcode == Opcode.NEWARRAY) {
            instruction = new ReferenceOperandInstruction(instructionList.size(), opcode, currentLineNumber, NEWARRAY_TYPES[operand]);
        }
        else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.