Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftshader
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
swiftshader
Commits
8b32241c
Commit
8b32241c
authored
Aug 18, 2016
by
Jaydeep Patil
Committed by
Jim Stichnoth
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide repointEdges for MIPS.
R=stichnot@chromium.org Review URL:
https://codereview.chromium.org/2257043003
. Patch from Jaydeep Patil <jaydeep.patil@imgtec.com>.
parent
b1a0fb13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
IceInstMIPS32.cpp
src/IceInstMIPS32.cpp
+13
-0
IceInstMIPS32.h
src/IceInstMIPS32.h
+5
-11
No files found.
src/IceInstMIPS32.cpp
View file @
8b32241c
...
...
@@ -200,6 +200,19 @@ InstMIPS32Br::InstMIPS32Br(Cfg *Func, const CfgNode *TargetTrue,
addSource
(
Src1
);
}
bool
InstMIPS32Br
::
repointEdges
(
CfgNode
*
OldNode
,
CfgNode
*
NewNode
)
{
bool
Found
=
false
;
if
(
TargetFalse
==
OldNode
)
{
TargetFalse
=
NewNode
;
Found
=
true
;
}
if
(
TargetTrue
==
OldNode
)
{
TargetTrue
=
NewNode
;
Found
=
true
;
}
return
Found
;
}
InstMIPS32Label
::
InstMIPS32Label
(
Cfg
*
Func
,
TargetMIPS32
*
Target
)
:
InstMIPS32
(
Func
,
InstMIPS32
::
Label
,
0
,
nullptr
),
Number
(
Target
->
makeNextLabelNumber
())
{
...
...
src/IceInstMIPS32.h
View file @
8b32241c
...
...
@@ -502,8 +502,7 @@ class InstMIPS32Load : public InstMIPS32 {
public
:
static
InstMIPS32Load
*
create
(
Cfg
*
Func
,
Variable
*
Value
,
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
{
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
{
return
new
(
Func
->
allocate
<
InstMIPS32Load
>
())
InstMIPS32Load
(
Func
,
Value
,
Mem
,
Reloc
);
}
...
...
@@ -541,7 +540,7 @@ public:
private
:
InstMIPS32Load
(
Cfg
*
Func
,
Variable
*
Value
,
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
RelocOp
Reloc
=
RO_No
)
:
InstMIPS32
(
Func
,
K
,
2
,
Value
),
Reloc
(
Reloc
)
{
addSource
(
Mem
);
}
...
...
@@ -559,8 +558,7 @@ class InstMIPS32Store : public InstMIPS32 {
public
:
static
InstMIPS32Store
*
create
(
Cfg
*
Func
,
Variable
*
Value
,
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
{
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
{
return
new
(
Func
->
allocate
<
InstMIPS32Store
>
())
InstMIPS32Store
(
Func
,
Value
,
Mem
,
Reloc
);
}
...
...
@@ -598,7 +596,7 @@ public:
private
:
InstMIPS32Store
(
Cfg
*
Func
,
Variable
*
Value
,
OperandMIPS32Mem
*
Mem
,
RelocOp
Reloc
=
RO_No
)
RelocOp
Reloc
=
RO_No
)
:
InstMIPS32
(
Func
,
K
,
2
,
nullptr
),
Reloc
(
Reloc
)
{
addSource
(
Value
);
addSource
(
Mem
);
...
...
@@ -675,11 +673,7 @@ public:
bool
isUnconditionalBranch
()
const
override
{
return
Predicate
==
CondMIPS32
::
AL
;
}
bool
repointEdges
(
CfgNode
*
OldNode
,
CfgNode
*
NewNode
)
override
{
(
void
)
OldNode
;
(
void
)
NewNode
;
return
true
;
};
bool
repointEdges
(
CfgNode
*
OldNode
,
CfgNode
*
NewNode
)
override
;
void
emit
(
const
Cfg
*
Func
)
const
override
;
void
emitIAS
(
const
Cfg
*
Func
)
const
override
{
(
void
)
Func
;
};
void
dump
(
const
Cfg
*
Func
)
const
override
;
...
...
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