mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-20 14:51:15 +00:00

There are some cases where we want to test multiple instructions where we can do optimizations that would overwise be hard to see. eg: ```asm ; Can be optimized to a single stp push eax push ebx ; Can remove half of the copy since we know the direction cld rep movsb ; Can remove a redundant insert addss xmm0, xmm1 addss xmm0, xmm2 ``` This lets us have arbitrary sized code in instruction count CI, with the original json key becoming only a label if the instruction array is provided. There are still some major limitations to this, instructions that generate side-effects might have "garbage" after the end of the block that isn't correctly accounted for. So care must be taken. Example in the json ```json "push ax, bx": { "ExpectedInstructionCount": 4, "Optimal": "No", "Comment": "0x50", "x86Insts": [ "push ax", "push bx" ], "ExpectedArm64ASM": [ "uxth w20, w4", "strh w20, [x8, #-2]!", "uxth w20, w7", "strh w20, [x8, #-2]!" ] } ```