Files
FEX-Emu--FEX/unittests/InstructionCountCI/Primary_32Bit.json
T
2026-09-02 17:15:36 -07:00

411 lines
10 KiB
JSON

{
"Features": {
"Bitness": 32,
"EnabledHostFeatures": [],
"DisabledHostFeatures": [
"SVE128",
"SVE256",
"AFP",
"FlagM",
"FlagM2"
],
"BinaryCacheVersion": 9
},
"Instructions": {
"push es": {
"ExpectedInstructionCount": 2,
"Comment": "0x06",
"ExpectedArm64ASM": [
"ldrh w20, [x28, #960]",
"str w20, [x8, #-4]!"
]
},
"pop es": {
"ExpectedInstructionCount": 12,
"Comment": "0x07",
"ExpectedArm64ASM": [
"ldr w20, [x8], #4",
"strh w20, [x28, #960]",
"ubfx w21, w20, #2, #1",
"and w20, w20, #0xfff8",
"add x0, x28, x21, lsl #3",
"ldr x21, [x0, #1184]",
"ldr x20, [x21, w20, uxtw]",
"lsr x21, x20, #32",
"and w22, w21, #0xff000000",
"orr w20, w22, w20, lsr #16",
"bfi w20, w21, #16, #8",
"str w20, [x28, #976]"
]
},
"push cs": {
"ExpectedInstructionCount": 2,
"Comment": "0x0e",
"ExpectedArm64ASM": [
"ldrh w20, [x28, #962]",
"str w20, [x8, #-4]!"
]
},
"push ss": {
"ExpectedInstructionCount": 2,
"Comment": "0x16",
"ExpectedArm64ASM": [
"ldrh w20, [x28, #964]",
"str w20, [x8, #-4]!"
]
},
"pop ss": {
"ExpectedInstructionCount": 22,
"Comment": "0x17",
"ExpectedArm64ASM": [
"ldr w20, [x8], #4",
"ldrb w21, [x28, #1016]",
"mov w22, #0x1",
"and w21, w21, #0x1",
"ldrb w23, [x28, #1016]",
"and w23, w23, #0xfffffffe",
"mrs x12, nzcv",
"cmp x21, #0x0 (0)",
"csel x21, x23, x22, eq",
"strb w21, [x28, #1016]",
"strh w20, [x28, #964]",
"ubfx w21, w20, #2, #1",
"and w20, w20, #0xfff8",
"add x0, x28, x21, lsl #3",
"ldr x21, [x0, #1184]",
"ldr x20, [x21, w20, uxtw]",
"lsr x21, x20, #32",
"and w22, w21, #0xff000000",
"orr w20, w22, w20, lsr #16",
"bfi w20, w21, #16, #8",
"str w20, [x28, #984]",
"msr nzcv, x12"
]
},
"push ds": {
"ExpectedInstructionCount": 2,
"Comment": "0x1e",
"ExpectedArm64ASM": [
"ldrh w20, [x28, #966]",
"str w20, [x8, #-4]!"
]
},
"pop ds": {
"ExpectedInstructionCount": 12,
"Comment": "0x1f",
"ExpectedArm64ASM": [
"ldr w20, [x8], #4",
"strh w20, [x28, #966]",
"ubfx w21, w20, #2, #1",
"and w20, w20, #0xfff8",
"add x0, x28, x21, lsl #3",
"ldr x21, [x0, #1184]",
"ldr x20, [x21, w20, uxtw]",
"lsr x21, x20, #32",
"and w22, w21, #0xff000000",
"orr w20, w22, w20, lsr #16",
"bfi w20, w21, #16, #8",
"str w20, [x28, #988]"
]
},
"daa": {
"ExpectedInstructionCount": 23,
"Comment": "0x27",
"ExpectedArm64ASM": [
"uxtb w20, w4",
"cset x21, hs",
"and x22, x20, #0xf",
"cmp x22, #0x9 (9)",
"cset x22, hi",
"eor x23, x27, x26",
"ubfx w23, w23, #4, #1",
"orr x22, x23, x22",
"cmp x20, #0x99 (153)",
"cset x23, ls",
"and x21, x21, x23",
"add x23, x20, #0x6 (6)",
"cmp x22, #0x0 (0)",
"csel x20, x23, x20, ne",
"add x23, x20, #0x60 (96)",
"cmp x21, #0x0 (0)",
"csel x26, x23, x20, eq",
"bfxil x4, x26, #0, #8",
"cmn wzr, w26, lsl #24",
"mrs x20, nzcv",
"bfi w20, w21, #29, #1",
"eor w27, w26, w22, lsl #4",
"msr nzcv, x20"
]
},
"das": {
"ExpectedInstructionCount": 27,
"Comment": "0x2f",
"ExpectedArm64ASM": [
"uxtb w20, w4",
"cset x21, lo",
"and x22, x20, #0xf",
"cmp x22, #0x9 (9)",
"cset x22, hi",
"eor x23, x27, x26",
"ubfx w23, w23, #4, #1",
"orr x22, x23, x22",
"cmp x20, #0x99 (153)",
"cset x23, hi",
"orr x21, x21, x23",
"cmp x20, #0x6 (6)",
"csel x23, x22, x21, lo",
"orr w23, w21, w23",
"sub x12, x20, #0x6 (6)",
"cmp x22, #0x0 (0)",
"csel x20, x12, x20, ne",
"sub x12, x20, #0x60 (96)",
"cmp x21, #0x0 (0)",
"csel x26, x12, x20, ne",
"bfxil x4, x26, #0, #8",
"cmn wzr, w26, lsl #24",
"eor x20, x23, #0x1",
"mrs x21, nzcv",
"bfi w21, w20, #29, #1",
"eor w27, w26, w22, lsl #4",
"msr nzcv, x21"
]
},
"aaa": {
"ExpectedInstructionCount": 13,
"Comment": "0x37",
"ExpectedArm64ASM": [
"and x20, x4, #0xf",
"cmp x20, #0x9 (9)",
"cset x20, hi",
"eor x21, x27, x26",
"ubfx w21, w21, #4, #1",
"orr x20, x21, x20",
"cmp wzr, w20",
"eor w27, w26, w20, lsl #4",
"add w20, w4, #0x106 (262)",
"csel w20, w20, w4, lo",
"mov w21, #0xff0f",
"and w20, w20, w21",
"bfxil x4, x20, #0, #16"
]
},
"aas": {
"ExpectedInstructionCount": 13,
"Comment": "0x3f",
"ExpectedArm64ASM": [
"and x20, x4, #0xf",
"cmp x20, #0x9 (9)",
"cset x20, hi",
"eor x21, x27, x26",
"ubfx w21, w21, #4, #1",
"orr x20, x21, x20",
"cmp wzr, w20",
"eor w27, w26, w20, lsl #4",
"sub w20, w4, #0x106 (262)",
"csel w20, w20, w4, lo",
"mov w21, #0xff0f",
"and w20, w20, w21",
"bfxil x4, x20, #0, #16"
]
},
"inc ax": {
"ExpectedInstructionCount": 10,
"Comment": "0x40",
"ExpectedArm64ASM": [
"uxth w27, w4",
"mov w20, #0x1",
"cset x21, hs",
"lsl w0, w27, #16",
"cmn w0, w20, lsl #16",
"add w26, w27, #0x1 (1)",
"mrs x20, nzcv",
"bfi w20, w21, #29, #1",
"bfxil x4, x26, #0, #16",
"msr nzcv, x20"
]
},
"inc eax": {
"ExpectedInstructionCount": 7,
"Comment": "0x40",
"ExpectedArm64ASM": [
"cset x20, hs",
"adds w26, w4, #0x1 (1)",
"mrs x21, nzcv",
"bfi w21, w20, #29, #1",
"msr nzcv, x21",
"mov x27, x4",
"mov x4, x26"
]
},
"dec ax": {
"ExpectedInstructionCount": 10,
"Comment": "0x48",
"ExpectedArm64ASM": [
"uxth w27, w4",
"mov w20, #0x1",
"cset x21, hs",
"lsl w0, w27, #16",
"cmp w0, w20, lsl #16",
"sub w26, w27, #0x1 (1)",
"mrs x20, nzcv",
"bfi w20, w21, #29, #1",
"bfxil x4, x26, #0, #16",
"msr nzcv, x20"
]
},
"push ax": {
"ExpectedInstructionCount": 1,
"Comment": "0x50",
"ExpectedArm64ASM": [
"strh w4, [x8, #-2]!"
]
},
"push eax": {
"ExpectedInstructionCount": 1,
"Comment": "0x50",
"ExpectedArm64ASM": [
"str w4, [x8, #-4]!"
]
},
"dec eax": {
"ExpectedInstructionCount": 7,
"Comment": "0x48",
"ExpectedArm64ASM": [
"cset x20, hs",
"subs w26, w4, #0x1 (1)",
"mrs x21, nzcv",
"bfi w21, w20, #29, #1",
"msr nzcv, x21",
"mov x27, x4",
"mov x4, x26"
]
},
"pusha": {
"ExpectedInstructionCount": 5,
"Comment": "0x60",
"ExpectedArm64ASM": [
"mov x20, x8",
"stp w7, w4, [x8, #-8]!",
"stp w6, w5, [x8, #-8]!",
"stp w9, w20, [x8, #-8]!",
"stp w11, w10, [x8, #-8]!"
]
},
"pushad": {
"ExpectedInstructionCount": 5,
"Comment": "0x60",
"ExpectedArm64ASM": [
"mov x20, x8",
"stp w7, w4, [x8, #-8]!",
"stp w6, w5, [x8, #-8]!",
"stp w9, w20, [x8, #-8]!",
"stp w11, w10, [x8, #-8]!"
]
},
"popa": {
"ExpectedInstructionCount": 7,
"Comment": "0x61",
"ExpectedArm64ASM": [
"mov x20, x8",
"ldp w11, w10, [x20], #8",
"ldr w9, [x20], #4",
"add x20, x20, #0x4 (4)",
"mov x8, x20",
"ldp w6, w5, [x8], #8",
"ldp w7, w4, [x8], #8"
]
},
"popad": {
"ExpectedInstructionCount": 7,
"Comment": "0x61",
"ExpectedArm64ASM": [
"mov x20, x8",
"ldp w11, w10, [x20], #8",
"ldr w9, [x20], #4",
"add x20, x20, #0x4 (4)",
"mov x8, x20",
"ldp w6, w5, [x8], #8",
"ldp w7, w4, [x8], #8"
]
},
"aam": {
"ExpectedInstructionCount": 10,
"Comment": "0xd4",
"ExpectedArm64ASM": [
"uxtb w20, w4",
"mov w21, #0xa",
"udiv x22, x20, x21",
"msub x12, x22, x21, x20",
"add x26, x12, x22, lsl #8",
"bfxil x4, x26, #0, #16",
"cmn wzr, w26, lsl #24",
"mrs x20, nzcv",
"eor w20, w20, #0x20000000",
"msr nzcv, x20"
]
},
"aad": {
"ExpectedInstructionCount": 10,
"Comment": "0xd5",
"ExpectedArm64ASM": [
"lsr w20, w4, #8",
"mov w21, #0xa",
"mul x20, x20, x21",
"add x20, x4, x20",
"and x26, x20, #0xff",
"bfxil x4, x26, #0, #16",
"cmn wzr, w26, lsl #24",
"mrs x20, nzcv",
"eor w20, w20, #0x20000000",
"msr nzcv, x20"
]
},
"db 0xd4, 0x40": {
"ExpectedInstructionCount": 10,
"Comment": [
"aam with a different immediate byte base",
"0xd4"
],
"ExpectedArm64ASM": [
"uxtb w20, w4",
"mov w21, #0x40",
"udiv x22, x20, x21",
"msub x12, x22, x21, x20",
"add x26, x12, x22, lsl #8",
"bfxil x4, x26, #0, #16",
"cmn wzr, w26, lsl #24",
"mrs x20, nzcv",
"eor w20, w20, #0x20000000",
"msr nzcv, x20"
]
},
"db 0xd5, 0x40": {
"ExpectedInstructionCount": 10,
"Comment": [
"aad with a different immediate byte base",
"0xd5"
],
"ExpectedArm64ASM": [
"lsr w20, w4, #8",
"mov w21, #0x40",
"mul x20, x20, x21",
"add x20, x4, x20",
"and x26, x20, #0xff",
"bfxil x4, x26, #0, #16",
"cmn wzr, w26, lsl #24",
"mrs x20, nzcv",
"eor w20, w20, #0x20000000",
"msr nzcv, x20"
]
},
"salc": {
"ExpectedInstructionCount": 2,
"Comment": "0xd6",
"ExpectedArm64ASM": [
"csetm w20, lo",
"bfxil x4, x20, #0, #8"
]
}
}
}