chromium/v8/test/cctest/compiler/test-run-load-store.cc

// Copyright 2016 the V8 project authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.

#include <cmath>
#include <functional>
#include <limits>

#include "src/base/bits.h"
#include "src/base/overflowing-math.h"
#include "src/base/template-utils.h"
#include "src/base/utils/random-number-generator.h"
#include "src/objects/objects-inl.h"
#include "src/objects/tagged.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/codegen-tester.h"
#include "test/common/value-helper.h"

namespace v8 {
namespace internal {
namespace compiler {

enum TestAlignment {};

#if V8_TARGET_LITTLE_ENDIAN
#define LSB
#elif V8_TARGET_BIG_ENDIAN
#define LSB
#else
#error "Unknown Architecture"
#endif

// This is America!
#define A_BILLION
#define A_GIG

namespace {
uint8_t* ComputeOffset(void* real_address, int32_t offset) {}

void RunLoadInt32(const TestAlignment t) {}

void RunLoadInt32Offset(TestAlignment t) {}

void RunLoadStoreFloat32Offset(TestAlignment t) {}

void RunLoadStoreFloat64Offset(TestAlignment t) {}
}  // namespace

TEST(RunLoadInt32) {}

TEST(RunUnalignedLoadInt32) {}

TEST(RunLoadInt32Offset) {}

TEST(RunUnalignedLoadInt32Offset) {}

TEST(RunLoadStoreFloat32Offset) {}

TEST(RunUnalignedLoadStoreFloat32Offset) {}

TEST(RunLoadStoreFloat64Offset) {}

TEST(RunUnalignedLoadStoreFloat64Offset) {}

namespace {

// Mostly same as CHECK_EQ() but customized for compressed tagged values.
template <typename CType>
void CheckEq(CType in_value, CType out_value) {}

#ifdef V8_COMPRESS_POINTERS
// Specializations for checking the result of compressing store.
template <>
void CheckEq<Tagged<Object>>(Tagged<Object> in_value,
                             Tagged<Object> out_value) {}

template <>
void CheckEq<Tagged<HeapObject>>(Tagged<HeapObject> in_value,
                                 Tagged<HeapObject> out_value) {}

template <>
void CheckEq<Tagged<Smi>>(Tagged<Smi> in_value, Tagged<Smi> out_value) {}
#endif

// Initializes the buffer with some raw data respecting requested representation
// of the values.
template <typename CType>
void InitBuffer(CType* buffer, size_t length, MachineType type) {}

template <typename CType>
void RunLoadImmIndex(MachineType type, TestAlignment t) {}

template <typename CType>
void RunLoadStore(MachineType type, TestAlignment t) {}

template <typename CType>
void RunUnalignedLoadStoreUnalignedAccess(MachineType type) {}
}  // namespace

TEST(RunLoadImmIndex) {}

TEST(RunUnalignedLoadImmIndex) {}

TEST(RunLoadStore) {}

TEST(RunUnalignedLoadStore) {}

TEST(RunUnalignedLoadStoreUnalignedAccess) {}

namespace {
void RunLoadStoreSignExtend32(TestAlignment t) {}

void RunLoadStoreZeroExtend32(TestAlignment t) {}
}  // namespace

TEST(RunLoadStoreSignExtend32) {}

TEST(RunUnalignedLoadStoreSignExtend32) {}

TEST(RunLoadStoreZeroExtend32) {}

TEST(RunUnalignedLoadStoreZeroExtend32) {}

#if V8_TARGET_ARCH_64_BIT

namespace {
void RunLoadStoreSignExtend64(TestAlignment t) {}

void RunLoadStoreZeroExtend64(TestAlignment t) {}

}  // namespace

TEST(RunLoadStoreSignExtend64) {}

TEST(RunUnalignedLoadStoreSignExtend64) {}

TEST(RunLoadStoreZeroExtend64) {}

TEST(RunUnalignedLoadStoreZeroExtend64) {}

#endif

namespace {
template <typename IntType>
void LoadStoreTruncation(MachineType kRepresentation, TestAlignment t) {}
}  // namespace

TEST(RunLoadStoreTruncation) {}

TEST(RunUnalignedLoadStoreTruncation) {}

#undef LSB
#undef A_BILLION
#undef A_GIG

}  // namespace compiler
}  // namespace internal
}  // namespace v8