ltr() from locore.h seems a bit wierd with gcc

From: Dines, Eric <Eric.Dines_at_nospam.org>
Date: Sun Apr 23 2000 - 02:51:27 PDT

I notice that in locore.h

* ltr()
 * Load the task register
 */
inline extern void
ltr(uint tr_base)
{
        __asm__ __volatile__(
                "ltr %%eax\n\t"
                "jmp 1f\n"
        

but other functions like lidt() put parenthesis around %%eax like

__asm__ __volatile__(
                "lidt (%%eax)\n\t"

I have been tinkering around with a later version of gcc, and it throws up
an error when it
compiles/assembles this segment. Strangely gcc doesn't like it without
parenthesis, but my little app.
 fails when it runs when compiled with parenthesis.

I had a look at the assembly code when compiled -S, and it has

ltr %eax
jmp 1f

error message says "unknown i386 operands"

If the offending code is removed and compiled, it seems to run OK.

Any suggestions anyone?

cheers

Eric

        

-------------------------------------------------------------------------
Received on Sun Apr 23 02:02:57 2000

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:56 PDT