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

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 172483002: A64: Fix int32 use in Lithium string functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo in assertion. Created 6 years, 10 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/a64/codegen-a64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 033a439513672589c0727811ac25f47fd4d984a6..2052a27c9743e5a5b238d688bae06b619a0c9d28 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -5161,7 +5161,7 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
StringCharLoadGenerator::Generate(masm(),
ToRegister(instr->string()),
- ToRegister(instr->index()),
+ ToRegister32(instr->index()),
ToRegister(instr->result()),
deferred->entry());
__ Bind(deferred->exit());
@@ -5208,13 +5208,13 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
new(zone()) DeferredStringCharFromCode(this, instr);
ASSERT(instr->hydrogen()->value()->representation().IsInteger32());
- Register char_code = ToRegister(instr->char_code());
+ Register char_code = ToRegister32(instr->char_code());
Register result = ToRegister(instr->result());
- __ Cmp(char_code, Operand(String::kMaxOneByteCharCode));
+ __ Cmp(char_code, String::kMaxOneByteCharCode);
__ B(hi, deferred->entry());
__ LoadRoot(result, Heap::kSingleCharacterStringCacheRootIndex);
- __ Add(result, result, Operand(char_code, LSL, kPointerSizeLog2));
+ __ Add(result, result, Operand(char_code, SXTW, kPointerSizeLog2));
__ Ldr(result, FieldMemOperand(result, FixedArray::kHeaderSize));
__ CompareRoot(result, Heap::kUndefinedValueRootIndex);
__ B(eq, deferred->entry());
« no previous file with comments | « src/a64/codegen-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698