Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
6e0319ee
There was an error fetching the commit references. Please try again later.
Commit
6e0319ee
authored
8 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
shader_jit_x64: Get rid of unnecessary last_program_counter variable.
parent
f3afe245
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/video_core/shader/shader_jit_x64.cpp
+2
-5
2 additions, 5 deletions
src/video_core/shader/shader_jit_x64.cpp
src/video_core/shader/shader_jit_x64.h
+0
-1
0 additions, 1 deletion
src/video_core/shader/shader_jit_x64.h
with
2 additions
and
6 deletions
src/video_core/shader/shader_jit_x64.cpp
+
2
−
5
View file @
6e0319ee
...
...
@@ -677,7 +677,7 @@ void JitCompiler::Compile_MAD(Instruction instr) {
}
void
JitCompiler
::
Compile_IF
(
Instruction
instr
)
{
RuntimeAssert
(
instr
.
flow_control
.
dest_offset
>
last_
program_counter
,
"Backwards if-statements not supported"
);
RuntimeAssert
(
instr
.
flow_control
.
dest_offset
>
=
program_counter
,
"Backwards if-statements not supported"
);
// Evaluate the "IF" condition
if
(
instr
.
opcode
.
Value
()
==
OpCode
::
Id
::
IFU
)
{
...
...
@@ -708,7 +708,7 @@ void JitCompiler::Compile_IF(Instruction instr) {
}
void
JitCompiler
::
Compile_LOOP
(
Instruction
instr
)
{
RuntimeAssert
(
instr
.
flow_control
.
dest_offset
>
last_
program_counter
,
"Backwards loops not supported"
);
RuntimeAssert
(
instr
.
flow_control
.
dest_offset
>
=
program_counter
,
"Backwards loops not supported"
);
RuntimeAssert
(
!
looping
,
"Nested loops not supported"
);
looping
=
true
;
...
...
@@ -770,8 +770,6 @@ void JitCompiler::Compile_Return() {
}
void
JitCompiler
::
Compile_NextInstr
()
{
last_program_counter
=
program_counter
;
auto
search
=
return_offsets
.
find
(
program_counter
);
if
(
search
!=
return_offsets
.
end
())
{
Compile_Return
();
...
...
@@ -839,7 +837,6 @@ void JitCompiler::Compile() {
FindReturnOffsets
();
// Reset flow control state
last_program_counter
=
0
;
program_counter
=
0
;
looping
=
false
;
code_ptr
.
fill
(
nullptr
);
...
...
This diff is collapsed.
Click to expand it.
src/video_core/shader/shader_jit_x64.h
+
0
−
1
View file @
6e0319ee
...
...
@@ -108,7 +108,6 @@ private:
/// Offsets in code where a return needs to be inserted
std
::
set
<
unsigned
>
return_offsets
;
unsigned
last_program_counter
=
0
;
///< Offset of the most recent instruction decoded
unsigned
program_counter
=
0
;
///< Offset of the next instruction to decode
bool
looping
=
false
;
///< True if compiling a loop, used to check for nested loops
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment