mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 19:00:17 +02:00
Just a trivial rearrangement, Drops the struct down to 40 bytes. We can also make some functions take it by const reference so we aren't churning some copies. Before: text data bss dec hex filename 4160559 1471360 4336824 9968743 981c67 Bin/FEX After: text data bss dec hex filename 4159927 1471360 4336824 9968111 9819ef Bin/FEX
28 lines
814 B
C++
28 lines
814 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
|
|
#include "Interface/IR/IR.h"
|
|
#include <cstdint>
|
|
|
|
namespace FEXCore::IR {
|
|
class IREmitter;
|
|
|
|
struct AddressMode {
|
|
Ref Segment {nullptr};
|
|
Ref Base {nullptr};
|
|
Ref Index {nullptr};
|
|
int64_t Offset = 0;
|
|
|
|
MemOffsetType IndexType = MemOffsetType::SXTX;
|
|
uint8_t IndexScale = 1;
|
|
|
|
// Size in bytes for the address calculation. 8 for an arm64 hardware mode.
|
|
IR::OpSize AddrSize;
|
|
bool NonTSO;
|
|
};
|
|
|
|
Ref LoadEffectiveAddress(IREmitter* IREmit, const AddressMode& A, IR::OpSize GPRSize, bool AddSegmentBase, bool AllowUpperGarbage = false);
|
|
AddressMode SelectAddressMode(IREmitter* IREmit, const AddressMode& A, IR::OpSize GPRSize, bool HostSupportsTSOImm9, bool AtomicTSO,
|
|
bool Vector, IR::OpSize AccessSize);
|
|
|
|
} // namespace FEXCore::IR
|