Skip to content

Commit

Permalink
Replace fstcw with fnstcw
Browse files Browse the repository at this point in the history
The fstX instructions are actually aliases for 'waitf' followed by
the fnstX variant. There's no need to have both.
  • Loading branch information
hainest committed Nov 28, 2023
1 parent 21bd8db commit 6fcfa17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion common/h/mnemonics/x86_entryIDs.h
Expand Up @@ -187,7 +187,6 @@ e_fprem,
e_frstor,
e_fsave,
e_fst,
e_fstcw,
e_fstenv,
e_fstp,
e_fstsw,
Expand Down
4 changes: 2 additions & 2 deletions common/src/arch-x86.C
Expand Up @@ -1032,7 +1032,7 @@ COMMON_EXPORT dyn_hash_map<entryID, std::string> entryNames_IAPI = map_list_of
(e_frstor, "frstor")
(e_fsave, "fsave")
(e_fst, "fst")
(e_fstcw, "fstcw")
(e_fnstcw, "fnstcw")
(e_fstenv, "fstenv")
(e_fstp, "fstp")
(e_fstsw, "fstsw")
Expand Down Expand Up @@ -3456,7 +3456,7 @@ static ia32_entry fpuMap[][2][8] = {
{ e_fldenv, t_done, 0, true, { M14, Zz, Zz }, 0, s1R, 0 },
{ e_fldcw, t_done, 0, true, { Ew, Zz, Zz }, 0, s1R, 0 },
{ e_fstenv, t_done, 0, true, { M14, Zz, Zz }, 0, s1W, 0 },
{ e_fstcw, t_done, 0, true, { Ew, Zz, Zz }, 0, s1W, 0 }
{ e_fnstcw, t_done, 0, true, { Ew, Zz, Zz }, 0, s1W, 0 }
},
{ // D9
{ e_fld, t_done, 0, true, { ST0, Ef, Zz }, 0, s1W2R, 0 }, // stack push
Expand Down
2 changes: 1 addition & 1 deletion dataflowAPI/src/convertOpcodes.C
Expand Up @@ -406,7 +406,7 @@ X86InstructionKind RoseInsnX86Factory::convertKind(entryID opcode, prefixEntryID
return x86_fnsave;
case e_fst:
return x86_fst;
case e_fstcw:
case e_fnstcw:
return x86_fnstcw;
case e_fstenv:
return x86_fnstenv;
Expand Down

0 comments on commit 6fcfa17

Please sign in to comment.