Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/cris/cris-modes.def @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 /* Definitions of target machine for GNU compiler, for CRIS. | |
2 Copyright (C) 2002-2020 Free Software Foundation, Inc. | |
3 | |
4 This file is part of GCC. | |
5 | |
6 GCC is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation; either version 3, or (at your option) | |
9 any later version. | |
10 | |
11 GCC is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GCC; see the file COPYING3. If not see | |
18 <http://www.gnu.org/licenses/>. */ | |
19 | |
20 /* Node: Condition Code */ | |
21 | |
22 /* The mode used for condition-codes depends on both the way the | |
23 condition-codes are generated (the CC-setter, typically the compare | |
24 instruction), and used (the CC-user, typically a branch). For CRIS, we | |
25 have ordinary compares and incidental condition-code settings from | |
26 preceding instructions, setting a subset of N, Z, V and C to usable | |
27 values, from the perspective of comparing the result against zero | |
28 (fpcraz). The two subsets meaningful to gcc are all of N, Z, V, C | |
29 versus just N, Z; some CC-users care only about N and/or Z and some | |
30 that care about at least one of those flags together with V and/or C. | |
31 | |
32 The plain "CC_MODE (CC)" (which is always present in gcc), is used to | |
33 reflect the "unoptimized" state, where the CC-setter is a compare | |
34 against zero and the CC-user is any branch or s<condition> instruction, | |
35 before reload. After reload, a need for C or V is reflected as | |
36 CC_NZVCmode in both setters and users, and others remain CCmode, until | |
37 or if optimization of CC-setter and CC-users, when CCmode setters can | |
38 be changed or replaced by either CC_NZmode or CC_NZVCmode. To wit, all | |
39 users that require CC_NZVCmode must match only that mode at any time. | |
40 All other users must match all CCmodes. All setters that set only | |
41 CC_NZmode must set only that mode. All other setters must match | |
42 setting all CCmodes. */ | |
43 | |
44 /* Z and N flags only. For a condition-code setter: only the Z and N | |
45 flags are set to usable values, fpcraz. For a condition-code user: the | |
46 operation using the condition codes only care about the Z and N flags. */ | |
47 CC_MODE (CC_NZ); | |
48 | |
49 /* Z and N *and* V and C flags. For a condition-code setter: all flags | |
50 are set to usable values, fpcraz. For a condition-code user: at least | |
51 one of V and C are used and possibly N and Z too. */ | |
52 CC_MODE (CC_NZVC); | |
53 | |
54 /* The result of a btst / btstq instruction for extracting a single bit | |
55 goes negated into the N flag, or in olde cc0-parlance, CC_Z_IN_NOT_N. */ | |
56 CC_MODE (CC_ZnN); |