Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
assembler_test.cc File Reference
#include "vm/compiler/assembler/assembler.h"
#include "vm/compiler/assembler/assembler_test.h"
#include "vm/globals.h"
#include "vm/hash.h"
#include "vm/os.h"
#include "vm/random.h"
#include "vm/simulator.h"
#include "vm/unit_test.h"
#include "vm/virtual_memory.h"

Go to the source code of this file.

Namespaces

namespace  dart
 
namespace  dart::compiler
 

Macros

#define TEST_CODE(value, growable_array, thread)
 
#define __   assembler->
 
#define HASH_TEST(hash1, hash2)    hash_test(Expect(__FILE__, __LINE__), hash1, hash2)
 
#define __   assembler->
 
#define LOAD_FROM_BOX_TEST(SIZE, TYPE, VALUE, SAME_REGISTER)
 

Functions

 dart::compiler::ASSEMBLER_TEST_EXTERN (StoreIntoObject)
 
 dart::ASSEMBLER_TEST_RUN (StoreIntoObject, test)
 
 dart::compiler::ASSEMBLER_TEST_GENERATE (InstantiateTypeArgumentsHashKeys, assembler)
 
 dart::ASSEMBLER_TEST_RUN (InstantiateTypeArgumentsHashKeys, test)
 

Variables

const Register dart::kArg1Reg = CallingConventions::ArgumentRegisters[0]
 
const Register dart::kArg2Reg = CallingConventions::ArgumentRegisters[1]
 

Macro Definition Documentation

◆ __ [1/2]

#define __   assembler->

Definition at line 140 of file assembler_test.cc.

◆ __ [2/2]

#define __   assembler->

Definition at line 140 of file assembler_test.cc.

◆ HASH_TEST

#define HASH_TEST (   hash1,
  hash2 
)     hash_test(Expect(__FILE__, __LINE__), hash1, hash2)

◆ LOAD_FROM_BOX_TEST

#define LOAD_FROM_BOX_TEST (   SIZE,
  TYPE,
  VALUE,
  SAME_REGISTER 
)
Value:
ASSEMBLER_TEST_GENERATE(Load##SIZE##FromBoxOrSmi##VALUE##SAME_REGISTER, \
assembler) { \
const bool same_register = SAME_REGISTER; \
\
const Register src = kArg1Reg; \
const Register dst = same_register ? src : kArg2Reg; \
const TYPE value = VALUE; \
EnterTestFrame(assembler); \
\
__ LoadObject(src, Integer::ZoneHandle(Integer::New(value, Heap::kOld))); \
__ Load##SIZE##FromBoxOrSmi(dst, src); \
__ MoveRegister(CallingConventions::kReturnReg, dst); \
LeaveTestFrame(assembler); \
\
__ Ret(); \
} \
ASSEMBLER_TEST_RUN(Load##SIZE##FromBoxOrSmi##VALUE##SAME_REGISTER, test) { \
const int64_t res = test->InvokeWithCodeAndThread<int64_t>(); \
EXPECT_EQ(static_cast<TYPE>(VALUE), static_cast<TYPE>(res)); \
}
#define TYPE(t)
uint8_t value
void LeaveTestFrame(Assembler *assembler)
void EnterTestFrame(Assembler *assembler)
@ kOld
Definition: heap_test.cc:892
const Register kArg2Reg
const Register kArg1Reg
dst
Definition: cp.py:12
#define SIZE
#define ASSEMBLER_TEST_GENERATE(name, assembler)
Definition: unit_test.h:89
#define ASSEMBLER_TEST_RUN(name, test)
Definition: unit_test.h:127

Definition at line 150 of file assembler_test.cc.

◆ TEST_CODE

#define TEST_CODE (   value,
  growable_array,
  thread 
)
Value:
test->Invoke<void, ObjectPtr, ObjectPtr, Thread*>(value, growable_array, \
thread)