Package com.litecoding.smali2java.entity.smali

Examples of com.litecoding.smali2java.entity.smali.Register


    return group;
 

  private Object generateRegisterFromRule(Rule rule) {
    Rule testRule = rule;
    Register register = new Register();
   
    if(rule instanceof Rule_codeRegister ||
        rule instanceof Rule_codeRegister64) {
      testRule = rule.rules.get(0);
    }
   
    if(rule instanceof Rule_codeRegisterRet ||
        rule instanceof Rule_codeRegisterRet64) {
      testRule = rule.rules.get(0);
      register.setType(currentMethod.getReturnType());
      register.info.isFinallyDefined = true;
    }
   
    if(testRule instanceof Rule_codeRegisterP ||
        testRule instanceof Rule_codeRegisterP64)
      register.setParameter(true);
   
    if(testRule instanceof Rule_codeRegisterVDst ||
        testRule instanceof Rule_codeRegisterV64Dst)
      register.setDestination(true);
   
    if(testRule instanceof Rule_codeRegisterP64 ||
        testRule instanceof Rule_codeRegisterV64 ||
        testRule instanceof Rule_codeRegisterV64Dst)
      register.set64bit(true);
   
    register.setName(rule.spelling);
    register.mapRegister(currentMethod);
   
    return register;
  }
View Full Code Here


      }

     
      for(SmaliCodeEntity entity : instruction.getArguments()) {
        if(entity instanceof Register) {
          Register var = (Register) entity;
          boolean is64bit = var.info.is64bit;
          if(var.isParameter()) {
            int idx = var.getMappedId();
            RegisterTimeline.setRegisterRWFlags(currSlice,
                idx,
                BOOL_TRUE,
                BOOL_KEEP,
                is64bit);
          } else {
            int idx = var.getId();
            if(var.isDestination()) {
              //There are one or none destination registers.
              //So, fill the type by dstType value
              RegisterTimeline.setRegisterRWFlags(currSlice,
                  idx,
                  BOOL_KEEP,
                  BOOL_TRUE,
                  is64bit);
              currSlice.get(idx).type = dstType;
              if(is64bit) {
                currSlice.get(idx + 1).type = dstType;
              }
            } else {
              RegisterTimeline.setRegisterRWFlags(currSlice,
                  idx,
                  BOOL_TRUE,
                  BOOL_KEEP,
                  is64bit);
            }
          }
        } else if(entity instanceof RegisterGroup) {
          //TODO: Check 64bit registers here
          for(SmaliCodeEntity subEntity : entity.getArguments()) {
            Register var = (Register) subEntity;
            int idx = -1;
            if(var.isParameter())
              idx = var.getMappedId();
            else
              idx = var.getId();
             
            RegisterTimeline.setRegisterRWFlags(currSlice,
                idx,
                BOOL_TRUE,
                BOOL_KEEP,
View Full Code Here

TOP

Related Classes of com.litecoding.smali2java.entity.smali.Register

Copyright © 2018 www.massapicom. 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.