[Mono-devel-list] [mini] 64bit mini patch

Laurent Morichetti l_m at pacbell.net
Thu Nov 6 22:07:36 EST 2003


Attached is a patch to get mini up on 64bit platforms. I also tested it on
x86 and did not see any performance/tests degradation with it applied.
Here's how it works:

In order to track the registers that might contain a pointer, I added a new
non-terminal "regp". All the rules that consume/produce pointers are now
using this new non-terminal instead of the regular "reg". I also added a new
opcode (OP_REGPTR) for physical registers and OP_PCALL for a call that
returns a pointer.

On ILP32 platforms there is a direct equivalence between "reg" and "regp"
regp: reg "0"
reg: regp "0"

On LP64 platforms there is a direct equivalence between "lreg" and "regp"
and a conversion rule for "regp" promotion from "reg" (sign extension)
lreg: regp "0"
regp: lreg "0"
regp: reg { SIGN_EXT rule }

It could've been done without adding the new "regp" but having it gives the
following advantages:
- can have a closure "regp" rule that can implicitly convert reg->regp on
- will catch bugs if the wrong type is used (loss of the upper 32bit on
- if an exact gc is used, tracking pointer in the LIR will be a lot easier.

I used to keep the changes in sync with the ppc and sparc port but since I
cannot make sure that is works correctly I did not include those files in
the patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.patch
Type: application/octet-stream
Size: 54235 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20031106/7370d190/attachment.obj 

More information about the Mono-devel-list mailing list