summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-31 05:55:36 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-31 05:55:36 +0000
commit47857812e29324a9d1560796a05b53d3a9217fd9 (patch)
treedeefd24f91f82ea1f555fda5f53a3ab7d9599f0b /lib/CodeGen/AsmPrinter.cpp
parente49661bdf5b7a913d4e368cf511381e524ae403a (diff)
downloadllvm-47857812e29324a9d1560796a05b53d3a9217fd9.tar.gz
llvm-47857812e29324a9d1560796a05b53d3a9217fd9.tar.bz2
llvm-47857812e29324a9d1560796a05b53d3a9217fd9.tar.xz
For PR950:
Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 5bbcaee339..3f4bfd774d 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -607,7 +607,7 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
<< "\t" << TAI->getCommentString() << " float " << Val << "\n";
return;
}
- } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) {
+ } else if (CV->getType() == Type::Int64Ty) {
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
uint64_t Val = CI->getZExtValue();
@@ -918,10 +918,10 @@ void AsmPrinter::printDataDirective(const Type *type) {
const TargetData *TD = TM.getTargetData();
switch (type->getTypeID()) {
case Type::BoolTyID:
- case Type::UByteTyID: case Type::SByteTyID:
+ case Type::Int8TyID:
O << TAI->getData8bitsDirective();
break;
- case Type::UShortTyID: case Type::ShortTyID:
+ case Type::Int16TyID:
O << TAI->getData16bitsDirective();
break;
case Type::PointerTyID:
@@ -932,10 +932,10 @@ void AsmPrinter::printDataDirective(const Type *type) {
break;
}
//Fall through for pointer size == int size
- case Type::UIntTyID: case Type::IntTyID:
+ case Type::Int32TyID:
O << TAI->getData32bitsDirective();
break;
- case Type::ULongTyID: case Type::LongTyID:
+ case Type::Int64TyID:
assert(TAI->getData64bitsDirective() &&
"Target cannot handle 64-bit constant exprs!");
O << TAI->getData64bitsDirective();