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");
}
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)
{
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++)
{
/* 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++)
{
-typedef unsigned64 insn_uint;
+typedef uint64_t insn_uint;
/* Common among most entries:
};
-/* 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)