Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

rcc.asdl (1890B)


      1 -- lcc IR
      2 -- $Id: rcc.asdl 145 2001-10-17 21:53:10Z timo $
      3 module rcc {
      4 
      5 -- Pickles start with an int version number, followed by rcc.program
      6 
      7 program = (int nuids,int nlabels,item* items,interface* interfaces,int argc,string *argv)
      8 
      9 real	= (int msb,int lsb)
     10 
     11 item	= Symbol(symbol symbol)
     12 	| Type(type type)
     13 	attributes(int uid)
     14 
     15 symbol	= (identifier id,int type,int scope,int sclass,int ref,int flags)
     16 
     17 field	= (identifier id,int type,int offset,int bitsize,int lsb)
     18 
     19 enum	= (identifier id,int value)
     20 
     21 type	= INT
     22 	| UNSIGNED
     23 	| FLOAT
     24 	| VOID
     25 	| POINTER(int type)
     26 	| ENUM(identifier tag,enum* ids)
     27 	| STRUCT(identifier tag,field* fields)
     28 	| UNION(identifier tag,field* fields)
     29 	| ARRAY(int type)
     30 	| FUNCTION(int type,int* formals)
     31 	| CONST(int type)
     32 	| VOLATILE(int type)
     33 	attributes(int size,int align)
     34 
     35 interface	= Export(int p)
     36 		| Import(int p)
     37 		| Global(int p,int seg)
     38 		| Local(int uid,symbol p)		-- includes formals
     39 		| Address(int uid,symbol q,int p,int n)
     40 		| Segment(int seg)
     41 		| Defaddress(int p)
     42 		| Deflabel(int label)
     43 		| Defconst(int suffix,int size,int value)
     44 		| Defconstf(int size,real value)
     45 		| Defstring(string s)
     46 		| Space(int n)
     47 		| Function(int f,int* caller,int* callee,int ncalls,interface* codelist)
     48 		| Blockbeg
     49 		| Blockend
     50 		| Forest(node* nodes)
     51 
     52 node	= CNST(int value)
     53 	| CNSTF(real value)
     54 	| ARG(node left,int len,int align)
     55 	| ASGN(node left,node right,int len,int align)
     56 	| CVT(int op,node left,int fromsize)
     57 	| CALL(node left,int type)
     58 	| CALLB(node left,node right,int type)
     59 	| RET
     60 	| ADDRG(int uid)
     61 	| ADDRL(int uid)
     62 	| ADDRF(int uid)
     63 	| Unary(int op,node left)				-- INDIR RET JUMP NEG BCOM
     64 	| Binary(int op,node left,node right)			-- ADD SUB DIV MUL MOD BOR BAND BXOR RSH LSH
     65 	| Compare(int op,node left,node right,int label)	-- EQ NE GT GE LE LT
     66 	| LABEL(int label)
     67 	| BRANCH(int label)
     68 	| CSE(int uid,node node)
     69 	attributes(int suffix,int size)
     70 }