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

Unified Diff: src/IceConverter.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/IceClFlags.h ('k') | src/IceFixups.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceConverter.cpp
diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
index 271d25cdaf090ca7614a9eaae82624eafef94af8..2db34e92793caf5c3a76e4e8de53199be9ab6d82 100644
--- a/src/IceConverter.cpp
+++ b/src/IceConverter.cpp
@@ -102,8 +102,12 @@ public:
return Ctx->getConstantSym(convertToIceType(GV->getType()), 0,
GV->getName());
} else if (const ConstantInt *CI = dyn_cast<ConstantInt>(Const)) {
- return Ctx->getConstantInt(convertToIceType(CI->getType()),
- CI->getSExtValue());
+ Ice::Type Ty = convertToIceType(CI->getType());
+ if (Ty == Ice::IceType_i64) {
+ return Ctx->getConstantInt64(Ty, CI->getSExtValue());
+ } else {
+ return Ctx->getConstantInt32(Ty, CI->getSExtValue());
+ }
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(Const)) {
Ice::Type Type = convertToIceType(CFP->getType());
if (Type == Ice::IceType_f32)
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceFixups.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698