#
ab54a2e4 |
|
17-Aug-2007 |
Guodong Li <ligd@cs.utah.edu> |
Modify the front-end to produce code mostly consistent with the following grammar prefered by the back-end (except for the shifting operations): let r range over register names (r0,r1,r2,etc), m range over memory locations (m0,m1,m2,etc), f over function names, i over natural numbers (<32) and w over 8-bit word constants. p ::= let r = exp in p | let m = r in p | let (v,v,...,v) = f (v,v,...,v) in p | if g then p else p | (v,v,...,v) | f (v,v,...,v) v ::= r | m g ::= ~ g | r cmp mode | r && mode = 0w cmp ::= = | < | <+ | <= | <=+ exp ::= m | mode | ~ mode | r op mode | r * r op ::= + | - | && | ?? | !! mode ::= w | r | r << i | r >> i | r >>> i
|
#
47749c4e |
|
16-Aug-2007 |
Guodong Li <ligd@cs.utah.edu> |
Customize the front-end to produce code in a format the ARM backend needs Main change: Register allocation and recursive calls. The registers/memory locations in all recursive calls have to be the same, e.g. f(r0,r1) = if .... then ... f(r0,r1) else .... f (r0,r1) This revision is suboptimal however. A new test file "refined_format.sml" is added to illustrate the results
|