[llvm-commits] [125963] Apply Reid's parameter attr patch.
clattner at apple.com
clattner at apple.com
Tue Apr 10 20:18:44 PDT 2007
Revision: 125963
Author: clattner
Date: 2007-04-10 20:18:43 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
Apply Reid's parameter attr patch.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/config/i386/llvm-i386-target.h
apple-local/branches/llvm/gcc/llvm-types.cpp
Modified: apple-local/branches/llvm/gcc/config/i386/llvm-i386-target.h
===================================================================
--- apple-local/branches/llvm/gcc/config/i386/llvm-i386-target.h 2007-04-10 22:30:30 UTC (rev 125962)
+++ apple-local/branches/llvm/gcc/config/i386/llvm-i386-target.h 2007-04-11 03:18:43 UTC (rev 125963)
@@ -54,7 +54,7 @@
int words = (Size + BITS_PER_WORD - 1) / BITS_PER_WORD; \
local_regparm -= words; \
if (local_regparm>=0) { \
- Attribute |= InRegAttribute; \
+ Attribute |= ParamAttr::InReg; \
} else \
local_regparm = 0; \
} \
Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-10 22:30:30 UTC (rev 125962)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-11 03:18:43 UTC (rev 125963)
@@ -712,7 +712,7 @@
if (static_chain) {
// Pass the static chain in a register.
ParamAttrs = new ParamAttrsList();
- ParamAttrs->addAttributes(1, InRegAttribute);
+ ParamAttrs->addAttributes(1, ParamAttr::InReg);
}
return FunctionType::get(RetTy, ArgTys, false, ParamAttrs);
@@ -768,22 +768,22 @@
// the function will be correctly sign or zero extended to 32-bits by
// the LLVM code gen.
ParamAttrsList Attrs;
- uint16_t RAttributes = NoAttributeSet;
+ uint16_t RAttributes = ParamAttr::None;
if (CallingConv == CallingConv::C) {
tree ResultTy = TREE_TYPE(type);
if (TREE_CODE(ResultTy) == BOOLEAN_TYPE) {
if (TREE_INT_CST_LOW(TYPE_SIZE(ResultTy)) < INT_TYPE_SIZE)
- RAttributes |= ZExtAttribute;
+ RAttributes |= ParamAttr::ZExt;
} else {
if (TREE_CODE(ResultTy) == INTEGER_TYPE &&
TREE_INT_CST_LOW(TYPE_SIZE(ResultTy)) < INT_TYPE_SIZE)
if (TYPE_UNSIGNED(ResultTy))
- RAttributes |= ZExtAttribute;
+ RAttributes |= ParamAttr::ZExt;
else
- RAttributes |= SExtAttribute;
+ RAttributes |= ParamAttr::SExt;
}
}
- if (RAttributes != NoAttributeSet)
+ if (RAttributes != ParamAttr::None)
Attrs.addAttributes(0, RAttributes);
unsigned Idx = 1;
@@ -796,30 +796,30 @@
if (static_chain)
// Pass the static chain in a register.
- Attrs.addAttributes(Idx++, InRegAttribute);
+ Attrs.addAttributes(Idx++, ParamAttr::InReg);
// The struct return attribute must be associated with the first
// parameter but that parameter may have other attributes too so we set up
// the first Attributes value here based on struct return. This only works
// Handle the structure return calling convention
if (ABIConverter.isStructReturn())
- Attrs.addAttributes(Idx++, StructRetAttribute);
+ Attrs.addAttributes(Idx++, ParamAttr::StructRet);
for (tree Args = TYPE_ARG_TYPES(type);
Args && TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) {
tree Ty = TREE_VALUE(Args);
- unsigned Attributes = NoAttributeSet;
+ unsigned Attributes = ParamAttr::None;
if (CallingConv == CallingConv::C) {
if (TREE_CODE(Ty) == BOOLEAN_TYPE) {
if (TREE_INT_CST_LOW(TYPE_SIZE(Ty)) < INT_TYPE_SIZE)
- Attributes |= ZExtAttribute;
+ Attributes |= ParamAttr::ZExt;
} else if (TREE_CODE(Ty) == INTEGER_TYPE &&
TREE_INT_CST_LOW(TYPE_SIZE(Ty)) < INT_TYPE_SIZE) {
if (TYPE_UNSIGNED(Ty))
- Attributes |= ZExtAttribute;
+ Attributes |= ParamAttr::ZExt;
else
- Attributes |= SExtAttribute;
+ Attributes |= ParamAttr::SExt;
}
}
@@ -829,7 +829,7 @@
isVarArg, lparam);
#endif // LLVM_TARGET_ENABLE_REGPARM
- if (Attributes != NoAttributeSet)
+ if (Attributes != ParamAttr::None)
Attrs.addAttributes(Idx, Attributes);
Idx++;
}
More information about the llvm-commits
mailing list