(self, args, cc)
return reg_args + args + stack_args
Reorder arguments according to the calling convention identified.

        :param set args:   A list of arguments that haven't been ordered.
        :param SimCC cc:    The identified calling convention.
        :return:            A reordered list of args.
Reorder arguments according to the calling convention identified.
Reorder arguments according to the calling convention identified .
def _reorder_args(self, args, cc):
        """
        Reorder arguments according to the calling convention identified.

        :param set args:   A list of arguments that haven't been ordered.
        :param SimCC cc:    The identified calling convention.
        :return:            A reordered list of args.
        """

        reg_args = [ ]

        for reg_name in cc.ARG_REGS:
            try:
                arg = next(iter(a for a in args if isinstance(a, SimRegArg) and a.reg_name == reg_name))
            except StopIteration:
                # have we reached the end of the args list?
                if [ a for a in args if isinstance(a, SimRegArg) ]:
                    # nope
                    arg = SimRegArg(reg_name, self.project.arch.bytes)
                else:
                    break
            reg_args.append(arg)
            if arg in args:
                args.remove(arg)

        stack_args = sorted([a for a in args if isinstance(a, SimStackArg)], key=lambda a: a.stack_offset)
        args = [ a for a in args if not isinstance(a, SimStackArg) ]

        return reg_args + args + stack_args
def _reorder_args ( self , args , cc ) : reg_args = [ ] for reg_name in cc . ARG_REGS : try : arg = next ( iter ( a for a in args if isinstance ( a , SimRegArg ) and a . reg_name == reg_name ) ) except StopIteration : # have we reached the end of the args list? if [ a for a in args if isinstance ( a , SimRegArg ) ] : # nope arg = SimRegArg ( reg_name , self . project . arch . bytes ) else : break reg_args . append ( arg ) if arg in args : args . remove ( arg ) stack_args = sorted ( [ a for a in args if isinstance ( a , SimStackArg ) ] , key = lambda a : a . stack_offset ) args = [ a for a in args if not isinstance ( a , SimStackArg ) ] return reg_args + args + stack_args