C library compatible with Intel STM compiler

C library compatible with Intel STM compiler

Bild des Benutzers neegoyal

Hello,

I am not very sure if it's the appropriate place for posting this. I apologize if it's not.

I am looking for a C library for linux which is compatible with Intel STM compiler. I would like to make some Intel STM specific changes to the libabry and compile it using Intel compiler. I just tried taking a chance with glibc but don't think that's good option as it doesn't seem to compile with icc.

Any inputs will be helpful.

Thanks,
Neelam


7 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Ravi Narayanaswamy (Intel)

When you say it doesn't seem to compile with icc, can you be more specific as to what the issue is. Have to tried taking only the functions you are interested in glibc and compiling with icc.

Bild des Benutzers neegoyal

icc doesn't seem to support some of the gcc options like -mpreferred-stack-boundary.
The next thing I was thinking of doing was to extract the functions I need from glibc and compile them with icc. Was just looking for options where extracting from the glibc is not required!

Thanks.

Bild des Benutzers Tim Prince

No, icc doesn't support altering stack alignments for the callee. In 64-bit mode, the callee stack will always be 16-byte aligned.

Bild des Benutzers suman_mandal

If you are not finding COMPATIBLE PLATFORM YOU can just refer t othe particular CPu architecture And DEVELOPE yourSoftware USING ASSEBLY LEVEL LANGUAGE PROGRAMMING specified by INTEL

Bild des Benutzers James Cownie (Intel)

Neelam,


Can you back up a level and explain what the problem is that you are trying to solve? Maybe there are other solutions which would work more easily than trying to recompile libc.


For instance, if you were trying to make a transaction safe version of (say) strcmp, rather than recompiling libc (where strcmp may well be in assembler anyway...), you might be better doing something like this

/* For a header which you include in your code... */
#if (_TM)
# define strcmp txnStrcmp
#endif
/* Compile and link into your code. (Uncompiled code warning!) */
declspec(tm_callable)
int txnStrcmp(const char * a, const char * b)
{
char c1;
char c2;
do
{
int delta = (c1=*a++)-(c2=*b++);
if (delta)
return delta;
} while (c1 && c2);
 return 0;
}

Here you provide your own version of transactional strcmp, and use a macro in your code to have it called, rather than the C library version.


Bild des Benutzers neegoyal

Hi Jim,

I am trying to do something similar. So there are couple of library routines, which I want to alter and call inside transactions. Infact I had started doing something very similar to what you suggested.

Thanks,
Neelam

Melden Sie sich an, um einen Kommentar zu hinterlassen.