blob: d2e29e1216b73f40bb7023f8c2f76085328098d2 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_DEVELOPER_DEBUG_ZXDB_EXPR_ABI_X64_H_
#define SRC_DEVELOPER_DEBUG_ZXDB_EXPR_ABI_X64_H_
#include "src/developer/debug/zxdb/expr/abi.h"
namespace zxdb {
class Type;
class AbiX64 : public Abi {
public:
// Abi implementation.
bool IsRegisterCalleeSaved(debug::RegisterID reg) const final;
debug::RegisterID GetReturnRegisterForMachineInt() const final {
return debug::RegisterID::kX64_rax;
}
std::optional<debug::RegisterID> GetReturnRegisterForBaseType(const BaseType* base_type) final;
std::optional<CollectionReturn> GetCollectionReturnByRefLocation(
const Collection* collection) final;
std::optional<CollectionByValueReturn> GetCollectionReturnByValueLocation(
const fxl::RefPtr<EvalContext>& eval_context, const Collection* collection) final;
};
} // namespace zxdb
#endif // SRC_DEVELOPER_DEBUG_ZXDB_EXPR_ABI_X64_H_