gcc x86 intrinsics not working?

Discussion created by edward_yang on Jun 7, 2009
Latest reply on Jun 9, 2009 by edward_yang

Hi, it appears that openCC does not support gcc's x86 intrinsics. For example, the follow short program would compile under gcc 4.2 or 4.3 but not openCC 4.2.2:


#include <stdio.h>
#include <arpa/inet.h>
//#include <xmmintrin.h>

#define LOADDQU __builtin_ia32_loaddqu
#define PCMPEQB __builtin_ia32_pcmpeqb128
#define PMOVMSKB __builtin_ia32_pmovmskb128

typedef uint8_t v128b_t __attribute__ ((vector_size (16)));

int main(int argc, char** argv)
register v128b_t input_set1, input_set2;
uint32_t dimem = (uint32_t)*argv[1];
dimem |= (dimem<<8);
dimem |= (dimem<<16);

__asm__ ("movddup %1, %0\n\t"
"movsldup %0, %0"
: "=&x"(input_set1) : "m"(dimem));

input_set2 = LOADDQU(argv[2]);
input_set1 = PCMPEQB(input_set1, input_set2);
dimem = PMOVMSKB(input_set1);

printf("compare result: %04x\n", dimem);


When trying to compile this using openCC, the following error message occurs:


### Assertion failure at line 6468 of ../../be/cg/x8664/expand.cxx:
### Compiler Error in file cmp1x16.cc during Code_Expansion phase:
### Exp_Intrinsic_Op: unsupported intrinsic ((null))
openCC INTERNAL ERROR: /opt/x86_open64- returned non-zero status 1


Is this normal, or did I install the compiler correctly? Thanks.