public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* Eliminate PARAMS in include/opcode/cgen.h
@ 2003-08-06 20:52 Michael Meissner
  2003-08-06 21:13 ` Doug Evans
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Meissner @ 2003-08-06 20:52 UTC (permalink / raw)
  To: cgen

This patch eliminates PARAMS from include/opcode/cgen.h.

Note, I waiting for an answer from the copyright clerk so I don't yet have a
valid copyright disclaimer on file at the FSF for bfd/binutils.  I suspect this
can't be applied until all of the paperwork is in place.

2003-08-06  Michael Meissner  <gnu@the-meissners.org>

	* cgen.h: Remove PARAM macro usage in all prototypes.

*** include/opcode/cgen.h.~1~	2003-08-06 16:43:35.000000000 -0400
--- include/opcode/cgen.h	2003-08-06 16:13:38.000000000 -0400
*************** typedef struct {
*** 265,272 ****
     If not it is left alone.
     The result is NULL if success or an error message.  */
  typedef const char * (cgen_parse_fn)
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
! 	      const char **strp_, CGEN_FIELDS *fields_));
  
  /* Insert handler.
     CD is a cpu table descriptor.
--- 265,272 ----
     If not it is left alone.
     The result is NULL if success or an error message.  */
  typedef const char * (cgen_parse_fn)
!   (CGEN_CPU_DESC, const CGEN_INSN *insn_,
!    const char **strp_, CGEN_FIELDS *fields_);
  
  /* Insert handler.
     CD is a cpu table descriptor.
*************** typedef const char * (cgen_parse_fn)
*** 279,287 ****
  
  #ifdef __BFD_H_SEEN__
  typedef const char * (cgen_insert_fn)
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
! 	      CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
! 	      bfd_vma pc_));
  #else
  typedef const char * (cgen_insert_fn) ();
  #endif
--- 279,287 ----
  
  #ifdef __BFD_H_SEEN__
  typedef const char * (cgen_insert_fn)
!   (CGEN_CPU_DESC, const CGEN_INSN *insn_,
!    CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
!    bfd_vma pc_);
  #else
  typedef const char * (cgen_insert_fn) ();
  #endif
*************** typedef const char * (cgen_insert_fn) ()
*** 300,308 ****
  
  #ifdef __BFD_H_SEEN__
  typedef int (cgen_extract_fn)
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
! 	      CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
! 	      CGEN_FIELDS *fields_, bfd_vma pc_));
  #else
  typedef int (cgen_extract_fn) ();
  #endif
--- 300,308 ----
  
  #ifdef __BFD_H_SEEN__
  typedef int (cgen_extract_fn)
!   (CGEN_CPU_DESC, const CGEN_INSN *insn_,
!    CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
!    CGEN_FIELDS *fields_, bfd_vma pc_);
  #else
  typedef int (cgen_extract_fn) ();
  #endif
*************** typedef int (cgen_extract_fn) ();
*** 319,326 ****
  
  #ifdef __BFD_H_SEEN__
  typedef void (cgen_print_fn)
!      PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
! 	      CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
  #else
  typedef void (cgen_print_fn) ();
  #endif
--- 319,326 ----
  
  #ifdef __BFD_H_SEEN__
  typedef void (cgen_print_fn)
!   (CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
!    CGEN_FIELDS *fields_, bfd_vma pc_, int len_);
  #else
  typedef void (cgen_print_fn) ();
  #endif
*************** enum cgen_parse_operand_result
*** 384,392 ****
  
  #ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily.  */
  typedef const char * (cgen_parse_operand_fn)
!      PARAMS ((CGEN_CPU_DESC,
! 	      enum cgen_parse_operand_type, const char **, int, int,
! 	      enum cgen_parse_operand_result *, bfd_vma *));
  #else
  typedef const char * (cgen_parse_operand_fn) ();
  #endif
--- 384,392 ----
  
  #ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily.  */
  typedef const char * (cgen_parse_operand_fn)
!   (CGEN_CPU_DESC,
!    enum cgen_parse_operand_type, const char **, int, int,
!    enum cgen_parse_operand_result *, bfd_vma *);
  #else
  typedef const char * (cgen_parse_operand_fn) ();
  #endif
*************** typedef const char * (cgen_parse_operand
*** 394,404 ****
  /* Set the cgen_parse_operand_fn callback.  */
  
  extern void cgen_set_parse_operand_fn
!      PARAMS ((CGEN_CPU_DESC, cgen_parse_operand_fn));
  
  /* Called before trying to match a table entry with the insn.  */
  
! extern void cgen_init_parse_operand PARAMS ((CGEN_CPU_DESC));
  \f
  /* Operand values (keywords, integers, symbols, etc.)  */
  
--- 394,404 ----
  /* Set the cgen_parse_operand_fn callback.  */
  
  extern void cgen_set_parse_operand_fn
!   (CGEN_CPU_DESC, cgen_parse_operand_fn);
  
  /* Called before trying to match a table entry with the insn.  */
  
! extern void cgen_init_parse_operand (CGEN_CPU_DESC);
  \f
  /* Operand values (keywords, integers, symbols, etc.)  */
  
*************** typedef struct {
*** 453,461 ****
  } CGEN_HW_TABLE;
  
  extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
!      PARAMS ((CGEN_CPU_DESC, const char *));
  extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
!      PARAMS ((CGEN_CPU_DESC, unsigned int));
  
  /* This struct is used to describe things like register names, etc.  */
  
--- 453,461 ----
  } CGEN_HW_TABLE;
  
  extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
!   (CGEN_CPU_DESC, const char *);
  extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
!   (CGEN_CPU_DESC, unsigned int);
  
  /* This struct is used to describe things like register names, etc.  */
  
*************** typedef struct
*** 543,583 ****
  /* Lookup a keyword from its name.  */
  
  const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_name
!   PARAMS ((CGEN_KEYWORD *, const char *));
  
  /* Lookup a keyword from its value.  */
  
  const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
!   PARAMS ((CGEN_KEYWORD *, int));
  
  /* Add a keyword.  */
  
! void cgen_keyword_add PARAMS ((CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *));
  
  /* Keyword searching.
     This can be used to retrieve every keyword, or a subset.  */
  
  CGEN_KEYWORD_SEARCH cgen_keyword_search_init
!   PARAMS ((CGEN_KEYWORD *, const char *));
  const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
!   PARAMS ((CGEN_KEYWORD_SEARCH *));
  
  /* Operand value support routines.  */
  
  extern const char *cgen_parse_keyword
!      PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
  #ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily.  */
  extern const char *cgen_parse_signed_integer
!      PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
  extern const char *cgen_parse_unsigned_integer
!      PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
  extern const char *cgen_parse_address
!      PARAMS ((CGEN_CPU_DESC, const char **, int, int,
! 	      enum cgen_parse_operand_result *, bfd_vma *));
  extern const char *cgen_validate_signed_integer
!      PARAMS ((long, long, long));
  extern const char *cgen_validate_unsigned_integer
!      PARAMS ((unsigned long, unsigned long, unsigned long));
  #endif
  \f
  /* Operand modes.  */
--- 543,583 ----
  /* Lookup a keyword from its name.  */
  
  const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_name
!   (CGEN_KEYWORD *, const char *);
  
  /* Lookup a keyword from its value.  */
  
  const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
!   (CGEN_KEYWORD *, int);
  
  /* Add a keyword.  */
  
! void cgen_keyword_add (CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *);
  
  /* Keyword searching.
     This can be used to retrieve every keyword, or a subset.  */
  
  CGEN_KEYWORD_SEARCH cgen_keyword_search_init
!   (CGEN_KEYWORD *, const char *);
  const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
!   (CGEN_KEYWORD_SEARCH *);
  
  /* Operand value support routines.  */
  
  extern const char *cgen_parse_keyword
!   (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
  #ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily.  */
  extern const char *cgen_parse_signed_integer
!   (CGEN_CPU_DESC, const char **, int, long *);
  extern const char *cgen_parse_unsigned_integer
!   (CGEN_CPU_DESC, const char **, int, unsigned long *);
  extern const char *cgen_parse_address
!   (CGEN_CPU_DESC, const char **, int, int,
!    enum cgen_parse_operand_result *, bfd_vma *);
  extern const char *cgen_validate_signed_integer
!   (long, long, long);
  extern const char *cgen_validate_unsigned_integer
!   (unsigned long, unsigned long, unsigned long);
  #endif
  \f
  /* Operand modes.  */
*************** typedef struct {
*** 705,713 ****
  } CGEN_OPERAND_TABLE;
  
  extern const CGEN_OPERAND * cgen_operand_lookup_by_name
!      PARAMS ((CGEN_CPU_DESC, const char *));
  extern const CGEN_OPERAND * cgen_operand_lookup_by_num
!      PARAMS ((CGEN_CPU_DESC, int));
  \f
  /* Instruction operand instances.
  
--- 705,713 ----
  } CGEN_OPERAND_TABLE;
  
  extern const CGEN_OPERAND * cgen_operand_lookup_by_name
!   (CGEN_CPU_DESC, const char *);
  extern const CGEN_OPERAND * cgen_operand_lookup_by_num
!   (CGEN_CPU_DESC, int);
  \f
  /* Instruction operand instances.
  
*************** typedef struct
*** 1061,1068 ****
  
  /* Return number of instructions.  This includes any added at run-time.  */
  
! extern int cgen_insn_count PARAMS ((CGEN_CPU_DESC));
! extern int cgen_macro_insn_count PARAMS ((CGEN_CPU_DESC));
  
  /* Macros to access the other insn elements not recorded in CGEN_IBASE.  */
  
--- 1061,1068 ----
  
  /* Return number of instructions.  This includes any added at run-time.  */
  
! extern int cgen_insn_count (CGEN_CPU_DESC);
! extern int cgen_macro_insn_count (CGEN_CPU_DESC);
  
  /* Macros to access the other insn elements not recorded in CGEN_IBASE.  */
  
*************** typedef struct cgen_minsn_expansion {
*** 1126,1134 ****
       If the expansion fails (e.g. "no match") NULL is returned.
       Space for the expansion is obtained with malloc.
       It is up to the caller to free it.  */
!   const char * (* fn) PARAMS ((const struct cgen_minsn_expansion *,
! 			       const char *, const char **, int *,
! 			       CGEN_OPERAND **));
  #define CGEN_MIEXPN_FN(ex) ((ex)->fn)
  
    /* Instruction(s) the macro expands to.
--- 1126,1135 ----
       If the expansion fails (e.g. "no match") NULL is returned.
       Space for the expansion is obtained with malloc.
       It is up to the caller to free it.  */
!   const char * (* fn)
!      (const struct cgen_minsn_expansion *,
!       const char *, const char **, int *,
!       CGEN_OPERAND **);
  #define CGEN_MIEXPN_FN(ex) ((ex)->fn)
  
    /* Instruction(s) the macro expands to.
*************** typedef struct cgen_minsn_expansion {
*** 1146,1160 ****
     may contain further macro invocations.  */
  
  extern const char * cgen_expand_macro_insn
!      PARAMS ((CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
! 	      const char *, const char **, int *, CGEN_OPERAND **));
  \f
  /* The assembler insn table is hashed based on some function of the mnemonic
     (the actually hashing done is up to the target, but we provide a few
     examples like the first letter or a function of the entire mnemonic).  */
  
  extern CGEN_INSN_LIST * cgen_asm_lookup_insn
!      PARAMS ((CGEN_CPU_DESC, const char *));
  #define CGEN_ASM_LOOKUP_INSN(cd, string) cgen_asm_lookup_insn ((cd), (string))
  #define CGEN_ASM_NEXT_INSN(insn) ((insn)->next)
  
--- 1147,1161 ----
     may contain further macro invocations.  */
  
  extern const char * cgen_expand_macro_insn
!   (CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
!    const char *, const char **, int *, CGEN_OPERAND **);
  \f
  /* The assembler insn table is hashed based on some function of the mnemonic
     (the actually hashing done is up to the target, but we provide a few
     examples like the first letter or a function of the entire mnemonic).  */
  
  extern CGEN_INSN_LIST * cgen_asm_lookup_insn
!   (CGEN_CPU_DESC, const char *);
  #define CGEN_ASM_LOOKUP_INSN(cd, string) cgen_asm_lookup_insn ((cd), (string))
  #define CGEN_ASM_NEXT_INSN(insn) ((insn)->next)
  
*************** extern CGEN_INSN_LIST * cgen_asm_lookup_
*** 1162,1168 ****
     instruction (the actually hashing done is up to the target).  */
  
  extern CGEN_INSN_LIST * cgen_dis_lookup_insn
!      PARAMS ((CGEN_CPU_DESC, const char *, CGEN_INSN_INT));
  /* FIXME: delete these two */
  #define CGEN_DIS_LOOKUP_INSN(cd, buf, value) cgen_dis_lookup_insn ((cd), (buf), (value))
  #define CGEN_DIS_NEXT_INSN(insn) ((insn)->next)
--- 1163,1169 ----
     instruction (the actually hashing done is up to the target).  */
  
  extern CGEN_INSN_LIST * cgen_dis_lookup_insn
!   (CGEN_CPU_DESC, const char *, CGEN_INSN_INT);
  /* FIXME: delete these two */
  #define CGEN_DIS_LOOKUP_INSN(cd, buf, value) cgen_dis_lookup_insn ((cd), (buf), (value))
  #define CGEN_DIS_NEXT_INSN(insn) ((insn)->next)
*************** typedef struct cgen_cpu_desc
*** 1246,1270 ****
    int int_insn_p;
  
    /* Called to rebuild the tables after something has changed.  */
!   void (*rebuild_tables) PARAMS ((CGEN_CPU_DESC));
  
    /* Operand parser callback.  */
    cgen_parse_operand_fn * parse_operand_fn;
  
    /* Parse/insert/extract/print cover fns for operands.  */
    const char * (*parse_operand)
!      PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
! 	      CGEN_FIELDS *fields_));
  #ifdef __BFD_H_SEEN__
    const char * (*insert_operand)
!      PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
! 	      CGEN_INSN_BYTES_PTR, bfd_vma pc_));
    int (*extract_operand)
!      PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
! 	      CGEN_FIELDS *fields_, bfd_vma pc_));
    void (*print_operand)
!      PARAMS ((CGEN_CPU_DESC, int opindex_, PTR info_, CGEN_FIELDS * fields_,
! 	      void const *attrs_, bfd_vma pc_, int length_));
  #else
    const char * (*insert_operand) ();
    int (*extract_operand) ();
--- 1247,1270 ----
    int int_insn_p;
  
    /* Called to rebuild the tables after something has changed.  */
!   void (*rebuild_tables) (CGEN_CPU_DESC);
  
    /* Operand parser callback.  */
    cgen_parse_operand_fn * parse_operand_fn;
  
    /* Parse/insert/extract/print cover fns for operands.  */
    const char * (*parse_operand)
!     (CGEN_CPU_DESC, int opindex_, const char **, CGEN_FIELDS *fields_);
  #ifdef __BFD_H_SEEN__
    const char * (*insert_operand)
!     (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
!      CGEN_INSN_BYTES_PTR, bfd_vma pc_);
    int (*extract_operand)
!     (CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
!      CGEN_FIELDS *fields_, bfd_vma pc_);
    void (*print_operand)
!     (CGEN_CPU_DESC, int opindex_, PTR info_, CGEN_FIELDS * fields_,
!      void const *attrs_, bfd_vma pc_, int length_);
  #else
    const char * (*insert_operand) ();
    int (*extract_operand) ();
*************** typedef struct cgen_cpu_desc
*** 1280,1298 ****
  #define CGEN_CPU_SIZEOF_FIELDS(cd) ((cd)->sizeof_fields)
  
    /* Set the bitsize field.  */
!   void (*set_fields_bitsize) PARAMS ((CGEN_FIELDS *fields_, int size_));
  #define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
  
    /* CGEN_FIELDS accessors.  */
    int (*get_int_operand)
!        PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
    void (*set_int_operand)
!        PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
  #ifdef __BFD_H_SEEN__
    bfd_vma (*get_vma_operand)
!        PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
    void (*set_vma_operand)
!        PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_));
  #else
    long (*get_vma_operand) ();
    void (*set_vma_operand) ();
--- 1280,1298 ----
  #define CGEN_CPU_SIZEOF_FIELDS(cd) ((cd)->sizeof_fields)
  
    /* Set the bitsize field.  */
!   void (*set_fields_bitsize) (CGEN_FIELDS *fields_, int size_);
  #define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
  
    /* CGEN_FIELDS accessors.  */
    int (*get_int_operand)
!     (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
    void (*set_int_operand)
!     (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_);
  #ifdef __BFD_H_SEEN__
    bfd_vma (*get_vma_operand)
!     (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
    void (*set_vma_operand)
!     (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_);
  #else
    long (*get_vma_operand) ();
    void (*set_vma_operand) ();
*************** typedef struct cgen_cpu_desc
*** 1314,1332 ****
  #define CGEN_PRINT_FN(cd, insn)   (cd->print_handlers[(insn)->opcode->handlers.print])
  
    /* Return non-zero if insn should be added to hash table.  */
!   int (* asm_hash_p) PARAMS ((const CGEN_INSN *));
  
    /* Assembler hash function.  */
!   unsigned int (* asm_hash) PARAMS ((const char *));
  
    /* Number of entries in assembler hash table.  */
    unsigned int asm_hash_size;
  
    /* Return non-zero if insn should be added to hash table.  */
!   int (* dis_hash_p) PARAMS ((const CGEN_INSN *));
  
    /* Disassembler hash function.  */
!   unsigned int (* dis_hash) PARAMS ((const char *, CGEN_INSN_INT));
  
    /* Number of entries in disassembler hash table.  */
    unsigned int dis_hash_size;
--- 1314,1332 ----
  #define CGEN_PRINT_FN(cd, insn)   (cd->print_handlers[(insn)->opcode->handlers.print])
  
    /* Return non-zero if insn should be added to hash table.  */
!   int (* asm_hash_p) (const CGEN_INSN *);
  
    /* Assembler hash function.  */
!   unsigned int (* asm_hash) (const char *);
  
    /* Number of entries in assembler hash table.  */
    unsigned int asm_hash_size;
  
    /* Return non-zero if insn should be added to hash table.  */
!   int (* dis_hash_p) (const CGEN_INSN *);
  
    /* Disassembler hash function.  */
!   unsigned int (* dis_hash) (const char *, CGEN_INSN_INT);
  
    /* Number of entries in disassembler hash table.  */
    unsigned int dis_hash_size;
*************** extern CGEN_CPU_DESC CGEN_SYM (cpu_open)
*** 1381,1461 ****
  
  /* Cover fn to handle simple case.  */
  
! extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1) PARAMS ((const char *mach_name_,
! 						    enum cgen_endian endian_));
  
  /* Close it.  */
  
! extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
  
  /* Initialize the opcode table for use.
     Called by init_asm/init_dis.  */
  
! extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
  
  /* build the insn selection regex.
     called by init_opcode_table */
  
! extern char * CGEN_SYM(build_insn_regex) PARAMS ((CGEN_INSN *insn_));
  
  /* Initialize the ibld table for use.
     Called by init_asm/init_dis.  */
  
! extern void CGEN_SYM (init_ibld_table) PARAMS ((CGEN_CPU_DESC cd_));
  
  /* Initialize an cpu table for assembler or disassembler use.
     These must be called immediately after cpu_open.  */
  
! extern void CGEN_SYM (init_asm) PARAMS ((CGEN_CPU_DESC));
! extern void CGEN_SYM (init_dis) PARAMS ((CGEN_CPU_DESC));
  
  /* Initialize the operand instance table for use.  */
  
! extern void CGEN_SYM (init_opinst_table) PARAMS ((CGEN_CPU_DESC cd_));
  
  /* Assemble an instruction.  */
  
  extern const CGEN_INSN * CGEN_SYM (assemble_insn)
!      PARAMS ((CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
! 	      CGEN_INSN_BYTES_PTR, char **));
  
  extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
! extern int CGEN_SYM (get_mach) PARAMS ((const char *));
  
  /* Operand index computation.  */
  extern const CGEN_INSN * cgen_lookup_insn
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
! 	      CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
! 	      int length_, CGEN_FIELDS *fields_, int alias_p_));
  extern void cgen_get_insn_operands
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
! 	      const CGEN_FIELDS *fields_, int *indices_));
  extern const CGEN_INSN * cgen_lookup_get_insn_operands
!      PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
! 	      CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
! 	      int length_, int *indices_, CGEN_FIELDS *fields_));
  
  /* Cover fns to bfd_get/set.  */
  
  extern CGEN_INSN_INT cgen_get_insn_value
!      PARAMS ((CGEN_CPU_DESC, unsigned char *, int));
  extern void cgen_put_insn_value
!      PARAMS ((CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT));
  
  /* Read in a cpu description file.
     ??? For future concerns, including adding instructions to the assembler/
     disassembler at run-time.  */
  
! extern const char * cgen_read_cpu_file
!      PARAMS ((CGEN_CPU_DESC, const char * filename_));
  
  /* Allow signed overflow of instruction fields.  */
! extern void cgen_set_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
  
  /* Generate an error message if a signed field in an instruction overflows.  */
! extern void cgen_clear_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
  
  /* Will an error message be generated if a signed field in an instruction overflows ? */
! extern unsigned int cgen_signed_overflow_ok_p PARAMS ((CGEN_CPU_DESC));
  
  #endif /* CGEN_H */
--- 1381,1460 ----
  
  /* Cover fn to handle simple case.  */
  
! extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1)
!    (const char *mach_name_, enum cgen_endian endian_);
  
  /* Close it.  */
  
! extern void CGEN_SYM (cpu_close) (CGEN_CPU_DESC);
  
  /* Initialize the opcode table for use.
     Called by init_asm/init_dis.  */
  
! extern void CGEN_SYM (init_opcode_table) (CGEN_CPU_DESC cd_);
  
  /* build the insn selection regex.
     called by init_opcode_table */
  
! extern char * CGEN_SYM(build_insn_regex) (CGEN_INSN *insn_);
  
  /* Initialize the ibld table for use.
     Called by init_asm/init_dis.  */
  
! extern void CGEN_SYM (init_ibld_table) (CGEN_CPU_DESC cd_);
  
  /* Initialize an cpu table for assembler or disassembler use.
     These must be called immediately after cpu_open.  */
  
! extern void CGEN_SYM (init_asm) (CGEN_CPU_DESC);
! extern void CGEN_SYM (init_dis) (CGEN_CPU_DESC);
  
  /* Initialize the operand instance table for use.  */
  
! extern void CGEN_SYM (init_opinst_table) (CGEN_CPU_DESC cd_);
  
  /* Assemble an instruction.  */
  
  extern const CGEN_INSN * CGEN_SYM (assemble_insn)
!   (CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
!    CGEN_INSN_BYTES_PTR, char **);
  
  extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
! extern int CGEN_SYM (get_mach) (const char *);
  
  /* Operand index computation.  */
  extern const CGEN_INSN * cgen_lookup_insn
!   (CGEN_CPU_DESC, const CGEN_INSN * insn_,
!    CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
!    int length_, CGEN_FIELDS *fields_, int alias_p_);
  extern void cgen_get_insn_operands
!   (CGEN_CPU_DESC, const CGEN_INSN * insn_,
!    const CGEN_FIELDS *fields_, int *indices_);
  extern const CGEN_INSN * cgen_lookup_get_insn_operands
!   (CGEN_CPU_DESC, const CGEN_INSN *insn_,
!    CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
!    int length_, int *indices_, CGEN_FIELDS *fields_);
  
  /* Cover fns to bfd_get/set.  */
  
  extern CGEN_INSN_INT cgen_get_insn_value
!   (CGEN_CPU_DESC, unsigned char *, int);
  extern void cgen_put_insn_value
!   (CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT);
  
  /* Read in a cpu description file.
     ??? For future concerns, including adding instructions to the assembler/
     disassembler at run-time.  */
  
! extern const char * cgen_read_cpu_file (CGEN_CPU_DESC, const char * filename_);
  
  /* Allow signed overflow of instruction fields.  */
! extern void cgen_set_signed_overflow_ok (CGEN_CPU_DESC);
  
  /* Generate an error message if a signed field in an instruction overflows.  */
! extern void cgen_clear_signed_overflow_ok (CGEN_CPU_DESC);
  
  /* Will an error message be generated if a signed field in an instruction overflows ? */
! extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC);
  
  #endif /* CGEN_H */


-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Eliminate PARAMS in include/opcode/cgen.h
  2003-08-06 20:52 Eliminate PARAMS in include/opcode/cgen.h Michael Meissner
@ 2003-08-06 21:13 ` Doug Evans
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Evans @ 2003-08-06 21:13 UTC (permalink / raw)
  To: Michael Meissner; +Cc: cgen

Michael Meissner writes:
 > This patch eliminates PARAMS from include/opcode/cgen.h.

Thanks.  I should have said this needs to be forwarded to the
binutils list for approval.  Sorry!

 > Note, I waiting for an answer from the copyright clerk so I don't yet have a
 > valid copyright disclaimer on file at the FSF for bfd/binutils.  I suspect this
 > can't be applied until all of the paperwork is in place.

IMO it can go in right away.
The change isn't of the kind requires a copyright,
regardless of the number of PARAMS removed.
But that's for Nick to decide.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-06 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-06 20:52 Eliminate PARAMS in include/opcode/cgen.h Michael Meissner
2003-08-06 21:13 ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).