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
7f0ab860
Commit
7f0ab860
authored
Jun 14, 2016
by
Thomas Lively
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished small fixups.
BUG=
https://bugs.chromium.org/p/nativeclient/issues/detail?id=4374
R=stichnot@chromium.org Review URL:
https://codereview.chromium.org/2064613006
.
parent
9c2c093f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
Makefile.standalone
Makefile.standalone
+2
-2
IceASanInstrumentation.cpp
src/IceASanInstrumentation.cpp
+6
-8
No files found.
Makefile.standalone
View file @
7f0ab860
...
...
@@ -282,9 +282,7 @@ SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA)
# List the target-specific source files first, which generally take longer to
# compile, in the hope of improving parallel build time.
SRCS
=
\
IceASanInstrumentation.cpp
\
IceAssemblerARM32.cpp
\
IceInstrumentation.cpp
\
IceInstARM32.cpp
\
IceInstMIPS32.cpp
\
IceInstX8632.cpp
\
...
...
@@ -328,7 +326,9 @@ SRCS = \
ifndef
MINIMAL
SRCS
+=
\
IceASanInstrumentation.cpp
\
IceConverter.cpp
\
IceInstrumentation.cpp
\
IceTypeConverter.cpp
endif
...
...
src/IceASanInstrumentation.cpp
View file @
7f0ab860
...
...
@@ -28,11 +28,11 @@ const llvm::NaClBitcodeRecord::RecordVector RzContents =
llvm
::
NaClBitcodeRecord
::
RecordVector
(
RzSize
,
'R'
);
}
// end of anonymous namespace
// Create redzones
between
all global variables, ensuring that the initializer
// Create redzones
around
all global variables, ensuring that the initializer
// types of the redzones and their associated globals match so that they are
// laid out together in memory.
void
ASanInstrumentation
::
instrumentGlobals
(
VariableDeclarationList
&
Globals
)
{
if
(
BuildDefs
::
minimal
()
||
DidInsertRedZones
)
if
(
DidInsertRedZones
)
return
;
VariableDeclarationList
NewGlobals
;
...
...
@@ -50,8 +50,10 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
NewGlobals
.
push_back
(
RzArraySizeVar
);
for
(
VariableDeclaration
*
Global
:
Globals
)
{
VariableDeclaration
*
RzLeft
=
createRz
(
&
NewGlobals
,
RzArray
,
RzArraySize
,
Global
);
VariableDeclaration
*
RzRight
=
createRz
(
&
NewGlobals
,
RzArray
,
RzArraySize
,
Global
);
VariableDeclaration
*
RzLeft
=
createRz
(
&
NewGlobals
,
RzArray
,
RzArraySize
,
Global
);
VariableDeclaration
*
RzRight
=
createRz
(
&
NewGlobals
,
RzArray
,
RzArraySize
,
Global
);
NewGlobals
.
push_back
(
RzLeft
);
NewGlobals
.
push_back
(
Global
);
NewGlobals
.
push_back
(
RzRight
);
...
...
@@ -82,8 +84,6 @@ void ASanInstrumentation::instrumentGlobals(VariableDeclarationList &Globals) {
}
std
::
string
ASanInstrumentation
::
nextRzName
()
{
if
(
BuildDefs
::
minimal
())
return
""
;
std
::
stringstream
Name
;
Name
<<
RzPrefix
<<
RzNum
++
;
return
Name
.
str
();
...
...
@@ -93,8 +93,6 @@ VariableDeclaration *
ASanInstrumentation
::
createRz
(
VariableDeclarationList
*
List
,
VariableDeclaration
*
RzArray
,
SizeT
&
RzArraySize
,
VariableDeclaration
*
Global
)
{
if
(
BuildDefs
::
minimal
())
return
nullptr
;
auto
*
Rz
=
VariableDeclaration
::
create
(
List
);
Rz
->
setName
(
Ctx
,
nextRzName
());
if
(
Global
->
hasNonzeroInitializer
())
{
...
...
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