llvm-6502/test
Bill Schmidt 37900c5dcb This patch addresses a PPC64 ELF issue with passing parameters consisting of
structs having size 3, 5, 6, or 7.  Such a struct must be passed and received
as right-justified within its register or memory slot.  The problem is only
present for structs that are passed in registers.

Previously, as part of a patch handling all structs of size less than 8, I
added logic to rotate the incoming register so that the struct was left-
justified prior to storing the whole register.  This was incorrect because
the address of the parameter had already been adjusted earlier to point to
the right-adjusted value in the storage slot.  Essentially I had accidentally
accounted for the right-adjustment twice.

In this patch, I removed the incorrect logic and reorganized the code to make
the flow clearer.

The removal of the rotates changes the expected code generation, so test case
structsinregs.ll has been modified to reflect this.  I also added a new test
case, jaggedstructs.ll, to demonstrate that structs of these sizes can now
be properly received and passed.

I've built and tested the code on powerpc64-unknown-linux-gnu with no new
regressions.  I also ran the GCC compatibility test suite and verified that
earlier problems with these structs are now resolved, with no new regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166680 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 13:38:09 +00:00
..
Analysis
Archive
Assembler
Bindings/Ocaml
Bitcode
BugPoint Mark bugpoint tests with XFAIL when building with LTO. <rdar://problem/12473675> 2012-10-18 22:03:31 +00:00
CodeGen This patch addresses a PPC64 ELF issue with passing parameters consisting of 2012-10-25 13:38:09 +00:00
DebugInfo
ExecutionEngine
Feature Add a testcase for the previous commit. 2012-10-22 18:16:55 +00:00
Instrumentation [asan] make sure asan erases old unused allocas after it created a new one. This became important after the recent move from ModulePass to FunctionPass because no cleanup is happening after asan pass any more. 2012-10-19 06:20:53 +00:00
Integer
Linker
MC Initial TOC support for PowerPC64 object creation 2012-10-25 12:27:42 +00:00
Object
Other Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
Scripts
TableGen
Transforms Teach SROA how to split whole-alloca integer loads and stores into 2012-10-25 04:37:07 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt
lit.cfg tests: Stop mangling '-vg' into the triple, we don't use this currently. 2012-10-19 20:11:56 +00:00
lit.site.cfg.in test: Add a lit config variable to check if LTO is enabled. 2012-10-18 20:43:11 +00:00
Makefile test: Add a lit config variable to check if LTO is enabled. 2012-10-18 20:43:11 +00:00
Makefile.tests
TestRunner.sh