This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: other/7329: fixed or forbidden register bug (and test case)


Synopsis: fixed or forbidden register bug (and test case)

State-Changed-From-To: open->closed
State-Changed-By: cae
State-Changed-When: Mon Dec  9 16:12:52 2002
State-Changed-Why:
    The code is wrong. Your are not allowed to globber %ebx or use it
    as an asm operand if compiling PIC code. %ebx is used by the pic code
    itself to address pc relative data. I think a workaround could be
    to do something like this:
    __asm__ __volatile__ ("xchg %edi,%ebx\n\tcpuid\n\txchg %edi,%ebx":...)
    and use edi for the output operand. gcc probably can't detect the
    save and restore of ebx, however, this might still be illegal code.
    
        regards   Christian
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7329


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]