Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
peephole
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
peephole
Commits
fdd0ba24
Commit
fdd0ba24
authored
Dec 30, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mtc1 use and def.
parent
93e40ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/statement.py
src/statement.py
+7
-5
No files found.
src/statement.py
View file @
fdd0ba24
...
...
@@ -150,8 +150,10 @@ class Statement:
def get_def(self):
"""Get the variable that this statement defines, if any."""
instr = ['
move
', '
addu
', '
subu
', '
li
', '
mtc1
', '
dmfc1
', '
mov
.
d
']
instr = ['
move
', '
addu
', '
subu
', '
li
', '
dmfc1
', '
mov
.
d
']
if self.is_command('
mtc1
'):
return [self[1]]
if self.is_load_non_immediate() or self.is_arith()
\
or self.is_logical() or self.is_double_arithmetic()
\
or self.is_move_from_spec() or self.is_double_unary()
\
...
...
@@ -164,13 +166,13 @@ class Statement:
def get_use(self):
"""Get the variables that this statement uses, if any."""
instr = ['
addu
', '
subu
', '
mult
', '
div
', '
move
', '
m
tc1
', '
m
ov
.
d
',
\
instr = ['
addu
', '
subu
', '
mult
', '
div
', '
move
', '
mov
.
d
',
\
'
dmfc1
']
use = []
# Case arg0
if self.is_branch() or self.is_store() or self.is_compare()
\
or self.is_command(*['
mult
', '
div
', '
dsz
']):
if self.is_branch() or self.is_store() or self.is_compare()
\
or self.is_command(*['
mult
', '
div
', '
dsz
'
, '
mtc1
'
]):
if self.name == '
dsz
':
m = re.match('
^
\
d
+
\
(([
^
)]
+
)
\
)
$
', self[0])
use.append(m)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment