xref: /openbmc/qemu/tcg/sparc64/tcg-target-has.h (revision f2b1708e8080ab1beb0a2bf52a79a51e8de335cb)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Define target-specific opcode support
4  * Copyright (c) 2008 Fabrice Bellard
5  */
6 
7 #ifndef TCG_TARGET_HAS_H
8 #define TCG_TARGET_HAS_H
9 
10 #if defined(__VIS__) && __VIS__ >= 0x300
11 #define use_vis3_instructions  1
12 #else
13 extern bool use_vis3_instructions;
14 #endif
15 
16 /* optional instructions */
17 #define TCG_TARGET_HAS_qemu_st8_i32     0
18 #define TCG_TARGET_HAS_extr_i64_i32     0
19 #define TCG_TARGET_HAS_qemu_ldst_i128   0
20 #define TCG_TARGET_HAS_tst              1
21 
22 #define TCG_TARGET_extract_valid(type, ofs, len) \
23     ((type) == TCG_TYPE_I64 && (ofs) + (len) == 32)
24 
25 #define TCG_TARGET_sextract_valid  TCG_TARGET_extract_valid
26 
27 #define TCG_TARGET_deposit_valid(type, ofs, len) 0
28 
29 #endif
30