home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Source / GNU / cctools / as / i860.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-12  |  2.6 KB  |  80 lines

  1. /* i860.h -- Header file for the I860
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.  
  4. This file is part of GAS, the GNU Assembler.
  5.  
  6. GAS is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GAS is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GAS; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19. #ifndef __I860_H__
  20. #define __I860_H__
  21.  
  22. #ifndef NeXT
  23. /*
  24.  * Relocation types used in the I860 implementation.  Symbols in the 
  25.  * data section are easy to relocate, being either a fixed value from
  26.  * the .data origin or some relative value.  The instruction segment is
  27.  * a little different.  The data can be wedged in to all sorts of odd 
  28.  * locations, including multiple disjoint bit fields.  Bletch...
  29.  *
  30.  */
  31.  
  32. enum reloc_type
  33. {
  34.     RELOC_VANILLA,    /* Use the r_length and do byte, word, or longword fixup */
  35.  
  36.     RELOC_PAIR,     RELOC_HIGH,      RELOC_LOW0,     RELOC_LOW1,
  37.     RELOC_LOW2,     RELOC_LOW3,      RELOC_LOW4,     RELOC_SPLIT0,
  38.     RELOC_SPLIT1,   RELOC_SPLIT2,    RELOC_HIGHADJ,  RELOC_BRADDR,
  39.     
  40.     NO_RELOC
  41. };
  42.  
  43. struct reloc_info_i860
  44. {
  45.     unsigned long int r_address;
  46. /*
  47.  * Using bit fields here is a bad idea because the order is not portable. :-(
  48.  */
  49.     unsigned int r_symbolnum    : 24;
  50.     unsigned int r_pcrel    : 1;
  51.     unsigned int r_length   : 2;
  52.     unsigned int r_extern   : 1;
  53.     enum reloc_type r_type  : 4;    /* Hints on what bits to use in relocation. */
  54. };
  55.  
  56. #define relocation_info reloc_info_i860
  57.  
  58. #else defined(NeXT)
  59. /*
  60.  * On the NeXT all of the relocation entries of all the machines are defined
  61.  * in reloc.h but to use GAS and not ifdef lots of code these macros are used.
  62.  */
  63. #define RELOC_VANILLA    I860_RELOC_VANILLA
  64. #define RELOC_PAIR    I860_RELOC_PAIR
  65. #define RELOC_HIGH    I860_RELOC_HIGH
  66. #define RELOC_LOW0    I860_RELOC_LOW0
  67. #define RELOC_LOW1    I860_RELOC_LOW1
  68. #define RELOC_LOW2    I860_RELOC_LOW2
  69. #define RELOC_LOW3    I860_RELOC_LOW3
  70. #define RELOC_LOW4    I860_RELOC_LOW4
  71. #define RELOC_SPLIT0    I860_RELOC_SPLIT0
  72. #define RELOC_SPLIT1    I860_RELOC_SPLIT1
  73. #define RELOC_SPLIT2    I860_RELOC_SPLIT2
  74. #define RELOC_HIGHADJ    I860_RELOC_HIGHADJ
  75. #define RELOC_BRADDR    I860_RELOC_BRADDR
  76. #define NO_RELOC    0x10 /* above the range of r_type:4 */
  77. #endif NeXT
  78.  
  79. #endif /* __I860_H__ */
  80.