Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Touzeau
lrusecurity
Commits
c79e9ce5
Commit
c79e9ce5
authored
Jan 28, 2019
by
Maeva Ramarjiaona
Browse files
Fixing compilation errors
parent
db8ee8f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/lrusecurity/ACSSecurity.h
View file @
c79e9ce5
#ifndef LRUSECURITY_ACSSECURITY_H_
#define LRUSECURITY_ACSSECURITY_H_
#ifndef LRUSECURITY_ACSSECURITY_H_
H_
#define LRUSECURITY_ACSSECURITY_H_
H_
#include <otawa/icache/features.h>
#include <otawa/icat3/features.h>
...
...
@@ -17,4 +17,4 @@ class ACSSecurity
otawa
::
Bag
<
otawa
::
icache
::
Access
>
_prev
;
};
}
#endif //LRUSECURITY_ACSSECURITY_H
#endif //LRUSECURITY_ACSSECURITY_H
_H
include/lrusecurity/features.h
View file @
c79e9ce5
...
...
@@ -12,8 +12,8 @@ namespace lrusecurity {
// Exist-Hit with previous access
extern
otawa
::
p
::
feature
EXIST_HIT_PREV_ANALYSIS_FEATURE
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
ACSSecurity
>
>
EXIST_HIT_PREV_INIT
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
ACSSecurity
>
>
EXIST_HIT_PREV_IN
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
lrusecurity
::
ACSSecurity
>
>
EXIST_HIT_PREV_INIT
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
lrusecurity
::
ACSSecurity
>
>
EXIST_HIT_PREV_IN
;
enum
class
SecurityCategory
{
SAFE
,
...
...
src/Prev/ExistHitPrevAnalysis.h
View file @
c79e9ce5
...
...
@@ -4,7 +4,7 @@
#include <otawa/proc/Processor.h>
#include <otawa/icat3/features.h>
#include <otawa/cfg/features.h>
#include
"
ACSSecurity.h
"
#include
<lrusecurity/
ACSSecurity.h
>
namespace
lrusecurity
{
...
...
@@ -12,7 +12,7 @@ class ExistHitPrevAnalysis: public otawa::Processor
{
public:
static
otawa
::
p
::
declare
reg
;
ExistHitAnalysis
(
otawa
::
p
::
declare
&
r
=
reg
);
ExistHit
Prev
Analysis
(
otawa
::
p
::
declare
&
r
=
reg
);
protected:
...
...
@@ -56,7 +56,7 @@ extern otawa::p::feature EXIST_HIT_PREV_ANALYSIS_FEATURE;
*
* @ingroup lrusecurity
*/
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
ACSSecurity
>
>
EXIST_HIT_PREV_IN
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
lrusecurity
::
ACSSecurity
>
>
EXIST_HIT_PREV_IN
;
/**
...
...
@@ -70,7 +70,7 @@ extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_IN;
*
* @ingroup lrusecurity
*/
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
ACSSecurity
>
>
EXIST_HIT_PREV_INIT
;
extern
otawa
::
p
::
id
<
otawa
::
icat3
::
Container
<
lrusecurity
::
ACSSecurity
>
>
EXIST_HIT_PREV_INIT
;
};
// namespace lrusecurity
...
...
src/Prev/ExistHitPrevDomain.h
View file @
c79e9ce5
...
...
@@ -6,7 +6,7 @@
#include <elm/io/Output.h>
#include <lrupreanalysis/features.h>
#include
"
ACSSecurity.h
"
#include
<lrusecurity/
ACSSecurity.h
>
namespace
lrusecurity
{
...
...
src/lrusecurity_SecurityCatBuilder.cpp
View file @
c79e9ce5
...
...
@@ -4,7 +4,6 @@
#include <otawa/proc/BBProcessor.h>
#include <otawa/icat3/features.h>
#include <otawa/hard/Memory.h>
#include <otawa/cfg/Loop.h>
#include <lrumc/ACSManager.h>
#include <lrusecurity/features.h>
#include <lrupreanalysis/features.h>
...
...
@@ -28,14 +27,14 @@ protected:
const
otawa
::
icat3
::
LBlockCollection
*
coll
=
icat3
::
LBLOCKS
(
ws
);
ASSERT
(
coll
);
_ways
=
coll
->
A
();
_man
=
new
ACSManager
(
ws
);
_man
=
new
lrumc
::
ACSManager
(
ws
);
}
virtual
void
cleanup
(
WorkSpace
*
)
{
delete
_man
;
}
virtual
void
processBB
(
WorkSpace
*
,
CFG
*
,
Block
*
v
)
virtual
void
processBB
(
WorkSpace
*
,
CFG
*
cfg
,
Block
*
v
)
{
for
(
Block
::
EdgeIter
e
=
v
->
outs
();
e
;
e
++
)
{
if
(
logFor
(
LOG_BLOCK
))
...
...
@@ -44,22 +43,19 @@ protected:
_man
->
start
(
v
->
toSynth
()
->
callee
()
->
exit
());
else
_man
->
start
(
v
);
processAccesses
(
*
icache
::
ACCESSES
(
v
),
v
);
processAccesses
(
*
icache
::
ACCESSES
(
e
),
e
);
//otawa::sgraph::LoopIdentifier loopv = otawa::sgraph::LoopIdentifier::loopOf(v);
///otawa::sgraph::LoopIdentifier loope = otawa::sgraph::LoopIdentifier::loopOf(e.sink());
processAccesses
(
*
icache
::
ACCESSES
(
v
));
processAccesses
(
*
icache
::
ACCESSES
(
e
));
}
}
void
processAccesses
(
Bag
<
icache
::
Access
>&
accs
,
Block
*
v
)
{
void
processAccesses
(
Bag
<
icache
::
Access
>&
accs
)
{
for
(
int
i
=
0
;
i
<
accs
.
count
();
i
++
)
{
lrusecurity
::
SecurityCategory
cat
;
if
(
lrupreanalysis
::
ExactCategory
(
accs
[
i
])
==
lrupreanalysis
::
ExactCategory
::
DU
)
{
if
(
Loop
::
of
(
v
)
!=
Loop
::
top
(
v
.
cfg
()))
{
if
(
lrupreanalysis
::
EXACT_CATEGORY
(
accs
[
i
])
==
lrupreanalysis
::
ExactCategory
::
DU
)
cat
=
SecurityCategory
::
UNSAFE
;
}
else
cat
=
SecurityCategory
::
SAFE
;
}
else
cat
=
SecurityCategory
::
SAFE
;
...
...
@@ -82,7 +78,7 @@ protected:
}
int
_ways
;
ACSManager
*
_man
;
lrumc
::
ACSManager
*
_man
;
};
p
::
declare
SecurityCatBuilder
::
reg
=
p
::
init
(
"lrusecurity::SecurityCatBuilder"
,
Version
(
1
,
0
,
0
))
...
...
Write
Preview
Supports
Markdown
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