55c5063c61
These headers all use TARGET_CPU_H as header guard symbol. Reuse of the same guard symbol in multiple headers is okay as long as they cannot be included together. Since we can avoid guard symbol reuse easily, do so: use guard symbol $target_TARGET_CPU_H for linux-user/$target/target_cpu.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
28 lines
727 B
C
28 lines
727 B
C
/*
|
|
* UniCore32 specific CPU ABI and functions for linux-user
|
|
*
|
|
* Copyright (C) 2010-2012 Guan Xuetao
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation, or (at your option) any
|
|
* later version. See the COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef UNICORE32_TARGET_CPU_H
|
|
#define UNICORE32_TARGET_CPU_H
|
|
|
|
static inline void cpu_clone_regs(CPUUniCore32State *env, target_ulong newsp)
|
|
{
|
|
if (newsp) {
|
|
env->regs[29] = newsp;
|
|
}
|
|
env->regs[0] = 0;
|
|
}
|
|
|
|
static inline void cpu_set_tls(CPUUniCore32State *env, target_ulong newtls)
|
|
{
|
|
env->regs[16] = newtls;
|
|
}
|
|
|
|
#endif
|