[Mono-dev] x86 code generator

Zoltan Varga vargaz at gmail.com
Mon Jul 3 08:04:48 EDT 2006


                              Hi,

On 7/3/06, Rusmin Susanto <rusminsusanto at yahoo.com> wrote:
>
> 1. How do you know that floating point addition equal to :
>  x86_fp_op_reg (code, X86_FADD, 1, TRUE);
>    which is equal to:
>
>  do { \
>   static const unsigned char map[] = { 0, 1, 2, 3, 5, 4, 7, 6, 8}; \
>   *(inst)++ = (pop_stack) ? (unsigned char)0xde : (unsigned char)0xdc; \
>   *(inst)++ = (unsigned
> char)0xc0+(map[(opc)]<<3)+((index)&0x07); \
>  } while (0)
>
>    Where do you get the reference for this?
>

>From the Intel CPU docs.

> 2. How do you know that "sin" function is equal to the following
> instructions in x86:
>
>  x86_fsin (code);
>  x86_fldz (code);
>  x86_fp_op_reg (code, X86_FADD, 1, TRUE);
>
>  I can't find reference about this. Where do you get this reference?
>

Probably from looking at code generated by gcc.

                       Zoltan



More information about the Mono-devel-list mailing list