Skip to content

Commit

Permalink
check for and remove double-colon error in datafiles
Browse files Browse the repository at this point in the history
  * removed several double colon errors in the data files.

  * intelxed#209

Change-Id: I53708494a0d20fc36e6c2b481918ad5a60a29e6d
(cherry picked from commit 9fb5ca17e1b951df2fbdf7c408c74698be2c8efb)
  • Loading branch information
mjcharne authored and markcharney committed Aug 21, 2019
1 parent d6cbac3 commit d1666d0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion datafiles/avx/avx-isa.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4237,7 +4237,7 @@ OPERANDS : REG0=XMM_R():r:dq REG1=XMM_B():r:dq IMM0:r:b REG2=XED_REG_ECX:w:
}
{
ICLASS : VPCMPISTRI64
DISASM: : vpcmpistri
DISASM : vpcmpistri
EXCEPTIONS: avx-type-4
CPL : 3
CATEGORY : STTNI
Expand Down
2 changes: 1 addition & 1 deletion datafiles/hsw/lzcnt-isa.xed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ VERSION : 2
CPL : 3
CATEGORY : LZCNT
EXTENSION : LZCNT
COMMENT: : These next one WAS introduced first by AMD circa SSE4a.
COMMENT : These next one WAS introduced first by AMD circa SSE4a.
FLAGS : MUST [ cf-mod zf-mod of-u af-u pf-u sf-u ]
PATTERN : 0x0F 0xBD f3_refining_prefix LZCNT=1 MOD[mm] MOD!=3 REG[rrr] RM[nnn] MODRM()
OPERANDS : REG0=GPRv_R():w:v MEM0:r:v
Expand Down
4 changes: 2 additions & 2 deletions datafiles/xed-amd-prefetch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CPL : 3
ATTRIBUTES: PREFETCH
CATEGORY : PREFETCH
EXTENSION : 3DNOW
COMMENT: : was PREFETCH_MODIFIED, prefetch on >=broadwell and >=silvermont
COMMENT : was PREFETCH_MODIFIED, prefetch on >=broadwell and >=silvermont
ISA_SET : PREFETCH_NOP
PATTERN : 0x0F 0x0D MOD[mm] MOD!=3 REG[0b001] RM[nnn] MODRM()
OPERANDS : MEM0:r:mprefetch
Expand All @@ -73,7 +73,7 @@ CPL : 3
ATTRIBUTES: PREFETCH
CATEGORY : PREFETCH
EXTENSION : 3DNOW
COMMENT: : was PREFETCH_MODIFIED
COMMENT : was PREFETCH_MODIFIED
ISA_SET : PREFETCH_NOP
PATTERN : 0x0F 0x0D MOD[mm] MOD!=3 REG[0b011] RM[nnn] MODRM()
OPERANDS : MEM0:r:mprefetch
Expand Down
2 changes: 2 additions & 0 deletions pysrc/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,8 @@ def read_structured_flexible(self,lines):
(token, rest ) = line.split(':',1)
token = token.strip()
rest = rest.strip()
if rest.startswith(':'):
die("Double colon error {}".format(line))

# Certain tokens can be duplicated. We allow for triples
# of (pattern,operands,iform). The iform is optional. If
Expand Down
2 changes: 2 additions & 0 deletions pysrc/read_xed_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ def _process_input_lines(self,fn):
key, value = line.split(":",1)
key = key.strip()
value = value.strip()
if value.startswith(':'):
die("Double colon error {}".format(line))
if key == 'IFORM':
# fill in missing iforms with empty strings
x = len(d['PATTERN']) - 1
Expand Down

0 comments on commit d1666d0

Please sign in to comment.