This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis][X86] Save and restore eflags.
ClosedPublic

Authored by courbet on Nov 4 2020, 1:17 AM.

Details

Summary

This is needed to benchmark instruction that touch EFLAGS (e.g. STD: set direction flag).

Diff Detail

Event Timeline

courbet created this revision.Nov 4 2020, 1:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2020, 1:17 AM
Herald added a subscriber: mstojanovic. · View Herald Transcript
courbet requested review of this revision.Nov 4 2020, 1:17 AM
This revision is now accepted and ready to land.Nov 4 2020, 1:42 AM
This revision was landed with ongoing or failed builds.Nov 4 2020, 1:44 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Nov 4 2020, 4:18 AM

Looks like this doesn't build on windows: http://45.33.8.238/win/27220/step_4.txt

Looks like this doesn't build on windows: http://45.33.8.238/win/27220/step_4.txt

Thanks, I missed this bot. I'll send a fix.

Looks like this doesn't build on windows: http://45.33.8.238/win/27220/step_4.txt

Thanks, I missed this bot. I'll send a fix.

9287eb352e6c

anna added a subscriber: anna.Nov 11 2020, 1:55 PM

hi @courbet,
our internal buildbots at Azul has failed because of an older assembler. We’ve taken in all commits/reverts/relands w.r.t this change upto Nov 4th.

The specific failure is:
/tmp/cc2lBtEi.s: Assembler messages:
/tmp/cc2lBtEi.s:541: Error: no such instruction: `fxsave64 16(%rax)'
/tmp/cc2lBtEi.s:566: Error: no such instruction: `fxrstor64 16(%rdi)'
/tmp/cc2lBtEi.s:592: Error: no such instruction: `fxrstor64 16(%rdi)'
make[2]: *** [tools/llvm-exegesis/lib/X86/CMakeFiles/LLVMExegesisX86.dir/Target.cpp.o] Error 1

Any suggestions to fix this apart from an upgrade (which seems to be a very invasive change on our machines)?

hi @courbet,
our internal buildbots at Azul has failed because of an older assembler. We’ve taken in all commits/reverts/relands w.r.t this change upto Nov 4th.

The specific failure is:
/tmp/cc2lBtEi.s: Assembler messages:
/tmp/cc2lBtEi.s:541: Error: no such instruction: `fxsave64 16(%rax)'
/tmp/cc2lBtEi.s:566: Error: no such instruction: `fxrstor64 16(%rdi)'
/tmp/cc2lBtEi.s:592: Error: no such instruction: `fxrstor64 16(%rdi)'
make[2]: *** [tools/llvm-exegesis/lib/X86/CMakeFiles/LLVMExegesisX86.dir/Target.cpp.o] Error 1

Any suggestions to fix this apart from an upgrade (which seems to be a very invasive change on our machines)?

Which assembler are you using ? Is is configured for 64-bit targets ?

anna added a comment.Nov 12 2020, 7:05 AM

We use the GNU assembler and it is configured for 64 bit machines. Here's the details from one of the machines:

as --version
GNU assembler version 2.20.51.0.2-5.47.el6_9.1 20100205
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-redhat-linux'

Also, note that I tagged this against the incorrect review. The change causing the failures is https://reviews.llvm.org/D90592. I'm going to paste this there and we can continue discussion there.