[LLVMdev] i80 data type

SHEN Hao hao.shen at imag.fr
Mon Jun 7 13:12:34 PDT 2010


On Mon, Jun 7, 2010 at 5:49 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Hao Shen,
>
>> Is there anyone who knows well i80 data type? Is there any
>> corresponding data type
>> for X86 processor? uint80_t or int80_t for gcc?
>
> no, there is no native processor support for i80.  GCC does not have
> a direct equivalent to i80.  However if you declare a 80-bit wide C
> bitfield, then arithmetic on it is done in 80 bits.  For example,
> here gcc should perform i3 arithmetic:
>
> #include <stdio.h>
>
> struct i3 { unsigned i:3; };
>
> int main(void) {
>   struct i3 A, B, C;
>
>   A.i = 5;
>   B.i = 5;
>   C.i = A.i + B.i;
>   printf("%d + %d = %d\n", A.i, B.i, C.i);
>   return 0;
> }

OK, thanks a lot. I can understand how i80 works.
But why i80 appears in my byte-code? How to remove it
by using some passes?

> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Hao Shen



More information about the llvm-dev mailing list