Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Unified Diff: src/PNaClTranslator.cpp

Issue 476323004: Start adding an integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make fixups part of address Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceUtils.h ('k') | src/assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index fcebeac05538052584630d7a32fc0c0ae8f9eb09..1a6ffe6c2b76f0ab9f231471bbe2081c6f26da66 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -1758,8 +1758,11 @@ void ConstantsParser::ProcessRecord() {
if (IntegerType *IType = dyn_cast<IntegerType>(
Context->convertToLLVMType(NextConstantType))) {
APInt Value(IType->getBitWidth(), NaClDecodeSignRotatedValue(Values[0]));
- Ice::Constant *C =
- getContext()->getConstantInt(NextConstantType, Value.getSExtValue());
+ Ice::Constant *C = (NextConstantType == Ice::IceType_i64)
+ ? getContext()->getConstantInt64(
+ NextConstantType, Value.getSExtValue())
+ : getContext()->getConstantInt32(
+ NextConstantType, Value.getSExtValue());
FuncParser->setNextConstantID(C);
return;
}
« no previous file with comments | « src/IceUtils.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698