summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-06 23:57:33 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-06 23:57:33 +0000
commit53d4bcf35e7bc362e9340085264c2f4acd3c912b (patch)
treecf7bbcd228d9e6d8946bbda34ed8dd4df523fd1b /cmake
parent2b9355f2d9888d6a011353610b9ca24818de59a2 (diff)
downloadllvm-53d4bcf35e7bc362e9340085264c2f4acd3c912b.tar.gz
llvm-53d4bcf35e7bc362e9340085264c2f4acd3c912b.tar.bz2
llvm-53d4bcf35e7bc362e9340085264c2f4acd3c912b.tar.xz
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
Diffstat (limited to 'cmake')
0 files changed, 0 insertions, 0 deletions