PR30120: fix x87 fucomp misassembled

this fixes the entry for 'fucomp' to use the correct Reg value
(otherwise it's assembled as 'fucom').
This commit is contained in:
Michael Matz
2023-02-13 18:20:44 +01:00
parent da59d966b8
commit 25a0d393c7
4 changed files with 22 additions and 5 deletions

View File

@ -80,6 +80,15 @@
67 0080 DEFB [ ]*fdivrp %st\(3\)
68 0082 DEFB [ ]*fdivrp %st,%st\(3\)
69 [ ]*
70 0084 00000000 [ ]*.p2align 4,0
70 00000000
70 00000000
70 0084 DDE9 [ ]*fucomp %st\(1\)
71 0086 DDE2 [ ]*fucom %st\(2\)
72 0088 DAE9 [ ]*fucompp
73 008a DBF2 [ ]*fcomi %st\(2\)
74 008c DFF3 [ ]*fcomip %st\(3\)
75 008e DBEC [ ]*fucomi %st\(4\)
76 0090 DFED [ ]*fucomip %st\(5\)
77 [ ]*
78 0092 00000000 [ ]*.p2align 4,0
78 00000000
78 00000000
78 0000

View File

@ -67,4 +67,12 @@
fdivrp %st(3)
fdivrp %st,%st(3)
fucomp %st(1)
fucom %st(2)
fucompp
fcomi %st(2)
fcomip %st(3)
fucomi %st(4)
fucomip %st(5)
.p2align 4,0

View File

@ -651,7 +651,7 @@ fcompp, 0xded9, FP, NoSuf, {}
fucom, 0xdd/4, i387, Modrm|NoSuf, { FloatReg }
// alias for fucom %st(1)
fucom, 0xdde1, i387, NoSuf, {}
fucomp, 0xdd/4, i387, Modrm|NoSuf, { FloatReg }
fucomp, 0xdd/5, i387, Modrm|NoSuf, { FloatReg }
// alias for fucomp %st(1)
fucomp, 0xdde9, i387, NoSuf, {}
fucompp, 0xdae9, i387, NoSuf, {}

View File

@ -5290,7 +5290,7 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } } } },
{ MN_fucomp, 0xdd, 1, SPACE_BASE, 4,
{ MN_fucomp, 0xdd, 1, SPACE_BASE, 5,
{ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,