llvm-6502/lib
Jakob Stoklund Olesen 53d4bcf35e Implement LowerReturn_64 for SPARC v9.
Integer return values are sign or zero extended by the callee, and
structs up to 32 bytes in size can be returned in registers.

The CC_Sparc64 CallingConv definition is shared between
LowerFormalArguments_64 and LowerReturn_64. Function arguments and
return values are passed in the same registers.

The inreg flag is also used for return values. This is required to handle
C functions returning structs containing floats and ints:

  struct ifp {
    int i;
    float f;
  };

  struct ifp f(void);

LLVM IR:

  define inreg { i32, float } @f() {
     ...
     ret { i32, float } %retval
  }

The ABI requires that %retval.i is returned in the high bits of %i0
while %retval.f goes in %f1.

Without the inreg return value attribute, %retval.i would go in %i0 and
%retval.f would go in %f3 which is a more efficient way of returning
%multiple values, but it is not ABI compliant for returning C structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178966 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-06 23:57:33 +00:00
..
Analysis CostModel: Add parameter to instruction cost to further classify operand values 2013-04-04 23:26:21 +00:00
Archive
AsmParser
Bitcode Whitespace cleanup 2013-04-01 02:28:07 +00:00
CodeGen typo 2013-04-06 04:24:12 +00:00
DebugInfo
ExecutionEngine Respect Addend when processing MCJIT relocations to local/global symbols. 2013-04-05 13:29:04 +00:00
IR Measure time that IR parsing took as part of the -time-passes measurement. 2013-04-03 15:33:45 +00:00
IRReader Measure time that IR parsing took as part of the -time-passes measurement. 2013-04-03 15:33:45 +00:00
Linker Specutively revert r178130. 2013-03-27 17:54:41 +00:00
MC Fix the fde encoding used by mips to match gas. 2013-04-03 03:13:19 +00:00
Object Remove last use of InMemoryStruct from MachOObjectFile.cpp. 2013-04-06 03:50:05 +00:00
Option
Support <rdar://problem/13551789> Fix a race in the LockFileManager. 2013-04-05 20:53:57 +00:00
TableGen
Target Implement LowerReturn_64 for SPARC v9. 2013-04-06 23:57:33 +00:00
Transforms Removed trailing whitespace. 2013-04-05 23:46:45 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile