blob: 124a989280ed432dc9f792fc2cdc5bdb3d506792 (
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
30
31
32
33
34
|
//===----- riscv_mips.h - RISC-V MIPS Intrinsic definitions
//----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef __RISCV_MIPS_H
#define __RISCV_MIPS_H
#if !defined(__riscv)
#error "This header is only meant to be used on riscv architecture"
#endif
#define __DEFAULT_FN_ATTRS \
__attribute__((__always_inline__, __nodebug__, __target__("xmipsexectl")))
static __inline__ void __DEFAULT_FN_ATTRS __mips_pause() {
__builtin_riscv_mips_pause();
}
static __inline__ void __DEFAULT_FN_ATTRS __mips_ehb() {
__builtin_riscv_mips_ehb();
}
static __inline__ void __DEFAULT_FN_ATTRS __mips_ihb() {
__builtin_riscv_mips_ihb();
}
#undef __DEFAULT_FN_ATTRS
#endif
|