gen/genacorn.c
static void alloc_high_reg(int *reg)
{
    unsigned index;
    if (*reg != -1) {
        fprintf(stderr, "Temporary register wasn't previously released\n");
        exit(1);
    }
    for (index = 0; index < num_regs; ++index) {
        if (!reg_in_use[index]) {
            reg_in_use[index] = 1;
            reg_used[index] = 1;
            *reg = regs[index];
            if (*reg < 16) {
                fprintf(stderr, "Ran out of temporary high registers\n");
                exit(1);
            }
            return;
        }
    }
    fprintf(stderr, "Ran out of temporary registers\n");
    exit(1);
}
// Allocate an unused register, starting with high registers.
Allocate an unused register, starting with high registers.
Allocate an unused register starting with high registers .
static void alloc_high_reg(int *reg)
{
    unsigned index;
    if (*reg != -1) {
        fprintf(stderr, "Temporary register wasn't previously released\n");
        exit(1);
    }
    for (index = 0; index < num_regs; ++index) {
        if (!reg_in_use[index]) {
            reg_in_use[index] = 1;
            reg_used[index] = 1;
            *reg = regs[index];
            if (*reg < 16) {
                fprintf(stderr, "Ran out of temporary high registers\n");
                exit(1);
            }
            return;
        }
    }
    fprintf(stderr, "Ran out of temporary registers\n");
    exit(1);
}
static void alloc_high_reg ( int * reg ) { unsigned index ; if ( * reg != -1 ) { fprintf ( stderr , " \n " ) ; exit ( 1 ) ; } for ( index = 0 ; index < num_regs ; ++ index ) { if ( ! reg_in_use [ index ] ) { reg_in_use [ index ] = 1 ; reg_used [ index ] = 1 ; * reg = regs [ index ] ; if ( * reg < 16 ) { fprintf ( stderr , " \n " ) ; exit ( 1 ) ; } return ; } } fprintf ( stderr , " \n " ) ; exit ( 1 ) ; }
Allocate an unused register, starting with high registers.
Allocate an unused register starting with high registers .