diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-20 16:20:33 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-20 16:20:33 -0800 |
commit | 47ccd2a512ae4f7d23d7f1998768ceddd0b24bbb (patch) | |
tree | 4f5ba42a9342a2822b9b7023d6f54d55c951f295 | |
parent | 731dde9cc830ebfa03a49f78dc06fd3bbb362950 (diff) |
fix 16-bit aligned loads
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index c413639939..c4df606514 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -453,7 +453,7 @@ std::string JSWriter::getLoad(std::string Assign, const Value *P, const Type *T, switch (Alignment) { case 2: { text = Assign + "HEAPU16[" + PS + ">>1]|" + - "(HEAPU16[" + PS + "+2>>1]<<2)"; + "(HEAPU16[" + PS + "+2>>1]<<16)"; break; } case 1: { @@ -542,7 +542,7 @@ std::string JSWriter::getStore(const Value *P, const Type *T, std::string VS, un switch (Alignment) { case 2: { text = "HEAP16[" + PS + ">>1]=" + VS + "&65535;" + - "HEAP16[" + PS + "+2>>1]=" + VS + ">>2"; + "HEAP16[" + PS + "+2>>1]=" + VS + ">>>16"; break; } case 1: { |