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