[Top] [All Lists]

Re: .set mips2 breaks 64bit kernel

Subject: Re: .set mips2 breaks 64bit kernel
From: Atsushi Nemoto <>
Date: Thu, 23 Jun 2005 01:26:29 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
>>>>> On Wed, 22 Jun 2005 14:30:41 +0100 (BST), "Maciej W. Rozycki" 
>>>>> <> said:

macro> But I think there is one possiblity of a problem -- obsolete
macro> versions of GCC may rely on gas expanding "ll" and "sc" as
macro> macros, i.e. substitute a name of a symbol rather than a valid
macro> machine-level address expression (e.g. "0($reg)" or
macro> "%lo(sym)($reg)") for memory constraints.  Well, by using "m"
macro> right now we sort of permit it to.

Yes, this is my case.

A line in net/key/af_key.c:pfkey_create()


was translated to:

                .set    mips2                                   
1:      ll      $3, pfkey_socks_nr              # atomic_add            
        addu    $3, 1                                   
        sc      $3, pfkey_socks_nr                                      
        beqz    $3, 1b                                  
        .set    mips0                                   

Then gas expands the 'll' to LUI and LL (no high 32bit).

I'm using gcc 3.4.4 and binutils 2.16.1.  Not so brand new but not so
obsolete (I hope :-))

Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>