[Mono-devel-list] Mini: cpu-pentium.md

Willibald Krenn Willibald.Krenn at gmx.at
Tue Mar 23 10:07:36 EST 2004


Hi!

In the process of doing an AMD64 port of mini, I'm investigating the 
cpu-pentium.md file. Unfortunately some questions arised when looking at 
the first few CIL-Instructions in detail:

- It says that 'len' is required.
  Then why e.g. Conv.U4 does not have a length assigned (would be the 
same as Conv.I4 - namely 2 - AFAIK?)

- CEE_JMP's length is - according to the file - 32 Bytes.
   How was that figure obtained? 
   I did some calcs too and came out with following:

# mono_arch_instrument_epilog:
#     Sub = 3
#    FST = 3
#    SUB = 3
#    FST = 3
#    Push = 5
#    Call = 5
#    Add = 3
#    FLD = 3
#    Add = 3
#
# lea = 4
# 3x pop = 3
# leave = 1
# jmp imm32 = 5

That would give a total of 44 bytes?

 - CEE_DIV hast a length of 15, but only does a
            x86_cdq (code);
            x86_div_reg (code, ins->sreg2, TRUE);
    which would give a length of  1 + 2 == 3

 - CEE_CKFINITE seems to use 23 bytes (instead of 22?)
Mnemonics: Push (1), FAXM (2), fnstsw (2), AND (5), CMP (5), POP (1), 
'Branch32': J?? imm32 (7) == 23!

I haven't looked further down the list yet. Hope that someone can 
explain the differences I see..

Thanks,
 Willibald Krenn




More information about the Mono-devel-list mailing list