aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-25 17:07:23 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-25 17:07:23 -0800
commitc69b67ab6dcb00a40d12dc35df7fe2c682c6c36a (patch)
tree7a47972dc1ead1e660c605229bfdc83796309482 /lib/Target
parent55acf4e89d24dd0f7ebf57e9127f727594fa0f49 (diff)
comment on technically incorrect handling of alignment 0 in memcpy and memset
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/JSBackend/CallHandlers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h
index c37bcef9e8..a9caa54f0d 100644
--- a/lib/Target/JSBackend/CallHandlers.h
+++ b/lib/Target/JSBackend/CallHandlers.h
@@ -232,7 +232,7 @@ DEF_CALL_HANDLER(llvm_memcpy_p0i8_p0i8_i32, {
unsigned Len = LenInt->getZExtValue();
if (Len <= WRITE_LOOP_MAX) {
unsigned Align = AlignInt->getZExtValue();
- if (Align > 4 || Align == 0) Align = 4;
+ if (Align > 4 || Align == 0) Align = 4; // XXX actually memcpy align 0 means 1, not 4
unsigned Pos = 0;
std::string Ret;
std::string Dest = getValueAsStr(CI->getOperand(0));
@@ -279,7 +279,7 @@ DEF_CALL_HANDLER(llvm_memset_p0i8_i32, {
if (Len <= WRITE_LOOP_MAX) {
unsigned Align = AlignInt->getZExtValue();
unsigned Val = ValInt->getZExtValue();
- if (Align > 4 || Align == 0) Align = 4;
+ if (Align > 4 || Align == 0) Align = 4; // XXX actually memset align 0 means 1, not 4
unsigned Pos = 0;
std::string Ret;
std::string Dest = getValueAsStr(CI->getOperand(0));