Re: cx register problem in loop_cast.c

From: Alan Modra (alan@linuxcare.com.au)
Date: Wed Mar 22 2000 - 20:10:58 EST

  • Next message: Andrzej Krzysztofowicz: "2.3.99pre3-6 devfs and Config [PATCH]"

    On Wed, 22 Mar 2000, Dale Amon wrote:

    > It may not yet concern the core kernel group but
    > perhaps it soon will if things go well...
    >
    > I get a compile error from /drivers/block/loop_cast.c,
    > part of the kerneli patches.
    >
    > It doesn't like:
    >
    > #if defined(__GNUC__) && (defined(i386) || defined(i486))
    > __asm__ (
    > "roll %%cl,%0"
    > : "r" (data)
    > : "0" (data), "c" (count)
    > : "cx"
    > );
    > and so forth
    >
    > where the error occurs on the cx register:
    >
    > fixed or forbidden register 2 (cx) was spilled for class CREG.
    >
    > occurs many times before the kernel compiles bails out.
    >
    > Is there any trivial fix?

    In this case, just delete the `: "cx"' line. There's no reason to have it
    as "roll" doesn't modify cx, except of course if you're doing
    `rol %cl,%ecx', which is unlikely but quite legal. BTW, the
    "r" constraint can be relaxed to "g" here to give gcc a little more
    latitude with register allocation.

    -- 
    Linuxcare.  Support for the Revolution.
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Wed Mar 22 2000 - 21:53:48 EST