From 76542782c805e1e3b6ead5e33d0690416f8caba2 Mon Sep 17 00:00:00 2001 From: JanLJL Date: Mon, 29 Aug 2022 11:30:46 +0200 Subject: [PATCH] formatting --- osaca/data/create_db_entry.py | 26 ++++++++++++-------------- osaca/data/generate_mov_entries.py | 24 +++++++++++------------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/osaca/data/create_db_entry.py b/osaca/data/create_db_entry.py index bd45bfd..38c85f0 100755 --- a/osaca/data/create_db_entry.py +++ b/osaca/data/create_db_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from collections import OrderedDict, defaultdict +from collections import defaultdict from fractions import Fraction @@ -42,7 +42,9 @@ class EntryBuilder: description += ' scale: "*"\n' else: if "{k}" in ot: - description += " - class: register\n name: {}\n mask: True\n".format(ot.replace("{k}", "")) + description += " - class: register\n name: {}\n mask: True\n".format( + ot.replace("{k}", "") + ) else: description += " - class: register\n name: {}\n".format(ot) @@ -107,15 +109,13 @@ class EntryBuilderIntelPort9(EntryBuilder): port_pressure = port_pressure + [[1, "79"], [1, "48"]] operands = ["mem" if o == "mem" else o for o in operand_types] latency += 0 - return ( - EntryBuilder.build_description( - self, - instruction_name, - operands, - port_pressure, - latency, - "with store", - ) + return EntryBuilder.build_description( + self, + instruction_name, + operands, + port_pressure, + latency, + "with store", ) # Register only: @@ -132,9 +132,7 @@ def get_description(instruction_form, port_pressure, latency, rhs_comment=None): commented_entry = "" for line in entry.split("\n"): - commented_entry += ("{:<" + str(max_length) + "} # {}\n").format( - line, rhs_comment - ) + commented_entry += ("{:<" + str(max_length) + "} # {}\n").format(line, rhs_comment) entry = commented_entry return entry diff --git a/osaca/data/generate_mov_entries.py b/osaca/data/generate_mov_entries.py index eb7f081..8fd4fba 100755 --- a/osaca/data/generate_mov_entries.py +++ b/osaca/data/generate_mov_entries.py @@ -126,15 +126,13 @@ class MOVEntryBuilderIntelPort9(MOVEntryBuilder): port_pressure = port_pressure + [[1, "79"], [1, "48"]] operands = ["mem" if o == "mem" else o for o in operand_types] latency += 0 - return ( - MOVEntryBuilder.build_description( - self, - instruction_name, - operands, - port_pressure, - latency, - "with store", - ) + return MOVEntryBuilder.build_description( + self, + instruction_name, + operands, + port_pressure, + latency, + "with store", ) # Register only: @@ -243,7 +241,7 @@ icx_mov_instructions = [ ("vmovdqa64 zmm zmm", ("1*p05", 1)), ("vmovdqa64 mem zmm", ("", 0)), ("vmovdqa64 zmm mem", ("", 0)), - # https://www.felixcloutier.com/x86/movdqu:vmovdqu8:vmovdqu16:vmovdqu32:vmovdqu64 + # https://www.felixcloutier.com/x86/movdqu:vmovdqu8:vmovdqu16:vmovdqu32:vmovdqu64 ("movdqu xmm xmm", ("1*p015", 1)), ("movdqu mem xmm", ("", 0)), ("movdqu xmm mem", ("", 0)), @@ -330,9 +328,9 @@ icx_mov_instructions = [ ("vmovntdq zmm mem", ("", 0)), # TODO NT-store: what latency to use? # https://www.felixcloutier.com/x86/movntdqa ("movntdqa mem xmm", ("", 0)), # TODO NT-store: what latency to use? - ("vmovntdqa mem xmm", ("", 0)), # TODO NT-store: what latency to use? - ("vmovntdqa mem ymm", ("", 0)), # TODO NT-store: what latency to use? - ("vmovntdqa mem zmm", ("", 0)), # TODO NT-store: what latency to use? + ("vmovntdqa mem xmm", ("", 0)), # TODO NT-store: what latency to use? + ("vmovntdqa mem ymm", ("", 0)), # TODO NT-store: what latency to use? + ("vmovntdqa mem zmm", ("", 0)), # TODO NT-store: what latency to use? # https://www.felixcloutier.com/x86/movnti ("movnti gpr mem", ("", 0)), # TODO NT-store: what latency to use? # https://www.felixcloutier.com/x86/movntpd