OSDN Git Service

2006-09-19 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Tue, 19 Sep 2006 18:40:56 +0000 (18:40 +0000)
committerbrolley <brolley>
Tue, 19 Sep 2006 18:40:56 +0000 (18:40 +0000)
        * commonCfg.cxx (MemCfg::set_size): Use make_numeric_attribute and pass
        std::ios::hex.
        (MapperCfg::map): Likewise.

sid/main/dynamic/ChangeLog
sid/main/dynamic/commonCfg.cxx

index 03a14d7..09c7b59 100644 (file)
@@ -1,3 +1,9 @@
+2006-09-19  Dave Brolley  <brolley@redhat.com>
+
+       * commonCfg.cxx (MemCfg::set_size): Use make_numeric_attribute and pass
+       std::ios::hex.
+       (MapperCfg::map): Likewise.
+
 2006-07-14  Dave Brolley  <brolley@redhat.com>
 
        * commonCfg.cxx (BoardCfg::write_config): Connect stdio_obj's eof pin to
index caadb58..9aae47a 100644 (file)
@@ -86,7 +86,7 @@ void MemCfg::set_write_latency (sid::host_int_4 lat)
 void MemCfg::set_size (sid::host_int_4 sz)
 {
   my_size = sz;
-  set (this, "size", sidutil::make_attribute(sz));
+  set (this, "size", "0x" + sidutil::make_numeric_attribute(sz, std::ios::hex));
 }
 
 sid::host_int_4 MemCfg::size()
@@ -506,26 +506,26 @@ void MapperCfg::map (const Mapping &m)
   
   string map_accessor = "[";
   if (m._wordsz.specified)
-    map_accessor += sidutil::make_attribute(m._wordsz.val) + "*";
+    map_accessor += "0x" + sidutil::make_numeric_attribute(m._wordsz.val, std::ios::hex) + "*";
 
   if (m._base.specified)
-    map_accessor += sidutil::make_attribute(m._base.val) + "=";
+    map_accessor += "0x" + sidutil::make_numeric_attribute(m._base.val, std::ios::hex) + "=";
 
   // always include a low and a high. default to 0 if not specified.
   // FIXME: perhaps issuing a warning here would be better?
-  map_accessor += 
-    sidutil::make_attribute(m._low.specified ? 
-                           m._low.val : 0
-    + "-"
-    + sidutil::make_attribute(m._high.specified ? 
-                             m._high.val : 0);
+  map_accessor += "0x" + 
+    sidutil::make_numeric_attribute(m._low.specified ? 
+                                   m._low.val : 0, std::ios::hex
+    + "-0x"
+    + sidutil::make_numeric_attribute(m._high.specified ? 
+                                     m._high.val : 0, std::ios::hex);
 
   // Both stride and width must be specified for either to make sense.
   if (m._stride.specified && m._width.specified)
-    map_accessor += "," 
-      + sidutil::make_attribute(m._stride.val
-      + ","
-      + sidutil::make_attribute(m._width.val);
+    map_accessor += ",0x
+      + sidutil::make_numeric_attribute(m._stride.val, std::ios::hex
+      + ",0x"
+      + sidutil::make_numeric_attribute(m._width.val, std::ios::hex);
   
   map_accessor += "]";