aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/hw_nvram.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-12-06 02:42:00 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-06 01:17:39 -0500
commit95e40d770e95c0d5317c2566a7976bd3421f380a (patch)
treeee409c8b3279492f88f1b3b5e675e86d254b899d /sim/ppc/hw_nvram.c
parente4c803f5bb08e946f0550260b39f71eff0192262 (diff)
downloadgdb-95e40d770e95c0d5317c2566a7976bd3421f380a.zip
gdb-95e40d770e95c0d5317c2566a7976bd3421f380a.tar.gz
gdb-95e40d770e95c0d5317c2566a7976bd3421f380a.tar.bz2
sim: ppc: migrate to standard uintXX_t types
Drop the sim-specific unsignedXX types and move to the standard uintXX_t types that C11 provides.
Diffstat (limited to 'sim/ppc/hw_nvram.c')
-rw-r--r--sim/ppc/hw_nvram.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c
index 0580dcc..e26b547 100644
--- a/sim/ppc/hw_nvram.c
+++ b/sim/ppc/hw_nvram.c
@@ -62,7 +62,7 @@
*/
typedef struct _hw_nvram_device {
- unsigned8 *memory;
+ uint8_t *memory;
unsigned sizeof_memory;
time_t host_time;
unsigned timezone;
@@ -87,8 +87,8 @@ hw_nvram_create(const char *name,
}
typedef struct _hw_nvram_reg_spec {
- unsigned32 base;
- unsigned32 size;
+ uint32_t base;
+ uint32_t size;
} hw_nvram_reg_spec;
static void
@@ -200,9 +200,9 @@ hw_nvram_io_read_buffer(device *me,
hw_nvram_device *nvram = (hw_nvram_device*)device_data(me);
for (i = 0; i < nr_bytes; i++) {
unsigned address = (addr + i) % nvram->sizeof_memory;
- unsigned8 data = nvram->memory[address];
+ uint8_t data = nvram->memory[address];
hw_nvram_update_clock(nvram, processor);
- ((unsigned8*)dest)[i] = data;
+ ((uint8_t*)dest)[i] = data;
}
return nr_bytes;
}
@@ -220,7 +220,7 @@ hw_nvram_io_write_buffer(device *me,
hw_nvram_device *nvram = (hw_nvram_device*)device_data(me);
for (i = 0; i < nr_bytes; i++) {
unsigned address = (addr + i) % nvram->sizeof_memory;
- unsigned8 data = ((unsigned8*)source)[i];
+ uint8_t data = ((uint8_t*)source)[i];
if (address == nvram->addr_control
&& (data & 0x80) == 0
&& (nvram->memory[address] & 0x80) == 0x80)