Commit cceb575c by Anthony Green Committed by Anthony Green

Commit moxie port.

From-SVN: r148339
parent fd9380a6
......@@ -74,6 +74,7 @@ mips port Richard Sandiford rdsandiford@googlemail.com
mmix port Hans-Peter Nilsson hp@bitrange.com
mn10300 port Jeff Law law@redhat.com
mn10300 port Alexandre Oliva aoliva@redhat.com
moxie port Anthony Green green@moxielogic.com
pdp11 port Paul Koning ni1d@arrl.net
picochip port Hariharan Sandanagobalane hariharan@picochip.com
picochip port Daniel Towner dant@picochip.com
......
2009-06-10 Anthony Green <green@moxielogic.com>
* config/moxie/crti.asm: New file.
* config/moxie/crtn.asm: New file.
* config/moxie/moxie.c: New file.
* config/moxie/moxie.h: New file.
* config/moxie/sfp-machine.h: New file.
* config/moxie/moxie-protos.h: New file.
* config/moxie/t-moxie: Created.
* config/moxie/t-moxie-softfp: Created.
* config/moxie/moxie.md: Created.
* config/moxie/constraints.md: Created.
* config.gcc: Add moxie support.
* doc/md.texi (Machine Constraints): Add moxie constraints.
* doc/contrib.texi (Contributors): Mention moxie port.
* doc/install.texi (Specific): Mention the moxie port.
2009-06-09 Ian Lance Taylor <iant@google.com>
* system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if
......
......@@ -274,6 +274,8 @@ crisv32-*)
;;
frv*) cpu_type=frv
;;
moxie*) cpu_type=moxie
;;
fido-*-*)
cpu_type=m68k
extra_headers=math-68881.h
......@@ -881,6 +883,13 @@ frv-*-*linux*)
linux.h glibc-stdint.h frv/linux.h frv/frv-abi.h"
tmake_file="${tmake_file} frv/t-frv frv/t-linux"
;;
moxie-*-elf)
gas=yes
gnu_ld=yes
tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
;;
h8300-*-rtems*)
tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
......
;; Constraint definitions for Moxie
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Contributed by Anthony Green <green@moxielogic.com>
;; 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/>.
;; -------------------------------------------------------------------------
;; Constraints
;; -------------------------------------------------------------------------
(define_constraint "A"
"An absolute address."
(and (match_code "mem")
(ior (match_test "GET_CODE (XEXP (op, 0)) == SYMBOL_REF")
(match_test "GET_CODE (XEXP (op, 0)) == LABEL_REF")
(match_test "GET_CODE (XEXP (op, 0)) == CONST"))))
(define_constraint "B"
"An offset address."
(and (match_code "mem")
(match_test "GET_CODE (XEXP (op, 0)) == PLUS")))
(define_constraint "W"
"A register indirect memory operand."
(and (match_code "mem")
(match_test "REG_P (XEXP (op, 0))
&& REGNO_OK_FOR_BASE_P (REGNO (XEXP (op, 0)))")))
(define_constraint "I"
"An 8-bit constant (0..255)"
(and (match_code "const_int")
(match_test "ival >= 0 && ival <= 255")))
(define_constraint "N"
"A constant -(0..255)"
(and (match_code "const_int")
(match_test "ival >= -255 && ival <= 0")))
# crti.asm for moxie
#
# Copyright (C) 2009 Free Software Foundation
#
# This file 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.
#
# This file 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.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the GCC Runtime Library Exception, version
# 3.1, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License and
# a copy of the GCC Runtime Library Exception along with this program;
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
# This file just make a stack frame for the contents of the .fini and
# .init sections. Users may put any desired instructions in those
# sections.
.file "crti.asm"
.section ".init"
.global _init
.type _init, @function
.p2align 1
_init:
.section ".fini"
.global _fini
.type _fini,@function
.p2align 1
_fini:
# crtn.asm for moxie
#
# Copyright (C) 2009 Free Software Foundation
#
# This file 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.
#
# This file 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.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the GCC Runtime Library Exception, version
# 3.1, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License and
# a copy of the GCC Runtime Library Exception along with this program;
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
# This file just makes sure that the .fini and .init sections do in
# fact return. Users may put any desired instructions in those sections.
# This file is the last thing linked into any executable.
.file "crtn.asm"
.section ".init"
ret
.section ".fini"
ret
/* Prototypes for moxie.c functions used in the md file & elsewhere.
Copyright (C) 2009 Free Software Foundation, 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/>. */
extern void moxie_expand_prologue (void);
extern void moxie_expand_epilogue (void);
extern int moxie_initial_elimination_offset (int, int);
extern rtx moxie_function_value (tree, tree, bool ATTRIBUTE_UNUSED);
extern void moxie_print_operand (FILE *, rtx, int);
extern void moxie_print_operand_address (FILE *, rtx);
#ifdef RTX_CODE
extern rtx moxie_function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
#endif /* RTX_CODE */
;; Predicate definitions for Moxie
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Contributed by Anthony Green <green@moxielogic.com>
;; 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/>.
;; -------------------------------------------------------------------------
;; Predicates
;; -------------------------------------------------------------------------
;; Nonzero if OP can be source of a simple move operation.
(define_predicate "moxie_general_movsrc_operand"
(match_code "mem,const_int,reg,subreg,symbol_ref,label_ref,const")
{
/* Any (MEM LABEL_REF) is OK. That is a pc-relative load. */
if (MEM_P (op) && GET_CODE (XEXP (op, 0)) == LABEL_REF)
return 1;
if (MEM_P (op)
&& GET_CODE (XEXP (op, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (op, 0), 0)) == REG
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST)
return 1;
return general_operand (op, mode);
})
;; Nonzero if OP can be an operand to an add/inc/dec instruction.
(define_predicate "moxie_add_operand"
(ior (match_code "reg")
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), -255, 255)"))))
;; Nonzero if OP can be an operand to an sub/dec instruction.
(define_predicate "moxie_sub_operand"
(ior (match_code "reg")
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), 0, 255)"))))
\ No newline at end of file
#define _FP_W_TYPE_SIZE 32
#define _FP_W_TYPE unsigned long
#define _FP_WS_TYPE signed long
#define _FP_I_TYPE long
#define _FP_MUL_MEAT_S(R,X,Y) \
_FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_D(R,X,Y) \
_FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_Q(R,X,Y) \
_FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
#define _FP_NANSIGN_S 0
#define _FP_NANSIGN_D 0
#define _FP_NANSIGN_Q 0
#define _FP_KEEPNANFRACP 1
/* Someone please check this. */
#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
do { \
if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
&& !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
{ \
R##_s = Y##_s; \
_FP_FRAC_COPY_##wc(R,Y); \
} \
else \
{ \
R##_s = X##_s; \
_FP_FRAC_COPY_##wc(R,X); \
} \
R##_c = FP_CLS_NAN; \
} while (0)
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
# define __BYTE_ORDER __BIG_ENDIAN
/* Define ALIASNAME as a strong alias for NAME. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
# Target Makefile Fragment for moxie
# Copyright (C) 2008 Free Software Foundation, Inc.
# Contributed by Anthony Green.
#
# 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/>.
softfp_float_modes := sf df
softfp_int_modes := si di
softfp_extensions := sfdf
softfp_truncations := dfsf
softfp_machine_header := moxie/sfp-machine.h
softfp_exclude_libgcc2 := y
# softfp seems to be missing a whole bunch of prototypes.
TARGET_LIBGCC2_CFLAGS += -Wno-missing-prototypes
......@@ -316,7 +316,8 @@ support, improved leaf function register allocation, and his direction
via the steering committee.
@item
Anthony Green for his @option{-Os} contributions and Java front end work.
Anthony Green for his @option{-Os} contributions, the moxie port, and
Java front end work.
@item
Stu Grossman for gdb hacking, allowing GCJ developers to debug Java code.
......
......@@ -3762,6 +3762,13 @@ information about using GCC on IRIX platforms.
@html
<hr />
@end html
@heading @anchor{moxie-x-elf}moxie-*-elf
The moxie processor. See @uref{http://moxielogic.org/} for more
information about this processor.
@html
<hr />
@end html
@heading @anchor{powerpc-x-x}powerpc-*-*
You can specify a default version for the @option{-mcpu=@var{cpu_type}}
......
......@@ -2730,6 +2730,25 @@ Constants in the range @minus{}8 to 2
@end table
@item Moxie---@file{config/moxie/constraints.md}
@table @code
@item A
An absolute address
@item B
An offset address
@item W
A register indirect memory operand
@item I
A constant in the range of 0 to 255.
@item N
A constant in the range of 0 to -255.
@end table
@need 1000
@item SPARC---@file{config/sparc/sparc.h}
@table @code
......
2009-06-10 Anthony Green <green@moxielogic.com>
* testsuite/lib/target-supports.exp (check_profiling_available):
Profiling is not available for testing purposes on moxie.
2009-06-09 Ian Lance Taylor <iant@google.com>
* gcc.dg/Wcxx-compat-12.c: New testcase.
......
......@@ -499,6 +499,7 @@ proc check_profiling_available { test_what } {
|| [istarget m68k-*-elf]
|| [istarget m68k-*-uclinux*]
|| [istarget mips*-*-elf*]
|| [istarget moxie-*-elf*]
|| [istarget xstormy16-*]
|| [istarget xtensa*-*-elf]
|| [istarget *-*-rtems*]
......
2009-05-31 Anthony Green <green@moxielogic.com>
* config.host: Add moxie support.
* config/moxie/t-moxie: New file.
2009-05-29 David Billinghurst <billingd@gcc.gnu.org>
* config.host: Add i386/${host_address}/t-fprules-softfp and
......
......@@ -84,6 +84,8 @@ fido-*-*)
;;
frv*) cpu_type=frv
;;
moxie*) cpu_type=moxie
;;
i[34567]86-*-*)
cpu_type=i386
;;
......@@ -415,6 +417,10 @@ mmix-knuth-mmixware)
;;
mn10300-*-*)
;;
moxie-*-*)
tmake_file=${cpu_type}/t-moxie
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
pdp11-*-*)
;;
picochip-*-*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment