Commit 1b992148 by Steve Chamberlain Committed by Jeff Law

configure.in: Add pj target.

        * configure.in: Add pj target.
        * configure: Regenerate.
        * config/pj: New directory.
        * config/pj/lib1funcs.S: New file.
        * config/pj/linux.h: New file.
        * config/pj/pj.c: New file.
        * config/pj/pj.md: New file.
        * config/pj/pjl.h: New file.
        * config/pj/t-pj: New file.
        * config/pj/xm-pj.h: New file

From-SVN: r31225
parent 67e1e279
Tue Jan 4 22:55:41 2000 Steve Chamberlain <sac@pobox.com>
* configure.in: Add pj target.
* configure: Regenerate.
* config/pj: New directory.
* config/pj/lib1funcs.S: New file.
* config/pj/linux.h: New file.
* config/pj/pj.c: New file.
* config/pj/pj.md: New file.
* config/pj/pjl.h: New file.
* config/pj/t-pj: New file.
* config/pj/xm-pj.h: New file
Tue Jan 4 22:30:16 2000 Jeffrey A Law (law@cygnus.com)
* toplev.c (rest_of_compilation): Run shorten-branches before
......
! lib1funcs.S for picoJava.
! Copyright (C) 2000 Free Software Foundation, Inc.
!
! 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 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.)
!
! 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.
!
! You should have received a copy of the GNU General Public License
! along with this program; see the file COPYING. If not, write to
! the Free Software Foundation, 59 Temple Place - Suite 330,
! Boston, MA 02111-1307, USA.
!
! As a special exception, if you link this library with files
! compiled with GCC to produce an executable, this does not cause
! the resulting executable to be covered by the GNU General Public License.
! This exception does not however invalidate any other reasons why
! the executable file might be covered by the GNU General Public License.
!
#ifdef Lvhelper
! The vhelper copies unnamed args in a varargs function from the
! opstack onto the aggregate stack. It is a bit tricky since the
! opstack does not exist in real memory, so can not have its address taken,
! and since the opstack is being played with, there is nowhere to stick
! the temporaries.
.globl __vhelper
__vhelper:
! incoming
! vars-> named0
! named1
! ...
! unnamed0
! unnamed1
! ...
! pc
! vars
! #named
! return pc
! work out total size everything below the named args and
! allocate that space on the aggregate stack + 3 extra words
! for some temps.
! g0 = old g0
! g0+4 = vars
! g0+8 = pc
! g0+12 = last unnamed arg
! ....
write_global1
write_global2
! tos = #named args provided by callee.
! move down the aggstack to make room for all the unnamed args
! and the 12 bytes of extra stuff we have to pay attention to.
! g0 = old_g0 - ((vars - optop) + named_bytes + 12) - stuff we just pushed
! build new global0
read_global0
read_vars
read_optop
isub ! tos = vars - optop (# bytes in all args)
bipush 4
isub ! subtract out fudge for current stuff on stack.
read_global2
isub ! subtract out # words named.
isub
dup
dup
! store old global0 in new global0 spot.
read_global0
swap
store_word
! store new global0 value into global0
write_global0
! work out address to stop copying, which is vars - #named args bytes
! but since we will have pushed stuff onto the stack when the comparison
! is made, adjust by the fudge factor.
read_vars
read_global2
bipush 12
iadd
isub
! optop= finish, vars, pc, ...
! now pop off args from the opstack and copy to aggstack till all done.
! during the loop the opstack looks like
! (optop_finish_addr) (destination_addr) (named_n) (named_n-1) ....
! each iteration pops off one more element.
again:
dup_x2
read_optop
if_icmpeq done
iconst_4
iadd
dup_x2
store_word
goto again
done:
dup2_x1 ; pop2 ; pop !leave pointer on top.
! return to caller with varargs pointer as
! the next argument and the restoring global0 as the next.
read_global0 ; load_word
! restore returning pc and vars
read_global0 ; bipush 8; iadd; load_word
read_global0 ; bipush 4; iadd; load_word
! return to caller.
read_global1
write_pc
#endif
#ifdef __LITTLE_ENDIAN__
#define AL iload_1
#define AH iload_0
#define BL iload_3
#define BH iload_2
#else
#define AL iload_0
#define AH iload_1
#define BL iload_2
#define BH iload_3
#endif
#ifdef Lpjucmpdi2
! like ucmpdi2, but returns <0,0,>0 depending on comparison input.
! and returns answer on the stack, not in global1. - much like an
! actual lucmp instruction would do if there was one.
! big little
!
! vars-> 0 a low high
! 1 a high low
! 2 b low high
! 3 b high low
!
! compares a to b
! a > b return 1
! a = b return 0
! a < b return -1
.globl __pjucmpdi2
__pjucmpdi2:
! first see if we can compare the numbers using
! the signed instruction.
AH
BH
if_icmpne high_words_diff
AL
BL
iucmp
return1
! and low word if high word is equal.
high_words_diff:
AH
BH
iucmp
return1
#endif
/* Definitions for a picoJava Linux-based GNU system.
Copyright (C) 2000 Free Software Foundation, 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. */
/* contributed by Steve Chamberlain, of Transmeta. sac@pobox.com. */
#define TARGET_LITTLE_ENDIAN_DEFAULT 1
#undef CPP_PREDEFINES
#undef STARTFILE_SPEC
#undef ENDFILE_SPEC
#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__pj__ -Dlinux -Asystem(posix)"
#define STARTFILE_SPEC "crt1.o%s crti.o%s crtbegin.o%s"
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef WCHAR_TYPE_SIZE
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/* Prototypes for pj.c functions used in the md file & elsewhere.
Copyright (C) 2000 Free Software Foundation, 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. */
void pj_expand_prologue PARAMS ((void));
void pj_expand_epilogue PARAMS ((void));
void pj_asm_output_opcode PARAMS ((FILE *, const char *));
#ifdef RTX_CODE
extern rtx pj_cmp_op0;
extern rtx pj_cmp_op1;
extern enum machine_mode pj_cmp_mode;
extern int pj_stuff_on_line;
extern const char *pj_standard_float_constant PARAMS ((rtx));
extern int pj_source_operand PARAMS ((rtx op, enum machine_mode mode));
extern int pj_signed_comparison_operator PARAMS ((rtx, enum machine_mode));
extern int pj_unsigned_comparison_operator PARAMS ((rtx, enum machine_mode));
extern rtx pj_workout_arg_words PARAMS ((rtx, rtx));
extern void pj_machine_dependent_reorg PARAMS ((rtx));
extern void pj_print_operand PARAMS ((FILE * stream, rtx x, int code));
extern char *pj_output_addsi3 PARAMS ((rtx * operands));
#ifdef TREE_CODE
extern rtx pj_expand_builtin_va_arg PARAMS ((tree valist, tree type));
extern rtx pj_function_incoming_arg PARAMS ((CUMULATIVE_ARGS * args_so_far,
enum machine_mode promote_mode,
tree passed_type,
int named_arg));
#endif
#endif
#define TARGET_LITTLE_ENDIAN_DEFAULT 1
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = pj/lib1funcs.S
LIB1ASMFUNCS = vhelper pjucmpdi2
LIB2FUNCS_EXTRA =
# For svr4 we build crtbegin.o and crtend.o which serve to add begin and
# end labels to the .ctors and .dtors section when we link using gcc.
EXTRA_PARTS=crtbegin.o crtend.o
/* Configuration for GNU C-compiler for picoJava.
Copyright (C) 2000 Free Software Foundation, 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. */
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 8
#define HOST_BITS_PER_SHORT 16
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
......@@ -513,6 +513,9 @@ changequote([,])dnl
mips*-*-*)
cpu_type=mips
;;
pj*-*-*)
cpu_type=pj
;;
powerpc*-*-*)
cpu_type=rs6000
;;
......@@ -2911,6 +2914,16 @@ changequote([,])dnl
# xmake_file=pyr/x-pyr
# use_collect2=yes
# ;;
pj*-linux*)
tm_file="svr4.h pj/linux.h ${tm_file}"
;;
pj-*)
;;
pjl-*)
tm_file="svr4.h pj/pjl.h ${tm_file}"
;;
romp-*-aos*)
use_collect2=yes
;;
......
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