Commit e3223ea2 by Denis Chertykov Committed by Denis Chertykov

extend.texi: Add ip2k port to description of attribute naked.

	* doc/extend.texi: Add ip2k port to description of attribute
	naked.
	* doc/install.texi (Specific): Add ip2k description.
	* doc/install-old.texi (Configurations): Add ip2k to possible
	cpu types.
	* doc/md.texi: Document ip2k constraints.
	* config/ip2k/crt0.S: New file.
	* config/ip2k/ip2k-protos.h: New file.
	* config/ip2k/ip2k.c: New file.
	* config/ip2k/ip2k.h: New file.
	* config/ip2k/ip2k.md: New file.
	* config/ip2k/libgcc.S: New file.
	* config/ip2k/t-ip2k: New file.

Co-Authored-By: Alan Lehotsky <apl@alum.mit.edu>
Co-Authored-By: Bernd Schmidt <bernds@redhat.com>
Co-Authored-By: Dave Hudson <dave.hudson@ubicom.com>
Co-Authored-By: Frank Ch. Eigler <fche@redhat.com>
Co-Authored-By: Graham Stott <grahams@redhat.com>
Co-Authored-By: Jeff Johnston <jjohnstn@redhat.com>
Co-Authored-By: Matthew Green <mrg@redhat.com>
Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r55122
parent 66b8c57f
Fri Jun 28 17:22:37 2002 Denis Chertykov <denisc@overta.ru>
Frank Ch. Eigler <fche@redhat.com>
Matthew Green <mrg@redhat.com>
Richard Henderson <rtl@redhat.com>
Dave Hudson <dave.hudson@ubicom.com>
Jeff Johnston <jjohnstn@redhat.com>
Alan Lehotsky <apl@alum.mit.edu>
Bernd Schmidt <bernds@redhat.com>
Graham Stott <grahams@redhat.com>
* doc/extend.texi: Add ip2k port to description of attribute
naked.
* doc/install.texi (Specific): Add ip2k description.
* doc/install-old.texi (Configurations): Add ip2k to possible
cpu types.
* doc/md.texi: Document ip2k constraints.
* config/ip2k/crt0.S: New file.
* config/ip2k/ip2k-protos.h: New file.
* config/ip2k/ip2k.c: New file.
* config/ip2k/ip2k.h: New file.
* config/ip2k/ip2k.md: New file.
* config/ip2k/libgcc.S: New file.
* config/ip2k/t-ip2k: New file.
2002-06-30 Hans-Peter Nilsson <hp@bitrange.com>
* config/mmix/mmix.md ("return"): New pattern.
......
;
; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
; Contributed by Red Hat, Inc.
;
; This file is part of GNU CC.
;
; GNU CC 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 2, or (at your option)
; any later version.
;
; In addition to the permissions in the GNU General Public License, the
; Free Software Foundation gives you unlimited permission to link the
; compiled version of this file with other programs, and to distribute
; those programs without any restriction coming from the use of this
; file. (The General Public License restrictions do apply in other
; respects; for example, they cover modification of the file, and
; distribution when not linked into another program.)
;
; GNU CC 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 GNU CC; see the file COPYING. If not, write to
; the Free Software Foundation, 59 Temple Place - Suite 330,
; Boston, MA 02111-1307, USA.
;
.file "crt0.S"
.text
.global __start
.func __start
__start:
clr $ff ; Insure we have a zero available
mov w,#%hi8data(__stack) ; set up stack
mov sph,w ;
mov w,#%lo8data(__stack)
mov spl,w
push #0 ; Set argc/argv.
push #0 ; Only required for testing
push #0 ; purposes and "ansi" main.
push #0
page _main
call _main
push $81 ; use return value to call exit()
push $80
page _exit
call _exit
break ; Should never return
.endfunc
/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Red Hat, Inc and Ubicom, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void asm_file_start PARAMS ((FILE *));
extern void asm_file_end PARAMS ((FILE *));
extern void function_prologue PARAMS ((FILE *, int));
extern void function_epilogue PARAMS ((FILE *, int));
extern int find_one_set_bit_p PARAMS ((HOST_WIDE_INT));
extern int find_one_clear_bit_p PARAMS ((HOST_WIDE_INT));
#ifdef TREE_CODE
extern void unique_section PARAMS ((tree, int));
extern void encode_section_info PARAMS ((tree));
extern void asm_output_section_name PARAMS ((FILE *, tree, const char *,
int));
extern int valid_machine_type_attribute PARAMS ((tree, tree, tree, tree));
extern int valid_machine_decl_attribute PARAMS ((tree, tree, tree, tree));
extern int ip2k_return_pops_args PARAMS ((tree, tree, int));
#endif /* TREE_CODE */
#ifdef RTX_CODE
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int));
extern void machine_dependent_reorg PARAMS ((rtx));
extern int ip2k_address_cost PARAMS ((rtx));
extern int ip2k_extra_constraint PARAMS ((rtx, int));
extern rtx legitimize_address PARAMS ((rtx, rtx, enum machine_mode, rtx));
extern int adjust_insn_length PARAMS ((rtx insn, int len));
extern int default_rtx_costs PARAMS ((rtx, enum rtx_code, enum rtx_code));
extern void asm_output_char PARAMS ((FILE *, rtx));
extern void asm_output_short PARAMS ((FILE *, rtx));
extern void asm_output_byte PARAMS ((FILE *, int));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void print_operand_address PARAMS ((FILE *, rtx));
extern int ip2k_jump_mode PARAMS ((rtx, rtx));
extern void ip2k_split_words PARAMS ((enum machine_mode, enum machine_mode,
rtx *));
extern rtx ip2k_get_low_half PARAMS ((rtx, enum machine_mode));
extern rtx ip2k_get_high_half PARAMS ((rtx, enum machine_mode));
extern int ip2k_nonptr_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_ptr_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_ip_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_short_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_gen_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_nonsp_reg_operand PARAMS ((rtx, enum machine_mode));
extern int ip2k_symbol_ref_operand PARAMS ((rtx, enum machine_mode));
extern const char *ip2k_set_compare PARAMS ((rtx, rtx));
extern const char *ip2k_gen_sCOND PARAMS ((rtx, enum rtx_code, rtx));
extern const char *ip2k_gen_signed_comp_branch PARAMS ((rtx,
enum rtx_code,
rtx));
extern const char *ip2k_gen_unsigned_comp_branch PARAMS ((rtx,
enum rtx_code,
rtx));
extern int is_regfile_address PARAMS ((rtx));
extern int ip2k_mode_dependent_address PARAMS ((rtx));
extern int ip2k_address_uses_reg_p PARAMS ((rtx, unsigned int));
extern int ip2k_xexp_not_uses_reg_p PARAMS ((rtx, unsigned int, int));
extern int ip2k_composite_xexp_not_uses_reg_p PARAMS ((rtx, unsigned int, int));
extern int ip2k_composite_xexp_not_uses_cc0_p PARAMS ((rtx));
extern int ip2k_signed_comparison_operator PARAMS ((rtx,
enum machine_mode));
extern int ip2k_unsigned_comparison_operator PARAMS ((rtx,
enum machine_mode));
extern int ip2k_unary_operator PARAMS ((rtx, enum machine_mode));
extern int ip2k_binary_operator PARAMS ((rtx, enum machine_mode));
extern rtx ip2k_compare_operands[3];
#endif /* RTX_CODE */
#ifdef HAVE_MACHINE_MODES
extern int class_max_nregs PARAMS ((enum reg_class, enum machine_mode));
extern enum reg_class class_likely_spilled_p PARAMS ((int c));
#endif /* HAVE_MACHINE_MODES */
#ifdef REAL_VALUE_TYPE
extern void asm_output_float PARAMS ((FILE *, REAL_VALUE_TYPE));
#endif
extern int ip2k_init_elim_offset PARAMS ((int, int));
extern void ip2k_init_local_alloc PARAMS ((int *));
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = ip2k/libgcc.S
LIB1ASMFUNCS = \
_indcall \
_mulhi3 \
_mulsi3 \
_muldi3 \
_udivmodhi4 \
_divmodhi4 \
_udivmodsi4 \
_divmodsi4 \
_udivmoddi4 \
_divmoddi4 \
_cmpqi2 \
_cmphi2 \
_cmpsi2 \
_cmpdi2 \
_cmpdi2_dp \
_fp_pop_args_ret \
_leaf_fp_pop_args_ret \
_fp_pop2_args_ret \
_leaf_fp_pop2_args_ret \
_movstrhi_countqi \
_movstrhi_counthi \
abort \
_exit
# libgcc...
LIBGCC1_TEST =
# libgcc2.h thinks that nobody would have SI mode when
# MIN_UNITS_PER_WORD == 1, so lie to keep from major compiler errors.
TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -DDF=SF -g -DMIN_UNITS_PER_WORD=2
fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/ip2k/t-ip2k crt0.o
echo '#define FLOAT' > fp-bit.c
echo '#define FLOAT_ONLY' >> fp-bit.c
echo '#define DF SF' >> fp-bit.c
echo '#define DI SI' >> fp-bit.c
echo '#define CMPtype QItype' >> fp-bit.c
echo '#define SMALL_MACHINE' >> fp-bit.c
echo 'typedef int QItype __attribute__ ((mode (QI)));' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
FPBIT = fp-bit.c
# Our crt0 is written in assembler and we don't really support profiling.
CRT0_S = $(srcdir)/config/ip2k/crt0.S
MCRT0_S = $(CRT0_S)
......@@ -2444,9 +2444,9 @@ attribute is present. Interrupts will be disabled inside function.
@item naked
@cindex function without a prologue/epilogue code
Use this attribute on the ARM or AVR ports to indicate that the specified
function do not need prologue/epilogue sequences generated by the
compiler. It is up to the programmer to provide these sequences.
Use this attribute on the ARM, AVR and IP2K ports to indicate that the
specified function do not need prologue/epilogue sequences generated by
the compiler. It is up to the programmer to provide these sequences.
@item model (@var{model-name})
@cindex function addressability on the M32R/D
......
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file install.texi.
......@@ -107,7 +107,7 @@ Here are the possible CPU types:
@quotation
@c gmicro, fx80, spur and tahoe omitted since they don't work.
1750a, a29k, alpha, arm, avr, c@var{n}, clipper, dsp16xx, elxsi, fr30, h8300,
hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, i960, m32r,
hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, i960, ip2k, m32r,
m68000, m68k, m6811, m6812, m88k, mcore, mips, mipsel, mips64, mips64el,
mn10200, mn10300, ns32k, pdp11, powerpc, powerpcle, romp, rs6000, sh, sparc,
sparclite, sparc64, v850, vax, we32k.
......
......@@ -1543,6 +1543,8 @@ GNU Compiler Collection on your machine.
@item
@uref{#*-ibm-aix*,,*-ibm-aix*}
@item
@uref{#ip2k-*-elf,,ip2k-*-elf}
@item
@uref{#m32r-*-elf,,m32r-*-elf}
@item
@uref{#m68000-hp-bsd,,m68000-hp-bsd}
......@@ -2383,6 +2385,17 @@ switch and using the configure option @option{--with-cpu-@var{cpu_type}}.
</p>
<hr>
@end html
@heading @anchor{ip2k-*-elf}ip2k-*-elf
Ubicom IP2022 micro controller.
This configuration is intended for embedded systems.
There are no standard Unix configurations.
Use @samp{configure --target=ip2k-elf --enable-languages=c} to configure GCC@.
@html
</p>
<hr>
@end html
@heading @anchor{m32r-*-elf}m32r-*-elf
Mitsubishi M32R processor.
This configuration is intended for embedded systems.
......
......@@ -1808,6 +1808,76 @@ Memory reference in external OSF/rose PIC format
(@samp{m} is preferable for @code{asm} statements)
@end table
@item IP2K---@file{ip2k.h}
@table @code
@item a
@samp{DP} or @samp{IP} registers (general address)
@item f
@samp{IP} register
@item j
@samp{IPL} register
@item k
@samp{IPH} register
@item b
@samp{DP} register
@item y
@samp{DPH} register
@item z
@samp{DPL} register
@item q
@samp{SP} register
@item c
@samp{DP} or @samp{SP} registers (offsettable address)
@item d
Non-pointer registers (not @samp{SP}, @samp{DP}, @samp{IP})
@item u
Non-SP registers (everything except @samp{SP})
@item R
Indirect thru @samp{IP} - Avoid this except for @code{QImode}, since we
can't access extra bytes
@item S
Indirect thru @samp{SP} or @samp{DP} with short displacement (0..127)
@item T
Data-section immediate value
@item I
Integers from @minus{}255 to @minus{}1
@item J
Integers from 0 to 7---valid bit number in a register
@item K
Integers from 0 to 127---valid displacement for addressing mode
@item L
Integers from 1 to 127
@item M
Integer @minus{}1
@item N
Integer 1
@item O
Zero
@item P
Integers from 0 to 255
@end table
@item Motorola 680x0---@file{m68k.h}
@table @code
@item a
......
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