annotate gcc/config/pdp11/pdp11-modes.def @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler, for the pdp-11
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2002-2018 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 the Free Software Foundation; either version 3, or (at your option)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 GNU General Public License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 /* Add any extra modes needed to represent the condition code.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
22
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
23 The default CCmode is the CPU condition codes, as set by compare;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
24 all conditional branches are valid with this.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
26 CCNZmode is the CPU condition code as a side effect of arithmetic
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
27 or logic operations where N and Z reflect sign and zero status of
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
28 the result, but the V bit is not meaningful. Unsigned conditional
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
29 branches don't apply then (no such thing when comparing with zero)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
30 and signed branches that use V need to clear V first if they are to
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
31 be used. CCNZ mode appears in side effects (implicit compare with
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
32 zero) if V is not forced to 0 by the instruction. In such cases, V
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
33 often reflects signed overflow of the operation, which means a
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
34 signed branch will get the sign backwards. This applies both to
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
35 some float and integer operations.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
36
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
37 These modes are used both in the FPU and the CPU, since they have
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
38 the same meaning, and also because the FPU condition codes are
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
39 copied to the CPU before being used in conditional branches. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
40
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
41 CC_MODE (CCNZ);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
42
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 RESET_FLOAT_FORMAT (SF, pdp11_f_format);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 RESET_FLOAT_FORMAT (DF, pdp11_d_format);