aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/igen/gen-idecode.c4
-rw-r--r--sim/igen/igen.c2
-rw-r--r--sim/igen/ld-decode.c2
-rw-r--r--sim/igen/ld-insn.c2
-rw-r--r--sim/igen/ld-insn.h2
-rw-r--r--sim/igen/misc.h24
6 files changed, 9 insertions, 27 deletions
diff --git a/sim/igen/gen-idecode.c b/sim/igen/gen-idecode.c
index 5e87e15..d16cab5 100644
--- a/sim/igen/gen-idecode.c
+++ b/sim/igen/gen-idecode.c
@@ -984,8 +984,8 @@ print_idecode_globals (lf *file)
lf_printf (file, "\n");
lf_printf (file, "typedef struct _idecode_table_entry {\n");
lf_printf (file, " int shift;\n");
- lf_printf (file, " unsigned%d mask;\n", options.insn_bit_size);
- lf_printf (file, " unsigned%d value;\n", options.insn_bit_size);
+ lf_printf (file, " uint%d_t mask;\n", options.insn_bit_size);
+ lf_printf (file, " uint%d_t value;\n", options.insn_bit_size);
lf_printf (file, " void *function_or_table;\n");
lf_printf (file, "} idecode_table_entry;\n");
}
diff --git a/sim/igen/igen.c b/sim/igen/igen.c
index 2389ccd..ba85640 100644
--- a/sim/igen/igen.c
+++ b/sim/igen/igen.c
@@ -759,7 +759,7 @@ static void
gen_idecode_h (lf *file,
gen_table *gen, insn_table *insns, cache_entry *cache_rules)
{
- lf_printf (file, "typedef unsigned%d %sinstruction_word;\n",
+ lf_printf (file, "typedef uint%d_t %sinstruction_word;\n",
options.insn_bit_size, options.module.global.prefix.l);
if (options.gen.delayed_branch)
{
diff --git a/sim/igen/ld-decode.c b/sim/igen/ld-decode.c
index 3875bdb..da0e9da 100644
--- a/sim/igen/ld-decode.c
+++ b/sim/igen/ld-decode.c
@@ -70,7 +70,7 @@ static const name_map decode_search_map[] = {
static void
-set_bits (int bit[max_insn_bit_size], unsigned64 value)
+set_bits (int bit[max_insn_bit_size], uint64_t value)
{
int bit_nr;
for (bit_nr = 0; bit_nr < max_insn_bit_size; bit_nr++)
diff --git a/sim/igen/ld-insn.c b/sim/igen/ld-insn.c
index 6727d9f..20c1f77 100644
--- a/sim/igen/ld-insn.c
+++ b/sim/igen/ld-insn.c
@@ -203,7 +203,7 @@ parse_insn_word (line_ref *line, char *string, int word_nr)
{
/* when the length/pos field is omited, an integer field
is always binary */
- unsigned64 val = 0;
+ uint64_t val = 0;
int i;
for (i = 0; i < strlen_val; i++)
{
diff --git a/sim/igen/ld-insn.h b/sim/igen/ld-insn.h
index dba2e63..4859bae 100644
--- a/sim/igen/ld-insn.h
+++ b/sim/igen/ld-insn.h
@@ -21,7 +21,7 @@
-typedef unsigned64 insn_uint;
+typedef uint64_t insn_uint;
/* Common among most entries:
diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index 48c2126..a1cae76 100644
--- a/sim/igen/misc.h
+++ b/sim/igen/misc.h
@@ -30,29 +30,11 @@ enum
};
-/* Define a 64bit data type */
-
-#if defined __GNUC__ || defined _WIN32
-#ifdef __GNUC__
-
-typedef long long signed64;
-typedef unsigned long long unsigned64;
-
-#else /* _WIN32 */
-
-typedef __int64 signed64;
-typedef unsigned __int64 unsigned64;
-
-#endif /* _WIN32 */
-#else /* Not GNUC or WIN32 */
-/* Not supported */
-#endif
-
-
-#include <stdio.h>
#include <ctype.h>
-#include <string.h>
+#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
#define __attribute__(arg)