[LLVMdev] clang builds on Sparc/Linux!

Kelly Wilson wilsonk at cpsc.ucalgary.ca
Tue Aug 7 10:31:03 PDT 2007


Hey Chris,

At the end of your previous email below you have asked whether the 
reordered save operands work with GNU as. The order for save operands 
in Sun's Assembler is what regularly comes out the back of your Sparc 
backend ala:

          save -96, %o6, %o6

And Sun's Assembler understands the .bss section identifier. So, if I just 
use llvm to produce a .S file and then use Sun's 'cc' to assemble/link 
, then everything is good.

I only had the problems with reordered opeands because I am used to using 
gcc all the time ;) The order for GNU Assembler is:

 	save %o6, -96, %o6

with no .bss section identifier.

The patches that I submitted just assume that the user will use Sun's 
'cc' for linking and assembling (unless the user wants to define "linux" 
when producing the .S file with llvm....but I would just suggest using 
'cc' ;)

Thanks,
K.Wilson



On Mon, 6 Aug 2007, Chris Lattner wrote:

> On Tue, 24 Jul 2007 wilsonk at cpsc.ucalgary.ca wrote:
>
> Hi Kelly,
>
> Sorry for the delay, I'm way behind in email :(
>
>> I built llvm-2.0 (the svn version) by just typing "./configure;make". I
>> then downloaded clang from the svn repository (revision 40382) and changed
>> to it's directory under .../llvm/tools/clang. I did a "make" without
>> incident for clang, as well. Woohoo.
>
> Nice!
>
>> This worked fine and the code gen looked fine, except for two things:
>> func1:
>> main:
>>         save -96, %o6, %o6<---------------change
>
>>         .globl x
>> .bss <-------------------------------------remove
>>         .align 4
>
>> The two problems with this output. "save -96, %o6, %o6" should read
>> "save %o6, -96, %o6" at both function entry points, and the ".bss"
>> section identifier needs to be removed. THEN GCC CAN ASSEMBLE/LINK THIS
>> AND IT RUNS!!!!! Cool, now you have a new OS/arch pair to run LLVM on,
>> though I may be the only one running this pair ;)
>
> Very nice!  I assume this is because you're using the sun assembler
> instead of the GNU assembler.  Do you know if the reordered save operands
> work with the GNU assembler?
>
> -Chris




More information about the llvm-dev mailing list