summaryrefslogtreecommitdiff
path: root/libcpu/rh850/common/rh850_asm.h
blob: 97ff5b02125754309202503fd1bef0a360b3bdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2026, Linumiz
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2026-11-06     Parthiban    first version
 */

#ifndef __RH850_ASM_H__
#define __RH850_ASM_H__

#include "rh850_sysreg.h"

/* GCC v850 puts __USER_LABEL_PREFIX__ ("_") in front of C symbols */
#define RH850_CAT2(a, b) a##b
#define RH850_CAT(a, b)  RH850_CAT2(a, b)
#define C_SYM(s)         RH850_CAT(__USER_LABEL_PREFIX__, s)

/* clang-format off */
#ifdef __ASSEMBLER__
    .macro rh850_stsr id, sel, reg
    stsr    \id, \reg, \sel
    .endm
#endif
/* clang-format on */

#endif