github.com/goccy/go-jit@v0.0.0-20200514131505-ff78d45cf6af/internal/ccall/jit-reg-class.h (about)

     1  /*
     2   * jit-reg-class.h - Register class routines for the JIT.
     3   *
     4   * Copyright (C) 2006  Southern Storm Software, Pty Ltd.
     5   *
     6   * This file is part of the libjit library.
     7   *
     8   * The libjit library is free software: you can redistribute it and/or
     9   * modify it under the terms of the GNU Lesser General Public License
    10   * as published by the Free Software Foundation, either version 2.1 of
    11   * the License, or (at your option) any later version.
    12   *
    13   * The libjit library is distributed in the hope that it will be useful,
    14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    16   * Lesser General Public License for more details.
    17   *
    18   * You should have received a copy of the GNU Lesser General Public
    19   * License along with the libjit library.  If not, see
    20   * <http://www.gnu.org/licenses/>.
    21   */
    22  
    23  #ifndef	_JIT_REG_CLASS_H
    24  #define	_JIT_REG_CLASS_H
    25  
    26  #include "jit-rules.h"
    27  
    28  #ifdef	__cplusplus
    29  extern	"C" {
    30  #endif
    31  
    32  /*
    33   * Information about a register class.
    34   */
    35  typedef struct
    36  {
    37  	const char	*name;		/* Name of the register class, for debugging */
    38  	int		flags;		/* Register flags */
    39  	int		num_regs;	/* The number of registers in the class */
    40  	int		regs[1];	/* JIT_REG_INFO index for each register */
    41  
    42  } _jit_regclass_t;
    43  
    44  /* Create a register class.  */
    45  _jit_regclass_t *_jit_regclass_create(const char *name, int flags, int num_regs, ...);
    46  
    47  /* Combine two register classes into another one.  */
    48  _jit_regclass_t *_jit_regclass_combine(const char *name, int flags,
    49  				       _jit_regclass_t *class1,
    50  				       _jit_regclass_t *class2);
    51  
    52  /* Free a register class.  */
    53  void _jit_regclass_free(_jit_regclass_t *regclass);
    54  
    55  #ifdef	__cplusplus
    56  };
    57  #endif
    58  
    59  #endif	/* _JIT_REG_CLASS_H */