mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 09:00:05 +01:00
Merge pull request #62 from jdomke/attfix
att parser: workaround for crash with "jg,pt" mnemonic For now we will ignore the branch taken/not-taken indication and will only keep the condition in the mnemonic.
This commit is contained in:
@@ -158,7 +158,7 @@ class ParserX86ATT(BaseParser):
|
||||
# Instructions
|
||||
# Mnemonic
|
||||
mnemonic = pp.ZeroOrMore(pp.Literal('data16') | pp.Literal('data32')) + pp.Word(
|
||||
pp.alphanums
|
||||
pp.alphanums + ','
|
||||
).setResultsName('mnemonic')
|
||||
# Combine to instruction form
|
||||
operand_first = pp.Group(
|
||||
@@ -288,7 +288,7 @@ class ParserX86ATT(BaseParser):
|
||||
operands.append(self.process_operand(result['operand4']))
|
||||
return_dict = AttrDict(
|
||||
{
|
||||
self.INSTRUCTION_ID: result['mnemonic'],
|
||||
self.INSTRUCTION_ID: result['mnemonic'].split(',')[0],
|
||||
self.OPERANDS_ID: operands,
|
||||
self.COMMENT_ID: ' '.join(result[self.COMMENT_ID])
|
||||
if self.COMMENT_ID in result
|
||||
|
||||
Reference in New Issue
Block a user