xref: /openbmc/qemu/tcg/sparc64/tcg-target-has.h (revision 61d6a8767a5d4cd4fe5086ef98b53614ae099104)
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_add2_i32         1
18 #define TCG_TARGET_HAS_sub2_i32         1
19 #define TCG_TARGET_HAS_qemu_st8_i32     0
20 
21 #define TCG_TARGET_HAS_extr_i64_i32     0
22 #define TCG_TARGET_HAS_add2_i64         1
23 #define TCG_TARGET_HAS_sub2_i64         1
24 
25 #define TCG_TARGET_HAS_qemu_ldst_i128   0
26 
27 #define TCG_TARGET_HAS_tst              1
28 
29 #define TCG_TARGET_extract_valid(type, ofs, len) \
30     ((type) == TCG_TYPE_I64 && (ofs) + (len) == 32)
31 
32 #define TCG_TARGET_sextract_valid  TCG_TARGET_extract_valid
33 
34 #define TCG_TARGET_deposit_valid(type, ofs, len) 0
35 
36 #endif
37