xref: /openbmc/qemu/tcg/sparc64/tcg-target-has.h (revision 7498d882cbe39ae7df4315ea006830e640f0d47b)
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_bswap64_i64      0
24 #define TCG_TARGET_HAS_extract2_i64     0
25 #define TCG_TARGET_HAS_add2_i64         1
26 #define TCG_TARGET_HAS_sub2_i64         1
27 
28 #define TCG_TARGET_HAS_qemu_ldst_i128   0
29 
30 #define TCG_TARGET_HAS_tst              1
31 
32 #define TCG_TARGET_extract_valid(type, ofs, len) \
33     ((type) == TCG_TYPE_I64 && (ofs) + (len) == 32)
34 
35 #define TCG_TARGET_sextract_valid  TCG_TARGET_extract_valid
36 
37 #define TCG_TARGET_deposit_valid(type, ofs, len) 0
38 
39 #endif
40