aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mep/t-mep
blob: 29c7545724165d4b7654b686e405fd2ccd2edb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- makefile -*-
# GCC makefile fragment for MeP
# Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010, 2011
# Free Software Foundation, Inc.
# Contributed by Red Hat Inc
#
# This file is part of GCC.
#
# GCC is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3.  If not see
# <http://www.gnu.org/licenses/>.  */

# Force genpreds to be rebuilt in case MeP-Integrator changed the predicates

GTM_H = tm.h $(tm_file_list) $(srcdir)/config/mep/mep-intrin.h insn-constants.h

# Use -O0 instead of -O2 so we don't get complex relocations

CRTSTUFF_CFLAGS = -O0 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
  -finhibit-size-directive -fno-inline-functions -fno-exceptions \
  -fno-zero-initialized-in-bss -fno-unit-at-a-time

TCFLAGS = -mlibrary

mep-pragma.o: $(srcdir)/config/mep/mep-pragma.c $(CONFIG_H) $(SYSTEM_H) \
	coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(C_PRAGMA_H) \
	$(CPPLIB_H) hard-reg-set.h output.h $(srcdir)/config/mep/mep-protos.h \
	function.h insn-config.h reload.h $(TARGET_H)
	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<

# profiling support

LIB1ASMSRC = mep/mep-lib1.asm

LIB1ASMFUNCS = _mep_profile \
	       _mep_bb_init_trace \
	       _mep_bb_init \
	       _mep_bb_trace \
	       _mep_bb_increment

# multiply and divide routines

LIB2FUNCS_EXTRA = \
	$(srcdir)/config/mep/mep-lib2.c \
	$(srcdir)/config/mep/mep-tramp.c

MULTILIB_OPTIONS = mel mall-opts mfar
MULTILIB_DIRNAMES = el allopt far

EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o

MD_INCLUDES = \
	$(srcdir)/config/mep/intrinsics.md \
	$(srcdir)/config/mep/predicates.md \
	$(srcdir)/config/mep/constraints.md

mep.o : $(srcdir)/config/mep/mep-intrin.h

# begin-isas
MEP_CORE = ext_core1
MEP_COPRO = ext_cop1_16,ext_cop1_32,ext_cop1_48,ext_cop1_64
# end-isas

# To use this, you must have cgen and cgen/cpu in the same source tree as
# gcc.
cgen-maint :
	S=`cd $(srcdir); pwd`; \
	cd $$S/config/mep && \
	guile -s $$S/../cgen/cgen-intrinsics.scm \
		-s $$S/../cgen \
		$(CGENFLAGS) \
		-a $$S/../cgen/cpu/mep.cpu \
		-m mep,c5 \
		-i mep,$(MEP_CORE),$(MEP_COPRO) \
		-K mep,$(MEP_CORE),$(MEP_COPRO) \
		-M intrinsics.md \
		-N mep-intrin.h \
		-P intrinsics.h

# start-extra-headers
EXTRA_HEADERS = $(srcdir)/config/mep/intrinsics.h \
	$(srcdir)/config/mep/default.h
# end-extra-headers