XCore target: Add large code model
authorRobert Lytton <robert@xmos.com>
Mon, 2 Dec 2013 10:18:31 +0000 (10:18 +0000)
committerRobert Lytton <robert@xmos.com>
Mon, 2 Dec 2013 10:18:31 +0000 (10:18 +0000)
commit883abacb5bd0e3b759f802a07f11771454804a4d
tree667a3cd41f80977e85f0fbb7d8d7ba8b151c8eb3
parent7112fa0523039a7316000e034a803d0f052133aa
XCore target: Add large code model

When using large code model:
Global objects larger than 'CodeModelLargeSize' bytes are placed in sections named with a trailing ".large"
The folded global address of such objects are lowered into the const pool.

During inspection it was noted that LowerConstantPool() was using a default offset of zero.
A fix was made, but due to only offsets of zero being generated, testing only verifies the change is not detrimental.

Correct the flags emitted for explicitly specified sections.

We assume the size of the object queried by getSectionForConstant() is never greater than CodeModelLargeSize.
To handle greater than CodeModelLargeSize, changes to AsmPrinter would be required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196087 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
lib/Target/XCore/XCoreISelLowering.cpp
lib/Target/XCore/XCoreInstrInfo.td
lib/Target/XCore/XCoreTargetObjectFile.cpp
lib/Target/XCore/XCoreTargetObjectFile.h
test/CodeGen/XCore/codemodel.ll