[LLVMdev] i80 data type

Duncan Sands baldrick at free.fr
Mon Jun 7 08:49:37 PDT 2010


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;
}



More information about the llvm-dev mailing list