LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-03-2004, 06:05 AM   #1
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
problems with gcc inline assembly using xmm registers


Hi everyboy!

I'm having serious troubles using xmm[0...7] registers into gcc inlines. The error I get is:
Code:
../Libraries/fermiqcd_fermi_actions_sse2.h:818: can't find a register in class
   `GENERAL_REGS' while reloading `asm'
what I understand is that the function I'm trying to compile uses too many `GENERAL_REGS' registers but, do xmm registers belong to this group? aren't they a special set of registers in the SSE area?
Could it be that the function uses too many intermediate registers from the general registers group? In that case, how could I avoid such behaviour?

The problem occurs whenever I try to use the xmm intensively; if I don't use SSE extensions eveything goes ok, but I NEED xmm registers!

Thanks in advance!!!
Best regards

PS BTW, if it is necessary I'll post the piece of code; I just didn't want to post a too long question...
 
Old 12-03-2004, 10:28 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,408

Rep: Reputation: 108Reputation: 108
How do you compile the program? Do you use the right compiling option to have support for the registers?
 
Old 12-03-2004, 12:16 PM   #3
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Original Poster
Rep: Reputation: 30
thanks for the reply
Quote:
Do you use the right compiling option to have support for the registers?
to be honest, I'm not sure (I'd like that this is the problem...)
I've tried some combinations and I get always the same.
Anyway, what are the right options? something like this:
Code:
-mcpu=pentium4 -mfpmath=sse -msse2
?
Should they be in any particular order?

Regards
 
Old 12-05-2004, 02:59 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,408

Rep: Reputation: 108Reputation: 108
Try to add -O3 and -fomit-frame-pointer
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
inline assembly in gcc gursev Programming 2 03-04-2005 02:17 AM
puzzle about g++ compile options for inline assembly program markbeth Programming 2 09-20-2004 04:30 AM
Inline Assembly Question tjt Programming 3 08-08-2004 04:38 AM
undefined reference to ... when using inline assembly in C Annie0716 Programming 3 08-01-2004 12:50 AM
subrouine_call in gcc inline assembly sakeeb Programming 4 08-15-2002 10:22 PM


All times are GMT -5. The time now is 02:51 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration