llvm-6502/include/llvm
Stepan Dyatkovskiy b52ba9f8a8 Issue:
Stack is formed improperly for long structures passed as byval arguments for
EABI mode.

If we took AAPCS reference, we can found the next statements:

A: "If the argument requires double-word alignment (8-byte), the NCRN (Next
Core Register Number) is rounded up to the next even register number." (5.5
Parameter Passing, Stage C, C.3).

B: "The alignment of an aggregate shall be the alignment of its most-aligned
component." (4.3 Composite Types, 4.3.1 Aggregates).

So if we have structure with doubles (9 double fields) and 3 Core unused
registers (r1, r2, r3): caller should use r2 and r3 registers only.
Currently r1,r2,r3 set is used, but it is invalid.

Callee VA routine should also use r2 and r3 regs only. All is ok here. This
behaviour is guessed by rounding up SP address with ADD+BFC operations.

Fix:
Main fix is in ARMTargetLowering::HandleByVal. If we detected AAPCS mode and
8 byte alignment, we waste odd registers then.

P.S.:
I also improved LDRB_POST_IMM regression test. Since ldrb instruction will
not generated by current regression test after this patch. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166018 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16 07:16:47 +00:00
..
ADT Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant. 2012-10-16 06:04:27 +00:00
Analysis Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Assembly Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
Bitcode Change encoding of instruction operands in bitcode binaries to be relative 2012-10-11 20:20:40 +00:00
CodeGen misched: Added handleMove support for updating all kill flags, not just for allocatable regs. 2012-10-16 00:22:51 +00:00
Config Make backtraces work again with both the configure and cmake build. 2012-09-28 10:10:46 +00:00
DebugInfo Add support for fetching inlining context (stack of source code locations) 2012-09-04 08:12:33 +00:00
ExecutionEngine Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
MC [ms-inline asm] Add a few new APIs to the AsmParser class in support of MS-Style 2012-10-15 17:19:13 +00:00
Object Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Support Correcting enum values mentioned in comments. 2012-10-12 21:47:49 +00:00
TableGen Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Target Issue: 2012-10-16 07:16:47 +00:00
Transforms Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. 2012-10-15 16:24:29 +00:00
AddressingMode.h Use DataTypes.h 2012-10-08 23:14:28 +00:00
Argument.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Attributes.h Cleanup whitespace. 2012-10-16 06:10:45 +00:00
AutoUpgrade.h remove autoupgrade support for really old-style debug info intrinsics. 2011-11-27 06:18:33 +00:00
BasicBlock.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
CallGraphSCCPass.h
CallingConv.h Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions. 2012-10-01 17:01:31 +00:00
CMakeLists.txt llvm/include/llvm/CMakeLists.txt: Cut dependency to intrinsics_gen. 2012-07-06 15:55:39 +00:00
Constant.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Constants.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
DataLayout.h Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. 2012-10-15 16:24:29 +00:00
DebugInfo.h Fix PR14016. 2012-10-09 08:13:15 +00:00
DefaultPasses.h Fix a couple include directives that used angle brackets for llvm files. 2012-09-15 18:41:37 +00:00
DerivedTypes.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
DIBuilder.h Make sure to generate the right kind of MDNode for enum forward declarations. 2012-10-05 01:49:14 +00:00
Function.h Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. 2012-10-16 05:23:31 +00:00
GlobalAlias.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
GlobalValue.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
GlobalVariable.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
GVMaterializer.h
InitializePasses.h dependence analysis 2012-10-11 07:32:34 +00:00
InlineAsm.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
InstrTypes.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Instruction.def [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instruction.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Instructions.h Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. 2012-10-16 05:23:31 +00:00
IntrinsicInst.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Intrinsics.h Attributes Rewrite 2012-10-15 04:46:55 +00:00
Intrinsics.td Add in new data types that are used by AMDIL/ANL among others. 2012-09-19 22:47:07 +00:00
IntrinsicsARM.td ARM: Use a dedicated intrinsic for vector bitwise select. 2012-09-21 00:18:20 +00:00
IntrinsicsCellSPU.td
IntrinsicsHexagon.td Test commit. 2012-08-17 06:36:26 +00:00
IntrinsicsMips.td Support MIPS DSP Rev2 intrinsics. 2012-08-27 12:29:01 +00:00
IntrinsicsNVVM.td Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
IntrinsicsPowerPC.td
IntrinsicsX86.td Mark avx2 maskstore has ReadWriteArgMem. Mark broadcast and maskload as ReadArgMem. 2012-08-26 22:01:42 +00:00
IntrinsicsXCore.td Update IntrinsicsXCore.td with the normal LLVM notice at the top of the file. 2011-10-13 21:08:11 +00:00
IRBuilder.h Add IRBuilder code for adding !tbaa.struct metadata tags to llvm.memcpy calls. 2012-09-26 22:17:14 +00:00
LinkAllPasses.h dependence analysis 2012-10-11 07:32:34 +00:00
LinkAllVMCore.h Missed a spot removing Alarm. 2010-12-07 18:50:33 +00:00
Linker.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
LLVMContext.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 07:16:40 +00:00
MDBuilder.h Add an MDBuilder utility for creating !tbaa.struct nodes. 2012-09-21 23:00:37 +00:00
Metadata.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Module.h Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
OperandTraits.h Remove DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS, folding its 2011-08-22 09:37:03 +00:00
Operator.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Pass.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 07:16:40 +00:00
PassAnalysisSupport.h Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00
PassManager.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassManagers.h Use ArrayRef instead of an explicit vector type. 2012-05-14 07:53:40 +00:00
PassRegistry.h
PassSupport.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 07:16:40 +00:00
SymbolTableListTraits.h Remove unused typedefs gcc4.8 warns about. 2012-09-05 17:55:46 +00:00
TargetTransformInfo.h Shuffle the virtual destructor down to the base. This should actually pacify 2012-10-12 04:28:25 +00:00
Type.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
TypeBuilder.h Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completes 2012-07-15 23:45:24 +00:00
TypeFinder.h Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
Use.h Add includes of Compiler.h to fix build bot failures. 2012-09-16 21:50:09 +00:00
User.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
Value.h Remove unnecessary classof()'s 2012-10-11 23:30:49 +00:00
ValueSymbolTable.h Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00