Index: lib/Target/X86/X86InstrFPStack.td =================================================================== --- lib/Target/X86/X86InstrFPStack.td +++ lib/Target/X86/X86InstrFPStack.td @@ -631,6 +631,9 @@ def FNINIT : I<0xDB, MRM_E3, (outs), (ins), "fninit", [], IIC_FNINIT>; def FFREE : FPI<0xDD, MRM0r, (outs), (ins RST:$reg), "ffree\t$reg", IIC_FFREE>; +def FFREEP : FPI<0xDF, MRM0r, (outs), (ins RST:$reg), + "ffreep\t$reg", IIC_FFREE>; + // Clear exceptions let Defs = [FPSW] in Index: test/MC/Disassembler/X86/fp-stack.txt =================================================================== --- test/MC/Disassembler/X86/fp-stack.txt +++ test/MC/Disassembler/X86/fp-stack.txt @@ -985,6 +985,30 @@ # CHECK: fdivrp %st(7) 0xde,0xff +# CHECK: ffreep %st(0) +0xdf,0xc0 + +# CHECK: ffreep %st(1) +0xdf,0xc1 + +# CHECK: ffreep %st(2) +0xdf,0xc2 + +# CHECK: ffreep %st(3) +0xdf,0xc3 + +# CHECK: ffreep %st(4) +0xdf,0xc4 + +# CHECK: ffreep %st(5) +0xdf,0xc5 + +# CHECK: ffreep %st(6) +0xdf,0xc6 + +# CHECK: ffreep %st(7) +0xdf,0xc7 + # CHECK: fnstsw %ax 0xdf,0xe0 Index: test/MC/X86/x86-32-coverage.s =================================================================== --- test/MC/X86/x86-32-coverage.s +++ test/MC/X86/x86-32-coverage.s @@ -2747,6 +2747,10 @@ // CHECK: encoding: [0xdd,0xc2] ffree %st(2) +// CHECK: ffreep %st(2) +// CHECK: encoding: [0xdf,0xc2] + ffreep %st(2) + // CHECK: fnop // CHECK: encoding: [0xd9,0xd0] fnop