diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-21 22:01:24 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-21 22:01:24 +0000 |
commit | ffde65b31066f17eef243be882bb89a6e19370aa (patch) | |
tree | ea876d041c0a63eefccdac5416a8678e75da4cfc /gcc/hard-reg-set.h | |
parent | a8c7acc4db08ce7c8ac3ddcb943f9219e2893792 (diff) | |
download | gcc-ffde65b31066f17eef243be882bb89a6e19370aa.tar.gz |
[.]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
{{merged with trunk -i.e. GCC5.0 in stage4- using
svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk
but should probably have used
svn merge -r209216:219879 ^/trunk
we don't use svnmerge.py anymore since our svn is version 1.8.10
}}
VERY UNSTABLE
2015-01-20 Basile Starynkevitch <basile@starynkevitch.net>
Move previous topdir ChangeLog.MELT to ChangeLog.MELT.2008-2014
[contrib/]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
* MELT-Plugin-Makefile: Able to make upgrade-melt as a
plugin. Works for GCC 5.0. Remove GCC 4.7 old stuff.
Move previous contrib/ChangeLog.MELT to ChangeLog.MELT.2008-2014
[gcc/]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
{{merged with trunk -i.e. GCC5.0 in stage4- using
svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk
but should probably have used
svn merge -r209216:219879 ^/trunk
**@@@ UNSTABLE since libmelt-ana-gimple.melt not compiling, but
translator painfully bootstrapping!!@@@@ }}
* toplev.c: Merged manually by keeping MELT extra stuff.
* toplev.h: Likewise.
* gengtype.c: Add "melt-runtime.h" in list, but merged with trunk.
* melt-runtime.h (MELT_VERSION_STRING): Bump to "1.2-pre-merged".
(meltgc_walk_gimple_seq): Remove.
(gt_ggc_mx_gimple_statement_d): Same for GCC 4.9 & 5.0
* melt-runtime.cc: Update copyright year.
(ggc_alloc_cleared_melt_valuevector_st, melt_resize_scangcvect):
Call ggc_internal_cleared_alloc.
(melt_val2passflag): Skip TODO_verify_ssa, TODO_verify_flow,
TODO_verify_stmts, TODO_verify_rtl_sharing for GCC 5.0.
(meltgc_walkstmt_cb, meltgc_walktree_cb)
(melt_tree_walk_frame_size, meltgc_walk_gimple_seq): Remove.
(melt_gt_ggc_mx_gimple_seq_d): Call
gt_ggc_mx_gimple_statement_base.
* melt-build-script.tpl: Update copyright year. Don't symlink
meltrunsup.h anymore.
* melt-build-script.sh: Regenerate.
* melt/warmelt-base.melt: Update copyright year.
(valdesc_object, valdesc_mapobjects, valdesc_mapstrings)
(valdesc_multiple, valdesc_closure, valdesc_routine, valdesc_hook)
(valdesc_bucketlongs, valdesc_jsonobject, valdesc_string)
(valdesc_strbuf, valdesc_pair, valdesc_list, valdesc_int)
(valdesc_double, valdesc_mixint, valdesc_mixloc)
(valdesc_mixbigint, valdesc_real, valdesc_special_data): Use
ggc_internal_alloc & ggc_internal_cleared_alloc for GCC 5.0.
(json_canonical_name): Use ISUPPER, ISALPHA, TOUPPER instead of
their standard <ctype.h> lowercase macros.
* melt/warmelt-modes.melt: Update copyright year.
(generate_runtypesupport_forwcopy_fun): Emit both GCC 4.9 & 5.0
compatible code.
* melt/libmelt-ana-base.melt: Update copyright year.
* melt/libmelt-ana-gimple.melt: TO BE IMPROVED
* melt/generated/*: Painfully regenerated several times thru GCC
4.9 MELT plugin.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@219975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hard-reg-set.h')
-rw-r--r-- | gcc/hard-reg-set.h | 84 |
1 files changed, 59 insertions, 25 deletions
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h index b8ab3df7a15..d1a6e51508c 100644 --- a/gcc/hard-reg-set.h +++ b/gcc/hard-reg-set.h @@ -1,5 +1,5 @@ /* Sets (bit vectors) of hard registers, and operations on them. - Copyright (C) 1987-2014 Free Software Foundation, Inc. + Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GCC @@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_HARD_REG_SET_H #define GCC_HARD_REG_SET_H +#include "hash-table.h" + /* Define the type of a set of hard registers. */ /* HARD_REG_ELT_TYPE is a typedef of the unsigned integral type which @@ -168,32 +170,38 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ scan_tp_[1] = -1; } while (0) #define COPY_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = scan_fp_[0]; \ scan_tp_[1] = scan_fp_[1]; } while (0) #define COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = ~ scan_fp_[0]; \ scan_tp_[1] = ~ scan_fp_[1]; } while (0) #define AND_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= scan_fp_[0]; \ scan_tp_[1] &= scan_fp_[1]; } while (0) #define AND_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= ~ scan_fp_[0]; \ scan_tp_[1] &= ~ scan_fp_[1]; } while (0) #define IOR_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= scan_fp_[0]; \ scan_tp_[1] |= scan_fp_[1]; } while (0) #define IOR_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= ~ scan_fp_[0]; \ scan_tp_[1] |= ~ scan_fp_[1]; } while (0) @@ -236,37 +244,43 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ scan_tp_[2] = -1; } while (0) #define COPY_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = scan_fp_[0]; \ scan_tp_[1] = scan_fp_[1]; \ scan_tp_[2] = scan_fp_[2]; } while (0) #define COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = ~ scan_fp_[0]; \ scan_tp_[1] = ~ scan_fp_[1]; \ scan_tp_[2] = ~ scan_fp_[2]; } while (0) #define AND_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= scan_fp_[0]; \ scan_tp_[1] &= scan_fp_[1]; \ scan_tp_[2] &= scan_fp_[2]; } while (0) #define AND_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= ~ scan_fp_[0]; \ scan_tp_[1] &= ~ scan_fp_[1]; \ scan_tp_[2] &= ~ scan_fp_[2]; } while (0) #define IOR_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= scan_fp_[0]; \ scan_tp_[1] |= scan_fp_[1]; \ scan_tp_[2] |= scan_fp_[2]; } while (0) #define IOR_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= ~ scan_fp_[0]; \ scan_tp_[1] |= ~ scan_fp_[1]; \ scan_tp_[2] |= ~ scan_fp_[2]; } while (0) @@ -316,42 +330,48 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ scan_tp_[3] = -1; } while (0) #define COPY_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = scan_fp_[0]; \ scan_tp_[1] = scan_fp_[1]; \ scan_tp_[2] = scan_fp_[2]; \ scan_tp_[3] = scan_fp_[3]; } while (0) #define COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] = ~ scan_fp_[0]; \ scan_tp_[1] = ~ scan_fp_[1]; \ scan_tp_[2] = ~ scan_fp_[2]; \ scan_tp_[3] = ~ scan_fp_[3]; } while (0) #define AND_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= scan_fp_[0]; \ scan_tp_[1] &= scan_fp_[1]; \ scan_tp_[2] &= scan_fp_[2]; \ scan_tp_[3] &= scan_fp_[3]; } while (0) #define AND_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] &= ~ scan_fp_[0]; \ scan_tp_[1] &= ~ scan_fp_[1]; \ scan_tp_[2] &= ~ scan_fp_[2]; \ scan_tp_[3] &= ~ scan_fp_[3]; } while (0) #define IOR_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= scan_fp_[0]; \ scan_tp_[1] |= scan_fp_[1]; \ scan_tp_[2] |= scan_fp_[2]; \ scan_tp_[3] |= scan_fp_[3]; } while (0) #define IOR_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ scan_tp_[0] |= ~ scan_fp_[0]; \ scan_tp_[1] |= ~ scan_fp_[1]; \ scan_tp_[2] |= ~ scan_fp_[2]; \ @@ -402,37 +422,43 @@ do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ *scan_tp_++ = -1; } while (0) #define COPY_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ = *scan_fp_++; } while (0) #define COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ = ~ *scan_fp_++; } while (0) #define AND_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ &= *scan_fp_++; } while (0) #define AND_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ &= ~ *scan_fp_++; } while (0) #define IOR_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ |= *scan_fp_++; } while (0) #define IOR_COMPL_HARD_REG_SET(TO, FROM) \ -do { HARD_REG_ELT_TYPE *scan_tp_ = (TO), *scan_fp_ = (FROM); \ +do { HARD_REG_ELT_TYPE *scan_tp_ = (TO); \ + const HARD_REG_ELT_TYPE *scan_fp_ = (FROM); \ int i; \ for (i = 0; i < HARD_REG_SET_LONGS; i++) \ *scan_tp_++ |= ~ *scan_fp_++; } while (0) @@ -589,7 +615,11 @@ hard_reg_set_iter_next (hard_reg_set_iterator *iter, unsigned *regno) extern char global_regs[FIRST_PSEUDO_REGISTER]; +struct simplifiable_subregs_hasher; + struct target_hard_regs { + void finalize (); + /* The set of registers that actually exist on the current target. */ HARD_REG_SET x_accessible_reg_set; @@ -664,6 +694,10 @@ struct target_hard_regs { /* Vector indexed by hardware reg giving its name. */ const char *x_reg_names[FIRST_PSEUDO_REGISTER]; + + /* Records which registers can form a particular subreg, with the subreg + being identified by its outer mode, inner mode and offset. */ + hash_table <simplifiable_subregs_hasher> *x_simplifiable_subregs; }; extern struct target_hard_regs default_target_hard_regs; |