Back to index

cell-binutils  2.17cvs20070401
tc-maxq.h
Go to the documentation of this file.
00001 /* tc-maxq.h -- Header file for the assembler(MAXQ)
00002 
00003    Copyright 2004, 2005  Free Software Foundation, Inc.
00004 
00005    Contributed by HCL Technologies Pvt. Ltd.
00006 
00007    Written by Vineet Sharma(vineets@noida.hcltech.com) Inderpreet
00008    S.(inderpreetb@noida.hcltech.com)
00009 
00010    This file is part of GAS.
00011 
00012    GAS is free software; you can redistribute it and/or modify it under the
00013    terms of the GNU General Public License as published by the Free Software
00014    Foundation; either version 2, or (at your option) any later version.
00015 
00016    GAS is distributed in the hope that it will be useful, but WITHOUT ANY
00017    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00018    FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00019    details.
00020 
00021    You should have received a copy of the GNU General Public License along
00022    with GAS; see the file COPYING.  If not, write to the Free Software
00023    Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00024 
00025 #ifndef  _TC_MAXQ_H_
00026 #define  _TC_MAXQ_H_
00027 
00028 #ifndef NO_RELOC
00029 #define NO_RELOC 0
00030 #endif
00031 
00032 /* `md_short_jump_size' `md_long_jump_size' `md_create_short_jump'
00033    `md_create_long_jump' If `WORKING_DOT_WORD' is defined, GAS will not do
00034    broken word processing (*note Broken words::.).  Otherwise, you should set
00035    `md_short_jump_size' to the size of a short jump (a jump that is just long
00036    enough to jump around a long jmp) and `md_long_jump_size' to the size of a
00037    long jump (a jump that can go anywhere in the function), You should define
00038    `md_create_short_jump' to create a short jump around a long jump, and
00039    define `md_create_long_jump' to create a long jump.  */
00040 #define WORKING_DOT_WORD
00041 typedef enum _RELOC_ENUM
00042 {
00043   MAXQ_WORDDATA = 5,        /* Word+n.  */
00044   MAXQ_LONGDATA = 2,        /* Long+n.  */
00045   MAXQ_INTERSEGMENT = 4,    /* Text to any other segment.  */
00046   MAXQ_SHORTJUMP = BFD_RELOC_16_PCREL_S2, /* PC Relative.  */
00047   MAXQ_LONGJUMP = 6,        /* Absolute Jump.  */
00048   EXTERNAL_RELOC = 8,
00049   INTERSEGMENT_RELOC
00050 }
00051 RELOC_ENUM;
00052 
00053 #ifndef MAX_STACK
00054 #define MAX_STACK 0xf
00055 #endif
00056 
00057 #ifndef TC_MAXQ20
00058 #define TC_MAXQ20 1
00059 #endif
00060 
00061 #ifndef MAX_OPERAND_SIZE
00062 #define MAX_OPERAND_SIZE 255
00063 #endif
00064 
00065 #ifndef MAXQ_INSTRUCTION_SIZE
00066 #define MAXQ_INSTRUCTION_SIZE 2    /* 16 - BITS */
00067 #endif
00068 
00069 #if MAXQ_INSTRUCTION_SIZE
00070 #define MAXQ_OCTETS_PER_BYTE       MAXQ_INSTRUCTION_SIZE
00071 #else
00072 #define MAXQ_OCTETS_PER_BYTE       OCTETS_PER_BYTE
00073 #endif
00074 
00075 /* if this macro is defined gas will use this instead of comment_chars.  */
00076 #define tc_comments_chars maxq20_comment_chars
00077 
00078 #define tc_coff_symbol_emit_hook(a)     ; /* not used */
00079 
00080 #define md_section_align(SEGMENT, SIZE)     (SIZE)
00081 
00082 /* Locally defined symbol shoudnot be adjusted to section symbol.  */
00083 #define tc_fix_adjustable(FIX) 0
00084 
00085 /* This specifies that the target has been defined as little endian -
00086    default.  */
00087 #define TARGET_BYTES_BIG_ENDIAN 0
00088 
00089 #define MAX_MEM_NAME_SIZE 12
00090 #define MAX_REG_NAME_SIZE  7
00091 #define MAX_MNEM_SIZE      8
00092 
00093 #define END_OF_INSN '\0'
00094 
00095 /* This macro is the BFD archetectureto pass to 'bfd_set_arch_mach'.  */
00096 #define TARGET_ARCH         bfd_arch_maxq
00097 
00098 /* This macro is the BFD machine number to pass to 'bfd_set_arch_mach'.
00099    If not defines GAS will use 0.  */
00100 #define TARGET_MACH         maxq20_mach ()
00101 extern unsigned long maxq20_mach (void);
00102 
00103 #ifndef LEX_AT
00104 /* We define this macro to generate a fixup for a data allocation pseudo-op.  */
00105 #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) maxq20_cons_fix_new (FRAG,OFF,LEN,EXP)
00106 extern void maxq20_cons_fix_new (fragS *, unsigned int, unsigned int, expressionS *);
00107 #endif
00108 
00109 /* Define md_number_to_chars as the appropriate standard big endian or This
00110    should just call either `number_to_chars_bigendian' or
00111    `number_to_chars_littleendian', whichever is appropriate.  On targets like 
00112    the MIPS which support options to change the endianness, which function to 
00113    call is a runtime decision.  On other targets, `md_number_to_chars' can be 
00114    a simple macro.  */
00115 #define md_number_to_chars maxq_number_to_chars
00116 extern void maxq_number_to_chars (char *, valueT, int);
00117 
00118 /* If this macro is defined, it is a pointer to a NULL terminated list of
00119    characters which may appear in an operand. GAS already assumes that all
00120    alphanumeric characters, and '$', '.', and '_' may appear in an
00121    operand("symbol_char"in app.c). This macro may be defined to treat
00122    additional characters as appearing in an operand. This affects the way in
00123    which GAS removes whitespaces before passing the string to md_assemble.  */
00124 #define tc_symbol_chars_extra_symbol_chars
00125 
00126 /* Define away the call to md_operand in the expression parsing code. This is 
00127    called whenever the expression parser can't parse the input and gives the
00128    assembler backend a chance to deal with it instead.  */
00129 #define md_operand(x)
00130 
00131 #define MAX_OPERANDS           2   /* Max operands per instruction.  */
00132 #define MAX_IMMEDIATE_OPERANDS 1   /* Max immediate operands per instruction.  */
00133 #define MAX_MEMORY_OPERANDS    1   /* Max memory operands per instruction.  */
00134 
00135 /* Define the prefix we are using while trying to use an immediate value in
00136    an instruction. e.g move A[0], #03h.  */
00137 #define IMMEDIATE_PREFIX '#'
00138 
00139 #define ABSOLUTE_PREFIX '@'
00140 
00141 /* This here defines the opcode of the nop operation on the MAXQ. We did
00142    declare it here when we tried to fill the align bites with nop's but GAS
00143    only expects nop's to be single byte instruction.  */
00144 #define NOP_OPCODE (char)0xDA3A
00145 
00146 #define SIZE_OF_PM sizeof(pmodule) /* Size of the structure.  */
00147 
00148 #endif /* TC_MAXQ_H */