PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Syntax error using _FPU_SETCW

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
LeMaitre



Joined: 22 Jul 2004
Posts: 2

PostPosted: Thu Jul 29, 2004 7:38 pm    Post subject: Syntax error using _FPU_SETCW Reply with quote

Hello,
I am trying a demo version of the PGI compiler (vers5.2-1 on RedHat 7.2). The code works with gcc or icc. With pgcc, I cannot use the standard _FPU_SETCW macro described in fpu_control.h. It results in a syntax error.

Example:
Code:
#include <fpu_control.h>
void init_float()
{
   fpu_control_t cw = 0x037f;
   _FPU_SETCW(cw);
}

The result is:
Quote:
PGC-S-0035-Syntax error: Recovery attempted by replacing ':' by '?'
PGC-W-0089-Array name used in logical expression
PGC-S-0056-Attempt to call non-function

What can I do ?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6128
Location: The Portland Group Inc.

PostPosted: Thu Jul 29, 2004 10:23 pm    Post subject: Extended Inline assembly is not supported in pgcc Reply with quote

Using the "-P" flag, we see that the marco "_FPU_SETCW(cw);" is actually an extended inline assembly statement.

Code:
 __asm__ ( "fldcw %0" : : "m" ( * & cw ) ) ;


While pgcc supports basic inline asm statements (see -Masmkeyword in the user's guide) in the form of

Code:
asm("statement");


where the statement is a legal assembly-language statement, pgcc does not support extended inline assembly statements. While I wouldn't really recommend it except as an experiment, it would be interesting to convert the extend to the basic form. Anyone willing to try it?

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group