mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-16 04:09:07 +00:00
rsx/fp/asm: Fix ELSE encoding
This commit is contained in:
parent
91e19652de
commit
e1ec2f58bb
@ -294,13 +294,6 @@ namespace rsx::assembler
|
|||||||
fmt::throw_exception("Invalid constant literal");
|
fmt::throw_exception("Invalid constant literal");
|
||||||
};
|
};
|
||||||
|
|
||||||
auto encode_branch_end = [](Instruction *inst, u32 end)
|
|
||||||
{
|
|
||||||
SRC2 src2 { .HEX = inst->bytecode[3] };
|
|
||||||
src2.end_offset = static_cast<u32>(end);
|
|
||||||
inst->bytecode[3] = src2.HEX;
|
|
||||||
};
|
|
||||||
|
|
||||||
auto encode_branch_else = [](Instruction* inst, u32 end)
|
auto encode_branch_else = [](Instruction* inst, u32 end)
|
||||||
{
|
{
|
||||||
SRC1 src1{ .HEX = inst->bytecode[2] };
|
SRC1 src1{ .HEX = inst->bytecode[2] };
|
||||||
@ -308,6 +301,20 @@ namespace rsx::assembler
|
|||||||
inst->bytecode[2] = src1.HEX;
|
inst->bytecode[2] = src1.HEX;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto encode_branch_end = [](Instruction *inst, u32 end)
|
||||||
|
{
|
||||||
|
SRC2 src2 { .HEX = inst->bytecode[3] };
|
||||||
|
src2.end_offset = static_cast<u32>(end);
|
||||||
|
inst->bytecode[3] = src2.HEX;
|
||||||
|
|
||||||
|
SRC1 src1{ .HEX = inst->bytecode[2] };
|
||||||
|
if (!src1.else_offset)
|
||||||
|
{
|
||||||
|
src1.else_offset = static_cast<u32>(end);
|
||||||
|
inst->bytecode[2] = src1.HEX;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
auto encode_opcode = [](const std::string& op, Instruction* inst)
|
auto encode_opcode = [](const std::string& op, Instruction* inst)
|
||||||
{
|
{
|
||||||
OPDEST d0 { .HEX = inst->bytecode[0] };
|
OPDEST d0 { .HEX = inst->bytecode[0] };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user