aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2014-11-01 13:34:15 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2014-11-01 13:34:15 +0000
commitb0710fe1b155d3aff0fda3fcff291c09a727ec82 (patch)
treea1d684f3d10d3446cf010b46c1c96adbd1c76a84 /gcc/expr.c
parenta5474c4cb0cd4499437eeffd7223bb7533100d48 (diff)
downloadgcc-b0710fe1b155d3aff0fda3fcff291c09a727ec82.zip
gcc-b0710fe1b155d3aff0fda3fcff291c09a727ec82.tar.gz
gcc-b0710fe1b155d3aff0fda3fcff291c09a727ec82.tar.bz2
2014-11-01 Andrew MacLeod <amacleod@redhat,com>
* optabs.h: Flatten insn-codes.h to source files. Move some prototypes and structs to genopinit.c. Adjust protyoptypes to match optabs.c. * genopinit.c (main): Emit prototypes and structs into insn-opinit.h. * optabs.c: (gen_move_insn): Move to expr.c. * expr.h: Move protypes and enums to optabs.h. * expr.c: (gen_move_insn): Relocate from optabs.c. * genemit.c (main): Include insn-codes.h. * gengtype.c (open_base_files): Include insn-codes.h. * asan.c: Include insn-codes.h. * bb-reorder.c: Ditto. * builtins.c: Ditto. * calls.c: Ditto. * cfgexpand.c: Ditto. * cilk-common.c: Ditto. * combine.c: Ditto. * dojump.c: Ditto. * dse.c: Ditto. * except.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * function.c: Ditto. * ifcvt.c: Ditto. * internal-fn.c: Ditto. * loop-unroll.c: Ditto. * lra.c: Ditto. * modulo-sched.c: Ditto. * omp-low.c: Ditto. * postreload.c: Ditto. * ree.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * shrink-wrap.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * target-globals.c: Ditto. * targhooks.c: Ditto. * toplev.c: Ditto. * tree-if-conv.c: Ditto. * tree-ssa-forwprop.c: Ditto. * tree-ssa-loop-prefetch.c: Ditto. * tree-ssa-math-opts.c: Ditto. * tree-ssa-phiopt.c: Ditto. * tree-ssa-reassoc.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-loop.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vrp.c: Ditto. * value-prof.c: Ditto. * config/aarch64/aarch64-builtins.c: Ditto. * config/alpha/alpha.c: Ditto. * config/arm/arm.c: Ditto. * config/cris/cris.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/m32c/m32c.c: Ditto. * config/mep/mep.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.c: Ditto. * config/nios2/nios2.c: Ditto. * config/pa/pa.c: Ditto. * config/rl78/rl78.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * config/s390/s390.c: Ditto. * config/sh/sh.c: Ditto. * config/sh/sh_treg_combine.cc: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/mul-tables.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/mul-tables.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/vax/vax.c: Ditto. From-SVN: r217005
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index af42b61..f4047c4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
/* Include expr.h after insn-config.h so we get HAVE_conditional_move. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
@@ -3628,6 +3629,21 @@ emit_move_insn (rtx x, rtx y)
return last_insn;
}
+/* Generate the body of an instruction to copy Y into X.
+ It may be a list of insns, if one insn isn't enough. */
+
+rtx
+gen_move_insn (rtx x, rtx y)
+{
+ rtx_insn *seq;
+
+ start_sequence ();
+ emit_move_insn_1 (x, y);
+ seq = get_insns ();
+ end_sequence ();
+ return seq;
+}
+
/* If Y is representable exactly in a narrower mode, and the target can
perform the extension directly from constant or memory, then emit the
move as an extension. */