Browse code

bb#11147 - reverted change overwritten with branch merging ref commit "rolled back changes from bb#8352 - fixes ppc unit tests"

Kevin Lin authored on 2014/10/18 00:06:30
Showing 1 changed files
... ...
@@ -1721,8 +1721,7 @@ public:
1721 1721
 			    Value *Dst = convertOperand(func, inst, inst->u.three[0]);
1722 1722
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1723 1723
 			    Value *Val = convertOperand(func, Type::getInt8Ty(Context), inst->u.three[1]);
1724
-			    //Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1725
-                            Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1724
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1726 1725
 #if LLVM_VERSION < 29
1727 1726
 			    CallInst *c = Builder.CreateCall4(CF->FMemset, Dst, Val, Len,
1728 1727
 								ConstantInt::get(Type::getInt32Ty(Context), 1));
... ...
@@ -1743,8 +1742,7 @@ public:
1743 1743
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1744 1744
 			    Value *Src = convertOperand(func, inst, inst->u.three[1]);
1745 1745
 			    Src = Builder.CreatePointerCast(Src, PointerType::getUnqual(Type::getInt8Ty(Context)));
1746
-			    //Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1747
-                            Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1746
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1748 1747
 #if LLVM_VERSION < 29
1749 1748
 			    CallInst *c = Builder.CreateCall4(CF->FMemcpy, Dst, Src, Len,
1750 1749
 								ConstantInt::get(Type::getInt32Ty(Context), 1));
... ...
@@ -1765,8 +1763,7 @@ public:
1765 1765
 			    Dst = Builder.CreatePointerCast(Dst, PointerType::getUnqual(Type::getInt8Ty(Context)));
1766 1766
 			    Value *Src = convertOperand(func, inst, inst->u.three[1]);
1767 1767
 			    Src = Builder.CreatePointerCast(Src, PointerType::getUnqual(Type::getInt8Ty(Context)));
1768
-                            //Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1769
-                            Value *Len = convertOperand(func, Type::getInt64Ty(Context), inst->u.three[2]);
1768
+			    Value *Len = convertOperand(func, Type::getInt32Ty(Context), inst->u.three[2]);
1770 1769
 #if LLVM_VERSION < 29
1771 1770
 			    CallInst *c = Builder.CreateCall4(CF->FMemmove, Dst, Src, Len,
1772 1771
 								ConstantInt::get(Type::getInt32Ty(Context), 1));
... ...
@@ -2031,8 +2028,7 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
2031 2031
     std::vector<constType*> args;
2032 2032
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
2033 2033
     args.push_back(Type::getInt8Ty(Context));
2034
-    //args.push_back(Type::getInt32Ty(Context));
2035
-    args.push_back(Type::getInt64Ty(Context));
2034
+    args.push_back(Type::getInt32Ty(Context));
2036 2035
     args.push_back(Type::getInt32Ty(Context));
2037 2036
 #if LLVM_VERSION >= 29
2038 2037
     args.push_back(Type::getInt1Ty(Context));
... ...
@@ -2041,11 +2037,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
2041 2041
 					       args, false);
2042 2042
     CF->FMemset = Function::Create(FuncTy_3, GlobalValue::ExternalLinkage,
2043 2043
 #if LLVM_VERSION < 29
2044
-                                   //"llvm.memset.i32",
2045
-                                   "llvm.memset.i64",
2044
+                                   "llvm.memset.i32",
2046 2045
 #else
2047
-                                   //"llvm.memset.p0i8.i32",
2048
-                                   "llvm.memset.p0i8.i64",
2046
+                                   "llvm.memset.p0i8.i32",
2049 2047
 #endif
2050 2048
                                    M);
2051 2049
     CF->FMemset->setDoesNotThrow();
... ...
@@ -2058,8 +2052,7 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
2058 2058
     args.clear();
2059 2059
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
2060 2060
     args.push_back(PointerType::getUnqual(Type::getInt8Ty(Context)));
2061
-    //args.push_back(Type::getInt32Ty(Context));
2062
-    args.push_back(Type::getInt64Ty(Context));
2061
+    args.push_back(Type::getInt32Ty(Context));
2063 2062
     args.push_back(Type::getInt32Ty(Context));
2064 2063
 #if LLVM_VERSION >= 29
2065 2064
     args.push_back(Type::getInt1Ty(Context));
... ...
@@ -2068,11 +2061,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
2068 2068
 					       args, false);
2069 2069
     CF->FMemmove = Function::Create(FuncTy_4, GlobalValue::ExternalLinkage,
2070 2070
 #if LLVM_VERSION < 29
2071
-                                    //"llvm.memmove.i32",
2072
-                                    "llvm.memcpy.i64",
2071
+                                    "llvm.memmove.i32",
2073 2072
 #else
2074
-                                    //"llvm.memmove.p0i8.i32",
2075
-                                    "llvm.memmove.p0i8.i64",
2073
+                                    "llvm.memmove.p0i8.i32",
2076 2074
 #endif
2077 2075
                                     M);
2078 2076
     CF->FMemmove->setDoesNotThrow();
... ...
@@ -2084,11 +2075,9 @@ static void addFunctionProtos(struct CommonFunctions *CF, ExecutionEngine *EE, M
2084 2084
 
2085 2085
     CF->FMemcpy = Function::Create(FuncTy_4, GlobalValue::ExternalLinkage,
2086 2086
 #if LLVM_VERSION < 29
2087
-                                   //"llvm.memcpy.i32",
2088
-                                   "llvm.memcpy.i64",
2087
+                                   "llvm.memcpy.i32",
2089 2088
 #else
2090
-                                   //"llvm.memcpy.p0i8.p0i8.i32",
2091
-                                   "llvm.memcpy.p0i8.p0i8.i64",
2089
+                                   "llvm.memcpy.p0i8.p0i8.i32",
2092 2090
 #endif
2093 2091
                                    M);
2094 2092
     CF->FMemcpy->setDoesNotThrow();