misc

## misc misc |

## Synopsis

    struct              OrcVariable;
    struct              OrcInstruction;
    struct              OrcRule;
    struct              OrcFixup;
    void                (*OrcRuleEmitFunc)                  (OrcCompiler *p,
                                                             void *user,
                                                             OrcInstruction *insn);
    #define             ORC_N_REGS
    #define             ORC_N_INSNS
    #define             ORC_N_VARIABLES
    #define             ORC_N_REGISTERS
    #define             ORC_N_FIXUPS
    #define             ORC_N_LABELS
    #define             ORC_GP_REG_BASE
    #define             ORC_VEC_REG_BASE
    #define             ORC_STRUCT_OFFSET                   (struct_type,
                                                             member)
    enum                OrcVarType;
    void                orc_powerpc_init                    (void);
    void                orc_arm_init                        (void);
    void                orc_c_init                          (void);
    int                 orc_parse                           (const char *code,
                                                             OrcProgram ***programs);
    #define             ARRAY_SIZE                          (x)
    #define             MAX                                 (a,
                                                             b)
    #define             MIN                                 (a,
                                                             b)
    char *              get_cpuinfo_line                    (char *cpuinfo,
                                                             const char *tag);
    char *              get_file                            (const char *file);
    int                 get_file_int                        (const char *file,
                                                             int *value);
    char *              get_tag_value                       (char *s,
                                                             const char *tag);
    char **             strsplit                            (const char *s,
                                                             char delimiter);

## Description

## Details

### struct OrcVariable

    struct OrcVariable {
    };

The OrcVariable structure has no public members

### struct OrcInstruction

    struct OrcInstruction {
    };

The OrcInstruction structure has no public members

### struct OrcRule

    struct OrcRule {
    };

The OrcRule structure has no public members

### struct OrcFixup

    struct OrcFixup {
    };

The OrcFixup structure has no public members

### OrcRuleEmitFunc ()

    void                (*OrcRuleEmitFunc)                  (OrcCompiler *p,
                                                             void *user,
                                                             OrcInstruction *insn);

### ORC_N_REGS

    #define ORC_N_REGS (32*4)

### ORC_N_INSNS

    #define ORC_N_INSNS 100

### ORC_N_VARIABLES

    #define ORC_N_VARIABLES 64

### ORC_N_REGISTERS

    #define ORC_N_REGISTERS 20

### ORC_N_FIXUPS

    #define ORC_N_FIXUPS 100

### ORC_N_LABELS

    #define ORC_N_LABELS 40

### ORC_GP_REG_BASE

    #define ORC_GP_REG_BASE 32

### ORC_VEC_REG_BASE

    #define ORC_VEC_REG_BASE 64

### ORC_STRUCT_OFFSET()

    #define             ORC_STRUCT_OFFSET(struct_type, member)

### enum OrcVarType

    typedef enum {
      ORC_VAR_TYPE_TEMP,
      ORC_VAR_TYPE_SRC,
      ORC_VAR_TYPE_DEST,
      ORC_VAR_TYPE_CONST,
      ORC_VAR_TYPE_PARAM,
      ORC_VAR_TYPE_ACCUMULATOR
    } OrcVarType;

### orc_powerpc_init ()

    void                orc_powerpc_init                    (void);

### orc_arm_init ()

    void                orc_arm_init                        (void);

### orc_c_init ()

    void                orc_c_init                          (void);

### orc_parse ()

    int                 orc_parse                           (const char *code,
                                                             OrcProgram ***programs);

### ARRAY_SIZE()

    #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))

### MAX()

    #define MAX(a,b) ((a)>(b) ? (a) : (b))

### MIN()

    #define MIN(a,b) ((a)<(b) ? (a) : (b))

### get_cpuinfo_line ()

    char *              get_cpuinfo_line                    (char *cpuinfo,
                                                             const char *tag);

### get_file ()

    char *              get_file                            (const char *file);

### get_file_int ()

    int                 get_file_int                        (const char *file,
                                                             int *value);

### get_tag_value ()

    char *              get_tag_value                       (char *s,
                                                             const char *tag);

### strsplit ()

    char **             strsplit                            (const char *s,
                                                             char delimiter);