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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 3012513002: Fix usage of csinc arm64 instruction in stubs (the 2nd operand is incremented). (Closed)
Patch Set: Created 3 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index e5aeb21acd8235c72189f76285b6bf87d7498e55..5a422aeb1093aa23c87cd6e89df105250c0df5ce 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -615,9 +615,9 @@ static void GenerateDispatcherCode(Assembler* assembler,
// Adjust arguments count.
__ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
- __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
+ __ AddImmediate(TMP, R2, 1); // Include the type arguments.
__ cmp(R3, Operand(0));
- __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
+ __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP + 1 (R2 : R2 + 2).
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
@@ -1269,9 +1269,9 @@ void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
// Adjust arguments count.
__ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
- __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
+ __ AddImmediate(TMP, R2, 1); // Include the type arguments.
__ cmp(R3, Operand(0));
- __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
+ __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP + 1 (R2 : R2 + 2).
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698