Commit a24a3b0e authored by Taddeus Kroes's avatar Taddeus Kroes

Fixed match object usage in statement class.

parent 5b6e6336
...@@ -159,7 +159,7 @@ class Statement: ...@@ -159,7 +159,7 @@ class Statement:
or self.is_set_if_less() or self.is_convert() \ or self.is_set_if_less() or self.is_convert() \
or self.is_truncate() or self.is_load() \ or self.is_truncate() or self.is_load() \
or self.is_command(*instr): or self.is_command(*instr):
return [self[0]] return self[:1]
return [] return []
...@@ -170,11 +170,13 @@ class Statement: ...@@ -170,11 +170,13 @@ class Statement:
use = [] use = []
# Case arg0 # Case arg0
if self.is_branch() or self.is_store() or self.is_compare()\ if self.is_branch() or self.is_store() or self.is_compare() \
or self.is_command(*['mult', 'div', 'dsz']): or self.is_command(*['mult', 'div', 'dsz']):
if self.name == 'dsz': if self.name == 'dsz':
m = re.match('^\d+\(([^)]+)\)$', self[0]) m = re.match('^\d+\(([^)]+)\)$', self[0])
use.append(m)
if m:
use.append(m.group(1))
else: else:
use.append(self[0]) use.append(self[0])
# Case arg1 direct adressing # Case arg1 direct adressing
...@@ -187,8 +189,9 @@ class Statement: ...@@ -187,8 +189,9 @@ class Statement:
# Case arg1 relative adressing # Case arg1 relative adressing
if self.is_load_non_immediate() or self.is_store(): if self.is_load_non_immediate() or self.is_store():
m = re.match('^\d+\(([^)]+)\)$', self[1]) m = re.match('^\d+\(([^)]+)\)$', self[1])
if m: if m:
use.append(m) use.append(m.group(1))
else: else:
use.append(self[1]) use.append(self[1])
# Case arg2 # Case arg2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment