Exemple #1
0
        public LoadedRenamingRule(RegisterRenamingRule rule)
        {
            if (rule.RegisterSetRegex != null)
            {
                RegisterSetRegex = new Regex($"^{rule.RegisterSetRegex}$");
            }
            else
            {
                RegisterSetRegex = null;
            }

            switch (rule.Mode)
            {
            case RegisterRenamingMode.HighLow:
                RegisterRegex = new Regex($"^({rule.RegisterRegex})(H|L)$");
                break;

            case RegisterRenamingMode.WithSuffix:
                RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)_(.*)$");
                break;

            default:
                RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)$");
                break;
            }

            Mode   = rule.Mode;
            Offset = rule.Offset;
        }
Exemple #2
0
        public LoadedRenamingRule(RegisterRenamingRule rule)
        {
            if (rule.RegisterSetRegex != null)
                RegisterSetRegex = new Regex($"^{rule.RegisterSetRegex}$");
            else
                RegisterSetRegex = null;

            switch (rule.Mode)
            {
                case RegisterRenamingMode.HighLow:
                    RegisterRegex = new Regex($"^({rule.RegisterRegex})(H|L)$");
                    break;
                case RegisterRenamingMode.WithSuffix:
                    RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)_(.*)$");
                    break;
                default:
                    RegisterRegex = new Regex($"^({rule.RegisterRegex})([0-9]+)$");
                    break;
            }

            Mode = rule.Mode;
            Offset = rule.Offset;
        }