| Index: runtime/vm/object_dbc_test.cc
|
| diff --git a/runtime/vm/object_ia32_test.cc b/runtime/vm/object_dbc_test.cc
|
| similarity index 72%
|
| copy from runtime/vm/object_ia32_test.cc
|
| copy to runtime/vm/object_dbc_test.cc
|
| index 2c28cc1b57a8741be411a370288dc3e751e9df43..464350d17a73ddbff4a1b3032312a7dff0f8f745 100644
|
| --- a/runtime/vm/object_ia32_test.cc
|
| +++ b/runtime/vm/object_dbc_test.cc
|
| @@ -1,10 +1,10 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| #include "platform/assert.h"
|
| #include "vm/globals.h"
|
| -#if defined(TARGET_ARCH_IA32)
|
| +#if defined(TARGET_ARCH_DBC)
|
|
|
| #include "vm/assembler.h"
|
| #include "vm/object.h"
|
| @@ -14,18 +14,17 @@ namespace dart {
|
|
|
| #define __ assembler->
|
|
|
| -
|
| // Generate a simple dart code sequence.
|
| // This is used to test Code and Instruction object creation.
|
| void GenerateIncrement(Assembler* assembler) {
|
| - __ movl(EAX, Immediate(0));
|
| - __ pushl(EAX);
|
| - __ incl(Address(ESP, 0));
|
| - __ movl(ECX, Address(ESP, 0));
|
| - __ incl(ECX);
|
| - __ popl(EAX);
|
| - __ movl(EAX, ECX);
|
| - __ ret();
|
| + __ Frame(1);
|
| + __ LoadConstant(0, Smi::Handle(Smi::New(0)));
|
| + __ PushConstant(Smi::Handle(Smi::New(1)));
|
| + __ Push(0);
|
| + __ AddTOS();
|
| + __ Trap();
|
| + __ PopLocal(0);
|
| + __ Return(0);
|
| }
|
|
|
|
|
| @@ -34,8 +33,8 @@ void GenerateIncrement(Assembler* assembler) {
|
| void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
|
| const String& string_object =
|
| String::ZoneHandle(String::New(str, Heap::kOld));
|
| - __ LoadObject(EAX, string_object);
|
| - __ ret();
|
| + __ PushConstant(string_object);
|
| + __ ReturnTOS();
|
| }
|
|
|
|
|
| @@ -43,10 +42,10 @@ void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
|
| // This is used to test Embedded Smi objects in the instructions.
|
| void GenerateEmbedSmiInCode(Assembler* assembler, intptr_t value) {
|
| const Smi& smi_object = Smi::ZoneHandle(Smi::New(value));
|
| - __ LoadObject(EAX, smi_object);
|
| - __ ret();
|
| + __ PushConstant(smi_object);
|
| + __ ReturnTOS();
|
| }
|
|
|
| } // namespace dart
|
|
|
| -#endif // defined TARGET_ARCH_IA32
|
| +#endif // defined TARGET_ARCH_DBC
|
|
|