Annotation of GNUtools/cc/config/m88k/mot-sysv4.h, revision 1.1

1.1     ! root        1: /* Definitions of target machine for GNU compiler.
        !             2:    Motorola 88100 Delta machine running SVR4
        !             3:    Copyright (C) 1993 Free Software Foundation, Inc.
        !             4: 
        !             5: This file is part of GNU CC.
        !             6: 
        !             7: GNU CC is free software; you can redistribute it and/or modify
        !             8: it under the terms of the GNU General Public License as published by
        !             9: the Free Software Foundation; either version 2, or (at your option)
        !            10: any later version.
        !            11: 
        !            12: GNU CC is distributed in the hope that it will be useful,
        !            13: but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            15: GNU General Public License for more details.
        !            16: 
        !            17: You should have received a copy of the GNU General Public License
        !            18: along with GNU CC; see the file COPYING.  If not, write to
        !            19: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
        !            20: 
        !            21: #include "m88k/sysv4.h"
        !            22: 
        !            23: /* The .init section preamble code on the svr4 m88k Delta system looks like:
        !            24: 
        !            25:                _init:  subu    r31, r31, 0x30
        !            26:                        st      r1, r31, 0x20
        !            27: 
        !            28:    do_global_ctors_aux in crtstuff.c emits do_global_ctors which is put
        !            29:    into the .init section.  However, this function has its own 
        !            30:    prolog which allocates more of the stack.  The epilogue of do_global_ctors
        !            31:    only knows about its own stack allocation, not that in the .init
        !            32:    section preamble.  So we must undo the allocation performed by the .init
        !            33:    section preamble.  We use the following instruction:
        !            34: 
        !            35:                        addu    r31, r31, 0x30
        !            36: 
        !            37:    which is placed immediately after the two instructions shown above
        !            38:    and before do_global_ctors.
        !            39: 
        !            40:    Note that this is a kludge since it depends on knowing the constant
        !            41:    0x30 above.  However, no better fix is known at this time.  */
        !            42:    
        !            43: #undef INIT_SECTION_PREAMBLE
        !            44: #define INIT_SECTION_PREAMBLE  asm ("\taddu\t #r31,#r31,0x30")

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.