Last active
September 2, 2020 01:56
-
-
Save zwegner/4ed5ce68a68b52809a852c5b541b0148 to your computer and use it in GitHub Desktop.
Find uops that execute on p1 pre-ICL and on p0156 on ICL (x86-info-term example query code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from x86_info_term import get_cache | |
args, cache = get_cache() | |
uops_info = cache['datasets']['uops_info']['data'] | |
for inst in uops_info: | |
for form in uops_info[inst]['forms']: | |
if 'ICL' in form['arch'] and 'SKX' in form['arch']: | |
ports_s = form['arch']['SKX'][0] | |
ports_i = form['arch']['ICL'][0] | |
results = [bool(re.search(pat, ports)) for pat in [r'\bp1\b', r'\bp0156\b'] | |
for ports in [ports_s, ports_i]] | |
if results == [1, 0, 0, 1]: | |
print(inst, ports_s, ports_i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment