zephyr/arch/sparc/include/offsets_short_arch.h
Martin Åberg 07160fa153 arch: Add SPARC processor architecture
SPARC is an open and royalty free processor architecture.

This commit provides SPARC architecture support to Zephyr. It is
compatible with the SPARC V8 specification and the SPARC ABI and is
independent of processor implementation.

Functionality specific to SPRAC processor implementations should
go in soc/sparc. One example is the LEON3 SOC which is part of this
patch set.

The architecture port is fully SPARC ABI compatible, including trap
handlers and interrupt context.

Number of implemented register windows can be configured.

Some SPARC V8 processors borrow the CASA (compare-and-swap) atomic
instructions from SPARC V9. An option has been defined in the
architecture port to forward the corresponding code-generation option
to the compiler.

Stack size related config options have been defined in sparc/Kconfig
to match the SPARC ABI.

Co-authored-by: Nikolaus Huber <nikolaus.huber.melk@gmail.com>
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00

70 lines
2.1 KiB
C

/*
* Copyright (c) 2019-2020 Cobham Gaisler AB
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_ARCH_SPARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#define ZEPHYR_ARCH_SPARC_INCLUDE_OFFSETS_SHORT_ARCH_H_
#include <offsets.h>
#define _thread_offset_to_y \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_y_OFFSET)
#define _thread_offset_to_l0_and_l1 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l0_and_l1_OFFSET)
#define _thread_offset_to_l2 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l2_OFFSET)
#define _thread_offset_to_l3 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l3_OFFSET)
#define _thread_offset_to_l4 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l4_OFFSET)
#define _thread_offset_to_l5 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l5_OFFSET)
#define _thread_offset_to_l6 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l6_OFFSET)
#define _thread_offset_to_l7 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_l7_OFFSET)
#define _thread_offset_to_i0 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i0_OFFSET)
#define _thread_offset_to_i1 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i1_OFFSET)
#define _thread_offset_to_i2 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i2_OFFSET)
#define _thread_offset_to_i3 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i3_OFFSET)
#define _thread_offset_to_i4 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i4_OFFSET)
#define _thread_offset_to_i5 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i5_OFFSET)
#define _thread_offset_to_i6 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i6_OFFSET)
#define _thread_offset_to_i7 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_i7_OFFSET)
#define _thread_offset_to_o6 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_o6_OFFSET)
#define _thread_offset_to_o7 \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_o7_OFFSET)
#define _thread_offset_to_psr \
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_psr_OFFSET)
#endif /* ZEPHYR_ARCH_SPARC_INCLUDE_OFFSETS_SHORT_ARCH_H_ */