aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-23 21:37:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-23 21:37:55 -0800
commita4e92ab00687d2157b3743b71c6d190ecfea7b7a (patch)
tree886ddc461839e040931b455bcee692f83bffe9b8 /lib/Target/CppBackend/CPPBackend.cpp
parent4ff5b9b84573e764bf5fa7e815e2950baf5de4bd (diff)
fixes
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index f1ec13cff7..396ce57747 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -1509,26 +1509,26 @@ std::string CppWriter::generateInstruction(const Instruction *I) {
text = "HEAPF64[tempDoublePtr>>3]=" + VS + ';';
switch (Alignment) {
case 4: {
- text = "HEAP32[" + PS + ">>2]=HEAP32[tempDoublePtr>>2];" +
- "HEAP32[" + PS + "+4>>2]=HEAP32[tempDoublePtr+4>>2];";
+ text += "HEAP32[" + PS + ">>2]=HEAP32[tempDoublePtr>>2];" +
+ "HEAP32[" + PS + "+4>>2]=HEAP32[tempDoublePtr+4>>2];";
break;
}
case 2: {
- text = "HEAP16[" + PS + ">>1]=HEAP32[tempDoublePtr>>1];" +
- "HEAP16[" + PS + "+2>>1]=HEAP32[tempDoublePtr+2>>1];" +
- "HEAP16[" + PS + "+4>>1]=HEAP32[tempDoublePtr+4>>1];" +
- "HEAP16[" + PS + "+6>>1]=HEAP32[tempDoublePtr+6>>1];";
+ text += "HEAP16[" + PS + ">>1]=HEAP32[tempDoublePtr>>1];" +
+ "HEAP16[" + PS + "+2>>1]=HEAP32[tempDoublePtr+2>>1];" +
+ "HEAP16[" + PS + "+4>>1]=HEAP32[tempDoublePtr+4>>1];" +
+ "HEAP16[" + PS + "+6>>1]=HEAP32[tempDoublePtr+6>>1];";
break;
}
case 1: {
- text = "HEAP8[" + PS + "]=HEAP32[tempDoublePtr];" +
- "HEAP8[" + PS + "+1]=HEAP32[tempDoublePtr+1];" +
- "HEAP8[" + PS + "+2]=HEAP32[tempDoublePtr+2];" +
- "HEAP8[" + PS + "+3]=HEAP32[tempDoublePtr+3];" +
- "HEAP8[" + PS + "+4]=HEAP32[tempDoublePtr+4];" +
- "HEAP8[" + PS + "+5]=HEAP32[tempDoublePtr+5];" +
- "HEAP8[" + PS + "+6]=HEAP32[tempDoublePtr+6];" +
- "HEAP8[" + PS + "+7]=HEAP32[tempDoublePtr+7];";
+ text += "HEAP8[" + PS + "]=HEAP32[tempDoublePtr];" +
+ "HEAP8[" + PS + "+1]=HEAP32[tempDoublePtr+1];" +
+ "HEAP8[" + PS + "+2]=HEAP32[tempDoublePtr+2];" +
+ "HEAP8[" + PS + "+3]=HEAP32[tempDoublePtr+3];" +
+ "HEAP8[" + PS + "+4]=HEAP32[tempDoublePtr+4];" +
+ "HEAP8[" + PS + "+5]=HEAP32[tempDoublePtr+5];" +
+ "HEAP8[" + PS + "+6]=HEAP32[tempDoublePtr+6];" +
+ "HEAP8[" + PS + "+7]=HEAP32[tempDoublePtr+7];";
break;
}
default: assert(0 && "bad 8 store");
@@ -1555,15 +1555,15 @@ std::string CppWriter::generateInstruction(const Instruction *I) {
text = "HEAPF32[tempDoublePtr>>2]=" + VS + ';';
switch (Alignment) {
case 2: {
- text = "HEAP16[" + PS + ">>1]=HEAP16[tempDoublePtr>>1];" +
- "HEAP16[" + PS + "+2>>1]=HEAP16[tempDoublePtr+2>>1];";
+ text += "HEAP16[" + PS + ">>1]=HEAP16[tempDoublePtr>>1];" +
+ "HEAP16[" + PS + "+2>>1]=HEAP16[tempDoublePtr+2>>1];";
break;
}
case 1: {
- text = "HEAP8[" + PS + "]=HEAP8[tempDoublePtr];" +
- "HEAP8[" + PS + "+1]=HEAP8[tempDoublePtr+1];" +
- "HEAP8[" + PS + "+2]=HEAP8[tempDoublePtr+2];" +
- "HEAP8[" + PS + "+3]=HEAP8[tempDoublePtr+3];";
+ text += "HEAP8[" + PS + "]=HEAP8[tempDoublePtr];" +
+ "HEAP8[" + PS + "+1]=HEAP8[tempDoublePtr+1];" +
+ "HEAP8[" + PS + "+2]=HEAP8[tempDoublePtr+2];" +
+ "HEAP8[" + PS + "+3]=HEAP8[tempDoublePtr+3];";
}
default: assert(0 && "bad 4f store");
}