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

Side by Side Diff: runtime/vm/object_arm64_test.cc

Issue 1264543002: Simplify constant pool usage in arm64 code generator (by removing extra argument (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/runtime_entry_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 #if defined(TARGET_ARCH_ARM64) 7 #if defined(TARGET_ARCH_ARM64)
8 8
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 32
33 // Generate a dart code sequence that embeds a string object in it. 33 // Generate a dart code sequence that embeds a string object in it.
34 // This is used to test Embedded String objects in the instructions. 34 // This is used to test Embedded String objects in the instructions.
35 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) { 35 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
36 const String& string_object = 36 const String& string_object =
37 String::ZoneHandle(String::New(str, Heap::kOld)); 37 String::ZoneHandle(String::New(str, Heap::kOld));
38 __ mov(SP, CSP); 38 __ mov(SP, CSP);
39 __ TagAndPushPP(); // Save caller's pool pointer and load a new one here. 39 __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
40 __ LoadPoolPointer(PP); 40 __ LoadPoolPointer();
41 __ LoadObject(R0, string_object, PP); 41 __ LoadObject(R0, string_object);
42 __ set_constant_pool_allowed(false);
42 __ PopAndUntagPP(); // Restore caller's pool pointer. 43 __ PopAndUntagPP(); // Restore caller's pool pointer.
43 __ ret(); 44 __ ret();
44 } 45 }
45 46
46 47
47 // Generate a dart code sequence that embeds a smi object in it. 48 // Generate a dart code sequence that embeds a smi object in it.
48 // This is used to test Embedded Smi objects in the instructions. 49 // This is used to test Embedded Smi objects in the instructions.
49 void GenerateEmbedSmiInCode(Assembler* assembler, intptr_t value) { 50 void GenerateEmbedSmiInCode(Assembler* assembler, intptr_t value) {
50 const Smi& smi_object = Smi::ZoneHandle(Smi::New(value)); 51 const Smi& smi_object = Smi::ZoneHandle(Smi::New(value));
51 const int64_t val = reinterpret_cast<int64_t>(smi_object.raw()); 52 const int64_t val = reinterpret_cast<int64_t>(smi_object.raw());
52 __ LoadImmediate(R0, val, kNoRegister); 53 __ LoadImmediate(R0, val);
53 __ ret(); 54 __ ret();
54 } 55 }
55 56
56 } // namespace dart 57 } // namespace dart
57 58
58 #endif // defined TARGET_ARCH_ARM64 59 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/runtime_entry_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698