// vi:set ft=cpp: -*- Mode: C++ -*-
/*
 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
 *     economic rights: Technische Universität Dresden (Germany)
 * License: see LICENSE.spdx (in this directory or the directories above)
 */
#pragma once

namespace Ldr {

inline
char *adjust_sp(char *old_sp, l4_umword_t *offs = 0)
{
  if (offs)
    *offs = 0;
  return reinterpret_cast<char *>(reinterpret_cast<l4_umword_t>(old_sp) & ~15);
}

}
