2019-02-18 16:42:15 +00:00
|
|
|
#ifndef UTIL_H_
|
|
|
|
#define UTIL_H_
|
|
|
|
|
|
|
|
#include "arith.h"
|
|
|
|
|
1989-02-07 11:04:05 +00:00
|
|
|
struct localvar {
|
|
|
|
struct localvar *next;
|
|
|
|
arith t_offset; /* offset from LocalBase */
|
|
|
|
arith t_size;
|
|
|
|
int t_align;
|
|
|
|
int t_regtype;
|
|
|
|
int t_count;
|
|
|
|
int t_sc; /* storage class */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ALLOCDEF "localvar" 10 */
|
2019-02-18 16:42:15 +00:00
|
|
|
|
|
|
|
void LocalInit(void);
|
|
|
|
arith LocalSpace(arith sz, int al);
|
|
|
|
arith NewLocal(arith sz, int al, int regtype, int sc);
|
|
|
|
void FreeLocal(arith off);
|
|
|
|
void LocalFinish(void);
|
|
|
|
void RegisterAccount(arith offset, arith size, int regtype, int sc);
|
|
|
|
void LoadLocal(arith off, arith sz);
|
|
|
|
void StoreLocal(arith off, arith sz);
|
|
|
|
|
|
|
|
#ifndef LINT
|
|
|
|
void AddrLocal(arith off);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|