aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index ac1fdfed10..5c2d94012e 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -517,7 +517,8 @@ std::string JSWriter::getCast(const StringRef &s, const Type *t, AsmCast sign) {
default: llvm_unreachable("Unsupported integer cast bitwidth");
}
}
- case Type::PointerTyID: return (s + "|0").str();
+ case Type::PointerTyID:
+ return (sign == ASM_SIGNED || (sign & ASM_NONSPECIFIC) ? s + "|0" : s + ">>>0").str();
}
}