i386: Rewrite pushfl<mode>2 and popfl<mode>1 as unspecs
Flags reg is valid only with CC mode.
gcc/ChangeLog:
* config/i386/i386-expand.h (gen_pushfl): New prototype.
(gen_popfl): Ditto.
* config/i386/i386-expand.cc (ix86_expand_builtin)
[case IX86_BUILTIN_READ_FLAGS]: Use gen_pushfl.
[case IX86_BUILTIN_WRITE_FLAGS]: Use gen_popfl.
* config/i386/i386.cc (gen_pushfl): New function.
(gen_popfl): Ditto.
* config/i386/i386.md (unspec): Add UNSPEC_PUSHFL and UNSPEC_POPFL.
(@pushfl<mode>2): Rename from *pushfl<mode>2.
Rewrite as unspec using UNSPEC_PUSHFL.
(@popfl<mode>1): Rename from *popfl<mode>1.
Rewrite as unspec using UNSPEC_POPFL.