Emit LAHF/SAHF instead of PUSHF/POPF (original) (raw)

This is an archive of the discontinued LLVM Phabricator instance.

Table of Contentst-llvm/trunk/-trunk/-lib/-CodeGen/3MachineInstrBundle.cpp-Target/X86/-X86/-X86InstrInfo.cpp-test/CodeGen/X86/-CodeGen/-X86/-cmpxchg-clobber-flags.llHide PanelfKeyboard Reference? Differential D6629 Authored by jfb on Dec 11 2014, 2:58 PM.Download Raw DiffReviewers t.p.northoverrnkjvoung Commits rGfa9746dc8d86: x86: Emit LAHF/SAHF instead of PUSHF/POPFrL244503: x86: Emit LAHF/SAHF instead of PUSHF/POPF Repository rL LLVM Event Timelinejfb updated this revision to Diff 17195.jfb retitled this revision from to x86 NaCl: Emit LAHF/SAHF instead of PUSHF/POPF.jfb updated this object.jfb edited the test plan for this revision. (Show Details)jfb added reviewers: t.p.northover, jvoung.jfb added a subscriber: Unknown Object (MLST).Herald added a subscriber: jfb. t.p.northover added inline comments.lib/Target/X86/X86InstrInfo.cpp 3281–3282 ↗(On Diff #17195)jfb added inline comments.lib/Target/X86/X86InstrInfo.cpp 3281–3282 ↗(On Diff #17195)Comment ActionsComment ActionsComment Actionslib/Target/X86/X86InstrInfo.cpp 3281–3282 ↗(On Diff #17195)Comment ActionsComment ActionsComment ActionsComment ActionsComment Actionsjvoung added inline comments.test/CodeGen/X86/cmpxchg-clobber-flags.ll 5 ↗(On Diff #17245)jfb mentioned this in D6687: x86-32: PUSHF/POPF use/def EFLAGS.jfb added inline comments.test/CodeGen/X86/cmpxchg-clobber-flags.ll 5 ↗(On Diff #17245)jfb mentioned this in rL224359: x86-32: PUSHF/POPF use/def EFLAGS.Comment ActionsComment ActionsComment ActionsComment ActionsComment ActionsComment ActionsComment ActionsComment ActionsComment ActionsComment Actionsjfb retitled this revision from x86 NaCl: Emit LAHF/SAHF instead of PUSHF/POPF to x86: Emit LAHF/SAHF instead of PUSHF/POPF.jfb updated this object.Comment ActionsComment ActionsComment Actionsjfb mentioned this in rL244121: Revert "Fix MO's analyzePhysReg, it was confusing sub- and super-registers..rnk added inline comments.lib/Target/X86/X86InstrInfo.cpp 3912–3913 ↗(On Diff #31273) 3940 ↗(On Diff #31273)Comment Actionslib/Target/X86/X86InstrInfo.cpp 3940 ↗(On Diff #31273)Comment ActionsThis revision is now accepted and ready to land.Closed by commit rL244503: x86: Emit LAHF/SAHF instead of PUSHF/POPF (authored by jfb). This revision was automatically updated to reflect the committed changes.Comment Actionssanjoy added a subscriber: sanjoy.sanjoy added inline comments.llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp 313jfb added inline comments.llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp 313sanjoy added inline comments.llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp 313maksfb mentioned this in rG85ffa8e4ba44: [PR][BOLT][Instrumentation] Optimize eflags load/store.FilesHistoryCommitsPathSizellvm/trunk/lib/CodeGen/MachineInstrBundle.cpp2 linesTarget/X86/X86InstrInfo.cpp79 linestest/CodeGen/X86/cmpxchg-clobber-flags.ll126 linesDiffIDBaseDescriptionCreatedLintUnitBaseBaseDiff 117195224056Dec 11 2014, 2:58 PM★★Diff 217245224056Save OF too.Dec 12 2014, 1:53 PM★★Diff 317356224359Rebase to grab cahnges from D6629, including -verify-machineinstrs. I still need to fix the new tests, which now fail verification.Dec 16 2014, 12:44 PM★★Diff 417481224444Check liveness of AX before push/pop.Dec 18 2014, 8:13 PM★★Diff 517482224444Update test to properly eliminate dead AX push/pop. My previous comment was wrong: AX was indeed defined but subsequently unused. The test now exercise live AX before and after the call, and everything looks good.Dec 18 2014, 8:32 PM★★Diff 617497224444CALL is now preceded by MOV since @bar takes arguments.Dec 19 2014, 9:02 AM★★Diff 717522224444Remove the NaCl specificity, and never emit PUSHF/POPF. Update the test accordingly.Dec 19 2014, 2:56 PM★★Diff 831273243904 - Fix MO's analyzePhysReg, it was confusing sub- and super-registers. Problem pointed out by Michael Hordijk.Aug 3 2015, 3:06 PM★★Diff 931406244156 - Comment on correctness.Aug 5 2015, 3:43 PM★★Diff 1031719244502Commit rL244503Aug 10 2015, 1:59 PM★★This file is larger than 256 KB, so syntax highlighting is disabled by default.