'Set the return address of the current state to a specific address. We assume we are at the beginning of a
function, or in other words, we are about to execute the very first instruction of the function.
:param SimState state: The program state
:param int ret_addr: The return address
:return: None'

def _set_return_address(self, state, ret_addr):

    ret_bvv = state.se.BVV(ret_addr, self.project.arch.bits)
    if (self.project.arch.name in ('X86', 'AMD64')):
        state.stack_push(ret_bvv)
    elif (self.project.arch.name in ('ARMEL', 'ARMHF', 'AARCH64')):
        state.regs.lr = ret_bvv
    elif (self.project.arch.name in ('MIPS32', 'MIPS64')):
        state.regs.ra = ret_bvv
    elif (self.project.arch.name in ('PPC32', 'PPC64')):
        state.regs.lr = ret_bvv
    else:
        l.warning('Return    address    cannot    be    set    for    architecture    %s.    Please    add    corresponding    logic    to    VFG._set_return_address().', self.project.arch.name)
