> >The branch instruction is wrong. It should be "branch #num".
> >The offset should be part of instruction, not from register.
> 
> Nope, because that kills the potential for computed relative 
> branches. (It's in there on purpose) Branches should work from 
> both constants and registers.

Even so, the "branch #num" should have better performance, and
it is part of any machine language. Since we already have jump 
instruction, do we really need the "branch %r", which can be
simulated by "add %r, %pc, #num; jump %r".

> >The register set seems too big. It reduces cache efficiency
> >and uses too much stack.
> 
> Yeah, that's something I'm worried about. 64 may be too much. 
> 16 is too few, so we might split the difference and go with 32
> to start.

If we define caller-save and callee save. The 64 register may
not be bad, as long as caller-save set is small.

If we don't define caller/callee save, we can still use 64 
register. However, we need add one tag bit to each function/
stack frame to indicate whether is big frame or small frame.
The big frame uses 64, the small use 16. The reg set is still
64, but the small frame does not use anything beyond 16. So
we don't have to save/restore them.

It is not just for performance, the stack size and cache
locationality are also big issues.

Hong

Reply via email to