jak-project/goalc/emitter/CallingConvention.h
water111 663b5c7899
[OpenGOAL] Support for 128-bit arguments and return values (WIP) (#510)
* xmm call and return working, needs some careful double checking and tests

* clean up and test
2021-05-20 20:12:49 -04:00

17 lines
586 B
C++

#pragma once
#include <vector>
#include <optional>
#include "common/type_system/TypeSystem.h"
#include "goalc/emitter/Register.h"
struct CallingConvention {
std::vector<emitter::Register> arg_regs;
std::optional<emitter::Register> return_reg;
};
std::vector<emitter::Register> get_arg_registers(const TypeSystem& type_system,
const std::vector<TypeSpec>& arg_types);
CallingConvention get_function_calling_convention(const TypeSpec& function_type,
const TypeSystem& type_system);