projects
/
barrelfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
8f83530
)
mackerel: don't generate read functions for write only registers
author
Reto Achermann
<reto.achermann@inf.ethz.ch>
Tue, 7 Mar 2017 08:27:41 +0000 (09:27 +0100)
committer
Reto Achermann
<reto.achermann@inf.ethz.ch>
Tue, 7 Mar 2017 08:27:41 +0000 (09:27 +0100)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>
tools/mackerel/ShiftDriver.hs
patch
|
blob
|
history
diff --git
a/tools/mackerel/ShiftDriver.hs
b/tools/mackerel/ShiftDriver.hs
index
b4cd94e
..
4dbc014
100644
(file)
--- a/
tools/mackerel/ShiftDriver.hs
+++ b/
tools/mackerel/ShiftDriver.hs
@@
-1018,10
+1018,15
@@
register_rawread_fn r =
(RT.name r) n)
]
else
- [
- decl,
- C.StaticInline rtn n args [ C.Return (loc_read r) ]
- ]
+ if RT.is_readable r then
+ [
+ decl,
+ C.StaticInline rtn n args [ C.Return (loc_read r) ]
+ ]
+ else
+ [
+ C.Comment $ printf "Register %s is not readale" (RT.name r)
+ ]
--
-- Read from the register, or from a shadow copy if it's not readable.