[llvm] r196996 - Move mips' datalayout computation out of line and add comments.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Dec 11 08:34:18 PST 2013

On 11 December 2013 06:03, Richard Sandiford
<rsandifo at linux.vnet.ibm.com> wrote:
> Rafael Espindola <rafael.espindola at gmail.com> writes:
>> +  // 32 bit registers are always available and the stack is at least 64 bit
>> +  // aligned. On N64 64 bit registers are also available and the stack is
>> +  // 128 bit aligned.
>> +  if (ST.isABI_N64())
>> +    Ret += "-n32:64-S128";
>> +  else
>> +    Ret += "-n32-S64";
> n32 also has 64-bit registers and a 128-bit stack alignment, so I wonder
> whether this should include ST.isABI_N32()?

Maybe. It should be easy to check that with llc. For example, right
now you should be getting unnecessary stack realignment if you request
an object to be 128 bit aligned.

 I tried to make this as mechanical as possible so that it was a nop.
I am doing this changes because I need to add a bit about symbol
mangling the the string and didn't want to have it spread over many

> That's obviously a preexisting problem (if it is a problem) since your
> patch doesn't change the behaviour.  It just stood out more with the
> new comments.

I am happy that patch helped :-)


More information about the llvm-commits mailing list