mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
feat(relinker): lower BZHI and BEXTR under --to-rosetta
This commit is contained in:
1 parent
7f0b73575b
commit
cf78130042
8 files changed
+420
-6
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#ifndef CODEGEN_X86_BITFIELDLOWERING_HPP
|
||||
#define CODEGEN_X86_BITFIELDLOWERING_HPP
|
||||
|
||||
#include <codegen/x86/StubBodyBuilder.hpp>
|
||||
#include <optional>
|
||||
|
||||
namespace Codegen {
|
||||
|
||||
enum class BitfieldOperation : std::uint8_t {
|
||||
ZeroHigh,
|
||||
Extract,
|
||||
};
|
||||
|
||||
struct BitfieldOperands {
|
||||
BitfieldOperation Operation;
|
||||
std::uint8_t Destination;
|
||||
std::uint8_t Source;
|
||||
std::uint8_t Control;
|
||||
bool Wide;
|
||||
std::optional<MemoryOperand> Memory;
|
||||
};
|
||||
|
||||
[[nodiscard]] const char* BitfieldName(BitfieldOperation operation);
|
||||
[[nodiscard]] std::optional<BitfieldOperands> DecodeBitfield(const std::uint8_t* data, std::size_t length);
|
||||
void EmitBitfield(StubBodyBuilder& body, const BitfieldOperands& operands);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user