1// vi:set ft=cpp: -*- Mode: C++ -*-
2/*
3 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
4 *     economic rights: Technische Universität Dresden (Germany)
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU Lesser General Public License 2.1.
7 * Please see the COPYING-LGPL-2.1 file for details.
8 */
9#pragma once
10
11#include <l4/sys/types.h>
12
13namespace Ldr {
14
15inline
16char *adjust_sp(char *old_sp, l4_umword_t *offs = 0)
17{
18  if (offs)
19    *offs = 0;
20  return (char *)((l4_umword_t)old_sp & ~7);
21}
22
23}
24