[LLVMdev] Sparc assembly syntax

Richard Pennington rich at pennware.com
Thu Jul 31 16:47:12 PDT 2008


Chris Lattner wrote:

> This is probably a difference between the sun and GNU assemblers.   
> There is no current sparc maintainer, so feel free to change it if one  
> way works better for you.

Hi Chris,

Here's the fix:

Index: SparcRegisterInfo.cpp
===================================================================
--- SparcRegisterInfo.cpp       (revision 700)
+++ SparcRegisterInfo.cpp       (working copy)
@@ -137,7 +137,7 @@

    if (NumBytes >= -4096) {
      BuildMI(MBB, MBB.begin(), TII.get(SP::SAVEri),
-            SP::O6).addImm(NumBytes).addReg(SP::O6);
+            SP::O6).addReg(SP::O6).addImm(NumBytes);
    } else {
      MachineBasicBlock::iterator InsertPt = MBB.begin();
      // Emit this the hard way.  This clobbers G1 which we always know is

Should I file a bug report?

-Rich



More information about the llvm-dev mailing list