Eliminate byte_t.
authorChris Hanson <org/chris-hanson/cph>
Thu, 5 Jan 2017 00:39:09 +0000 (16:39 -0800)
committerChris Hanson <org/chris-hanson/cph>
Thu, 5 Jan 2017 00:39:09 +0000 (16:39 -0800)
14 files changed:
src/microcode/cmpauxmd/c.c
src/microcode/cmpint.h
src/microcode/cmpintmd/i386.c
src/microcode/cmpintmd/i386.h
src/microcode/cmpintmd/none.h
src/microcode/cmpintmd/svm1.c
src/microcode/cmpintmd/svm1.h
src/microcode/cmpintmd/x86-64.c
src/microcode/cmpintmd/x86-64.h
src/microcode/fasload.c
src/microcode/gcloop.c
src/microcode/liarc.h
src/microcode/object.h
src/microcode/svm1-interp.c

index 0d7d2554c8b925c1322396197f0bb51b446ca8bb..190f5c381b877fd3dfd533d26b4f7ed7c579368d 100644 (file)
@@ -532,7 +532,7 @@ declare_trampoline_block (entry_count_t n_block_entries)
 }
 
 bool
-store_trampoline_insns (insn_t * entry, byte_t code)
+store_trampoline_insns (insn_t * entry, uint8_t code)
 {
   /* Trampoline entries are stored in the lowest part of the
      compiled_entries table.  That's why we reserve those above.  */
index 67ec8d81fc2b7ddab6063821c75923e192e6c813..0b5a9ced411738fdee42e4db6a5bee9aca8a9cc7 100644 (file)
@@ -330,7 +330,7 @@ extern insn_t * trampoline_entry_addr (SCHEME_OBJECT *, unsigned long);
 /* Given the address of a trampoline entry and the code for the
    trampoline to be invoked, stores the appropriate instruction
    sequence in the trampoline.  */
-extern bool store_trampoline_insns (insn_t *, byte_t);
+extern bool store_trampoline_insns (insn_t *, uint8_t);
 
 /* Give the address of a trampoline block, returns a pointer to the
    start of the trampoline's storage area.  */
index e44e49b8fba76c226b529a1aabfa28e9978440aa..d80883ee4ee0b4332549570b401670ace62a3177 100644 (file)
@@ -222,7 +222,7 @@ trampoline_entry_addr (SCHEME_OBJECT * block, unsigned long index)
 }
 
 bool
-store_trampoline_insns (insn_t * entry, byte_t code)
+store_trampoline_insns (insn_t * entry, uint8_t code)
 {
   (*entry++) = 0xB0;           /* MOV AL,code */
   (*entry++) = code;
index d2c510c250738c9644c2d814ba81d790fe1b5df6..1e4acdafe53234525147b3b8f6479304b727822a 100644 (file)
@@ -200,7 +200,7 @@ magic = ([TC_COMPILED_ENTRY | 0] - (offset + length_of_CALL_instruction))
 
 #define REGBLOCK_ALLOCATED_BY_INTERFACE true
 
-typedef byte_t insn_t;
+typedef uint8_t insn_t;
 
 /* Number of insn_t units preceding entry address in which header
    (type and offset info) is stored.  */
index c7dfb703f3f746f95ee0cd4a59e70c6f3bd6a68e..02b51f71f8c940bdc711302562f211a5ad5c660a 100644 (file)
@@ -29,6 +29,6 @@ USA.
 #ifndef SCM_CMPINTMD_H_INCLUDED
 #define SCM_CMPINTMD_H_INCLUDED 1
 
-typedef byte_t insn_t;
+typedef uint8_t insn_t;
 
 #endif /* !SCM_CMPINTMD_H_INCLUDED */
index 08c9caeea67143dcf5ddeaf485bd26c4a3277eda..d5b2c2ede7f626ba42cbda75af817b901476c969 100644 (file)
@@ -394,7 +394,7 @@ trampoline_entry_addr (SCHEME_OBJECT * block, unsigned long index)
 }
 
 bool
-store_trampoline_insns (insn_t * entry, byte_t code)
+store_trampoline_insns (insn_t * entry, uint8_t code)
 {
   (entry[0]) = SVM1_INST_TRAP_TRAP_0;
   switch (code)
index e8422bab1e517f6a87b47635ec38a9c71c2c4397..def9f39f6688cfc3d97e61e0858b2bb01ecc89af 100644 (file)
@@ -37,7 +37,7 @@ USA.
 /* COMPILER_TEMP_SIZE is NOT ((sizeof (double)) / (sizeof (SCHEME_OBJECT))).
    It must not vary e.g. from 1 on x86-64 to 2 on i386. */
 
-typedef byte_t insn_t;
+typedef uint8_t insn_t;
 
 /* Number of insn_t units preceding entry address in which header
    (type and offset info) is stored.  */
index 3641679465d593cb6d025d0af9b5509b4a7bb08b..eb9cafe9f8a87d60e7f8229a6b88b1a2e9194139 100644 (file)
@@ -195,7 +195,7 @@ trampoline_entry_addr (SCHEME_OBJECT * block, unsigned long index)
 }
 
 bool
-store_trampoline_insns (insn_t * entry, byte_t code)
+store_trampoline_insns (insn_t * entry, uint8_t code)
 {
   (*entry++) = 0xB0;           /* MOV AL,code */
   (*entry++) = code;
index f0faf23e31bb7153f750c83a9648bbfec22bb2fb..20ee7bd2b44e467ab8f3d55eb8c6ed00c1481988 100644 (file)
@@ -133,7 +133,7 @@ entry       0               MOV     AL,code         0xB0, code-byte
 #define COMPILER_REGBLOCK_EXTRA_SIZE                                   \
   (COMPILER_REGBLOCK_N_HOOKS * COMPILER_HOOK_SIZE)
 
-typedef byte_t insn_t;
+typedef uint8_t insn_t;
 
 /* Number of insn_t units preceding entry address in which header
    (type and offset info) is stored.  */
index d837692e1ee15719953645b6c76e06c6adb7234f..34b6807847a7e5176c5adce245abd573477ef1d1 100644 (file)
@@ -565,34 +565,34 @@ DEFINE_GC_OBJECT_HANDLER (fasload_cc_entry)
 static void *
 relocate_address (void * vaddr)
 {
-  byte_t * caddr = vaddr;
-  byte_t * result;
+  uint8_t * caddr = vaddr;
+  uint8_t * result;
 
-  if ((caddr >= ((byte_t *) (FASLHDR_HEAP_START (fh))))
-      && (caddr < ((byte_t *) (FASLHDR_HEAP_END (fh)))))
+  if ((caddr >= ((uint8_t *) (FASLHDR_HEAP_START (fh))))
+      && (caddr < ((uint8_t *) (FASLHDR_HEAP_END (fh)))))
     result
-      = (((byte_t *) new_heap_start)
-        + (caddr - ((byte_t *) (FASLHDR_HEAP_START (fh)))));
-  else if ((caddr >= ((byte_t *) (FASLHDR_CONSTANT_START (fh))))
-          && (caddr < ((byte_t *) (FASLHDR_CONSTANT_END (fh)))))
+      = (((uint8_t *) new_heap_start)
+        + (caddr - ((uint8_t *) (FASLHDR_HEAP_START (fh)))));
+  else if ((caddr >= ((uint8_t *) (FASLHDR_CONSTANT_START (fh))))
+          && (caddr < ((uint8_t *) (FASLHDR_CONSTANT_END (fh)))))
     result
-      = (((byte_t *) new_constant_start)
-        + (caddr - ((byte_t *) (FASLHDR_CONSTANT_START (fh)))));
-  else if ((caddr >= ((byte_t *) (FASLHDR_UTILITIES_START (fh))))
-          && (caddr < ((byte_t *) (FASLHDR_UTILITIES_END (fh)))))
+      = (((uint8_t *) new_constant_start)
+        + (caddr - ((uint8_t *) (FASLHDR_CONSTANT_START (fh)))));
+  else if ((caddr >= ((uint8_t *) (FASLHDR_UTILITIES_START (fh))))
+          && (caddr < ((uint8_t *) (FASLHDR_UTILITIES_END (fh)))))
     result
-      = (((byte_t *) new_utilities)
-        + (caddr - ((byte_t *) (FASLHDR_UTILITIES_START (fh)))));
+      = (((uint8_t *) new_utilities)
+        + (caddr - ((uint8_t *) (FASLHDR_UTILITIES_START (fh)))));
   else if (ADDRESS_IN_STACK_REGION_P (caddr,
-                                     ((byte_t *) (FASLHDR_STACK_START (fh))),
-                                     ((byte_t *) (FASLHDR_STACK_END (fh)))))
+                                     ((uint8_t *) (FASLHDR_STACK_START (fh))),
+                                     ((uint8_t *) (FASLHDR_STACK_END (fh)))))
     result
       = (N_PUSHED_TO_SP
         ((SP_TO_N_PUSHED (caddr,
-                          ((byte_t *) (FASLHDR_STACK_START (fh))),
-                          ((byte_t *) (FASLHDR_STACK_END (fh))))),
-         ((byte_t *) new_stack_start),
-         ((byte_t *) new_stack_end)));
+                          ((uint8_t *) (FASLHDR_STACK_START (fh))),
+                          ((uint8_t *) (FASLHDR_STACK_END (fh))))),
+         ((uint8_t *) new_stack_start),
+         ((uint8_t *) new_stack_end)));
   else
     {
       outf_fatal ("Pointer out of range: %#lx\n", ((unsigned long) caddr));
index 0b0e4055247701c1790683d13a3956668c17d067..a394f7658559da12ce193eb3ebbe5c9cba092f4e 100644 (file)
@@ -293,8 +293,8 @@ tospace_to_newspace (void * addr)
   return
     (((addr >= ((void *) tospace_start))
       && (addr <= ((void *) tospace_end)))
-     ? ((((byte_t *) addr) - ((byte_t *) tospace_start))
-       + ((byte_t *) newspace_start))
+     ? ((((uint8_t *) addr) - ((uint8_t *) tospace_start))
+       + ((uint8_t *) newspace_start))
      : addr);
 }
 
@@ -304,8 +304,8 @@ newspace_to_tospace (void * addr)
   return
     (((addr >= ((void *) newspace_start))
       && (addr <= ((void *) newspace_end)))
-     ? ((((byte_t *) addr) - ((byte_t *) newspace_start))
-       + ((byte_t *) tospace_start))
+     ? ((((uint8_t *) addr) - ((uint8_t *) newspace_start))
+       + ((uint8_t *) tospace_start))
      : addr);
 }
 \f
index b7f0fb8a2f435ddc4ab06df0e42a1de807e150d7..58e234a545d6583ec34efad0eb72486cb814335f 100644 (file)
@@ -78,10 +78,10 @@ typedef unsigned long entry_count_t;
 #define LONG_TO_ADDRESS(source) (DATUM_TO_ADDRESS (source))
 
 #define C_STRING_TO_SCHEME_STRING(len, str)                            \
-  (MEMORY_TO_STRING ((len), ((const byte_t *) (str))))
+  (MEMORY_TO_STRING ((len), ((const uint8_t *) (str))))
 
 #define C_SYM_INTERN(len, str)                                         \
-  (MEMORY_TO_SYMBOL ((len), ((const byte_t *) (str))))
+  (MEMORY_TO_SYMBOL ((len), ((const uint8_t *) (str))))
 
 #define MAKE_PRIMITIVE_PROCEDURE(name, arity) (MAKE_PRIMITIVE (name, arity))
 
index 30c7ac2f413c201a5b1ac9a21f291d9fbde45c50..78471fdc6afcc7237d2b1fa2e1e7ed4a61e25431 100644 (file)
@@ -43,9 +43,6 @@ typedef unsigned long SCHEME_OBJECT;
 #define SIZEOF_SCHEME_OBJECT SIZEOF_UNSIGNED_LONG
 #define OBJECT_LENGTH ((unsigned int) (CHAR_BIT * SIZEOF_UNSIGNED_LONG))
 \f
-/* A convenience definition.  */
-typedef uint8_t byte_t;
-
 #if (TYPE_CODE_LENGTH == 6U)
 #  define N_TYPE_CODES (0x40)
 #  if (SIZEOF_UNSIGNED_LONG == 4) /* 32 bit word versions */
@@ -286,7 +283,7 @@ extern SCHEME_OBJECT * memory_base;
   (((unsigned char *) (MEMORY_LOC (s, BYTEVECTOR_DATA))) + (i))
 
 #define STRING_POINTER(s) ((char *) (MEMORY_LOC (s, BYTEVECTOR_DATA)))
-#define STRING_BYTE_PTR(s) ((byte_t *) (MEMORY_LOC (s, BYTEVECTOR_DATA)))
+#define STRING_BYTE_PTR(s) ((uint8_t *) (MEMORY_LOC (s, BYTEVECTOR_DATA)))
 
 #define STRING_REF(s, i) (* (STRING_LOC ((s), (i))))
 #define STRING_SET(s, i, c) ((* (STRING_LOC ((s), (i)))) = (c))
index 3651806d2951c764cf5bcdc296dde5fd8f517bfb..b612cdc0416e3e255a05cca977569e1419d0aaf3 100644 (file)
@@ -68,16 +68,16 @@ typedef SCHEME_OBJECT word_t;       /* convenience abbreviation */
 static word_t word_registers [N_WORD_REGISTERS];
 static double float_registers [N_FLOAT_REGISTERS];
 
-#define SBYTE (sizeof (byte_t))
+#define SBYTE (sizeof (uint8_t))
 #define SWORD (sizeof (word_t))
 #define SFLOAT (sizeof (double))
 
 #define PC program_counter
 #define NEXT_BYTE (*program_counter++)
 
-typedef byte_t wreg_t;
-typedef byte_t freg_t;
-typedef byte_t tc_t;
+typedef uint8_t wreg_t;
+typedef uint8_t freg_t;
+typedef uint8_t tc_t;
 
 #define WREG_REF(wr) (word_registers [(wr)])
 #define FREG_REF(fr) (float_registers [(fr)])
@@ -85,7 +85,7 @@ typedef byte_t tc_t;
 #define WREG_SET(wr, w) ((word_registers [(wr)]) = (w))
 #define FREG_SET(fr, f) ((float_registers [(fr)]) = (f))
 
-#define BYTE_ADDR(a) ((byte_t *) a)
+#define BYTE_ADDR(a) ((uint8_t *) a)
 #define WORD_ADDR(a) ((word_t *) a)
 #define FLOAT_ADDR(a) ((double *) a)
 
@@ -94,10 +94,10 @@ typedef byte_t tc_t;
 #define FLOAT_REF(a) (* (FLOAT_ADDR (a)))
 
 
-typedef byte_t * inst_defn_t (byte_t *);
+typedef uint8_t * inst_defn_t (uint8_t *);
 static inst_defn_t * inst_defns [256];
 
-#define DEFINE_INST(name) static byte_t * insn_##name (byte_t * PC)
+#define DEFINE_INST(name) static uint8_t * insn_##name (uint8_t * PC)
 #define NEXT_PC return (PC)
 #define OFFSET_PC(o) do                                                        \
 {                                                                      \
@@ -126,38 +126,38 @@ static long svm1_result;
 
 #define        ILL EXIT_VM (ERR_COMPILED_CODE_ERROR)
 
-typedef byte_t * address_decoder_t (byte_t *, word_t *);
+typedef uint8_t * address_decoder_t (uint8_t *, word_t *);
 static address_decoder_t * address_decoders [256];
 
 #define ADDRESS_VALUE(name) name
 
 #define DEFINE_ADDRESS_DECODER(name)                                   \
-  static byte_t * decode_addr_##name (byte_t * PC,                     \
-                                     word_t * address)
+  static uint8_t * decode_addr_##name (uint8_t * PC,                   \
+                                       word_t * address)
 #define ADDRESS_DECODED(addr) (*address) = (addr); return (PC)
 #define DECODE_ADDRESS(name)                                           \
   word_t name;                                                         \
   {                                                                    \
-    byte_t * new_pc = decode_address (PC, &name);                      \
+    uint8_t * new_pc = decode_address (PC, &name);                     \
     if (predict_false (! new_pc)) ILL;                                 \
     PC = new_pc;                                                       \
   }
-static byte_t * decode_address (byte_t *, word_t *);
+static uint8_t * decode_address (uint8_t *, word_t *);
 
-typedef byte_t * trap_0_t (byte_t *);
-typedef byte_t * trap_1_t (byte_t *, wreg_t);
-typedef byte_t * trap_2_t (byte_t *, wreg_t, wreg_t);
-typedef byte_t * trap_3_t (byte_t *, wreg_t, wreg_t, wreg_t);
+typedef uint8_t * trap_0_t (uint8_t *);
+typedef uint8_t * trap_1_t (uint8_t *, wreg_t);
+typedef uint8_t * trap_2_t (uint8_t *, wreg_t, wreg_t);
+typedef uint8_t * trap_3_t (uint8_t *, wreg_t, wreg_t, wreg_t);
 
 static trap_0_t * traps_0 [256];
 static trap_1_t * traps_1 [256];
 static trap_2_t * traps_2 [256];
 static trap_3_t * traps_3 [256];
 
-#define DECODE_TRAP_0(name) byte_t name = NEXT_BYTE
-#define DECODE_TRAP_1(name) byte_t name = NEXT_BYTE
-#define DECODE_TRAP_2(name) byte_t name = NEXT_BYTE
-#define DECODE_TRAP_3(name) byte_t name = NEXT_BYTE
+#define DECODE_TRAP_0(name) uint8_t name = NEXT_BYTE
+#define DECODE_TRAP_1(name) uint8_t name = NEXT_BYTE
+#define DECODE_TRAP_2(name) uint8_t name = NEXT_BYTE
+#define DECODE_TRAP_3(name) uint8_t name = NEXT_BYTE
 
 static void initialize_decoder_tables (void);
 \f
@@ -226,7 +226,7 @@ C_to_interface (void * address)
   running_p = true;
   while (predict_true (instruction_pointer))
     {
-      byte_t opcode = *instruction_pointer;
+      uint8_t opcode = *instruction_pointer;
       instruction_pointer = (* (inst_defns[opcode])) (instruction_pointer+1);
     }
   EXPORT_REGS ();
@@ -249,8 +249,8 @@ svm_export_instruction_pointer (unsigned long pc)
     }
 }
 
-static byte_t *
-illegal_instruction (byte_t * PC)
+static uint8_t *
+illegal_instruction (uint8_t * PC)
 {
   ILL;
 }
@@ -284,12 +284,12 @@ to_signed (word_t n)
 \f
 /* Primitive decoders */
 
-#define DECODE_ARG(name,func) do                                       \
-  {                                                                    \
-    byte_t * new_pc = func (PC, &name);                        \
-    if (predict_false (! new_pc)) ILL;                                 \
-    PC = new_pc;                                               \
-  } while (0);
+#define DECODE_ARG(name, func) do                                       \
+{                                                                       \
+  uint8_t * new_pc = func (PC, &name);                                  \
+  if (predict_false (! new_pc)) ILL;                                    \
+  PC = new_pc;                                                          \
+} while (0);
 
 #define DECODE_WORD_REGISTER(name)  wreg_t name; DECODE_ARG(name,decode_wreg)
 #define DECODE_FLOAT_REGISTER(name) freg_t name; DECODE_ARG(name,decode_freg)
@@ -302,45 +302,45 @@ to_signed (word_t n)
 #define DECODE_SIGNED_32(name)        long name; DECODE_ARG(name,decode_signed_32)
 #define DECODE_FLOAT(name)          double name; DECODE_ARG(name,decode_float)
 
-static inline byte_t *
-decode_wreg (byte_t * PC, wreg_t *wreg)
+static inline uint8_t *
+decode_wreg (uint8_t * PC, wreg_t *wreg)
 {
-  byte_t b = NEXT_BYTE;
+  uint8_t b = NEXT_BYTE;
   if (predict_false (! (WORD_REGISTER_P (b))))
     return (NULL);
   *wreg = b;
   return (PC);
 }
 
-static inline byte_t *
-decode_freg (byte_t * PC, freg_t *freg)
+static inline uint8_t *
+decode_freg (uint8_t * PC, freg_t *freg)
 {
-  byte_t b = NEXT_BYTE;
+  uint8_t b = NEXT_BYTE;
   if (predict_false (! (FLOAT_REGISTER_P (b))))
     return (NULL);
   *freg = b;
   return (PC);
 }
 
-static inline byte_t *
-decode_type_word (byte_t * PC, tc_t *tc)
+static inline uint8_t *
+decode_type_word (uint8_t * PC, tc_t *tc)
 {
-  byte_t b = NEXT_BYTE;
+  uint8_t b = NEXT_BYTE;
   if (predict_false (! (b <= N_TYPE_CODES)))
     return (NULL);
   *tc = b;
   return (PC);
 }
 
-static inline byte_t *
-decode_unsigned_8 (byte_t * PC, word_t *word)
+static inline uint8_t *
+decode_unsigned_8 (uint8_t * PC, word_t *word)
 {
   *word = (NEXT_BYTE);
   return (PC);
 }
 
-static inline byte_t *
-decode_unsigned_16 (byte_t * PC, word_t *word)
+static inline uint8_t *
+decode_unsigned_16 (uint8_t * PC, word_t *word)
 {
   word_t b0 = NEXT_BYTE;
   word_t b1 = NEXT_BYTE;
@@ -348,8 +348,8 @@ decode_unsigned_16 (byte_t * PC, word_t *word)
   return (PC);
 }
 
-static inline byte_t *
-decode_unsigned_32 (byte_t * PC, word_t *word)
+static inline uint8_t *
+decode_unsigned_32 (uint8_t * PC, word_t *word)
 {
   word_t b0 = NEXT_BYTE;
   word_t b1 = NEXT_BYTE;
@@ -359,8 +359,8 @@ decode_unsigned_32 (byte_t * PC, word_t *word)
   return (PC);
 }
 
-static inline byte_t *
-decode_unsigned_64 (byte_t * PC, uint64_t *big)
+static inline uint8_t *
+decode_unsigned_64 (uint8_t * PC, uint64_t *big)
 {
   uint64_t b0, b1, b2, b3, b4, b5, b6, b7;
   b0 = NEXT_BYTE; b1 = NEXT_BYTE; b2 = NEXT_BYTE; b3 = NEXT_BYTE;
@@ -370,16 +370,16 @@ decode_unsigned_64 (byte_t * PC, uint64_t *big)
   return (PC);
 }
 \f
-static inline byte_t *
-decode_signed_8 (byte_t * PC, long *lng)
+static inline uint8_t *
+decode_signed_8 (uint8_t * PC, long *lng)
 {
   long b = NEXT_BYTE;
   *lng = ((b < 0x80) ? b : (b - 0x100));
   return (PC);
 }
 
-static inline byte_t *
-decode_signed_16 (byte_t * PC, long *lng)
+static inline uint8_t *
+decode_signed_16 (uint8_t * PC, long *lng)
 {
   unsigned long n;
   PC = decode_unsigned_16 (PC, &n);
@@ -388,8 +388,8 @@ decode_signed_16 (byte_t * PC, long *lng)
   return (PC);
 }
 
-static inline byte_t *
-decode_signed_32 (byte_t * PC, long *lng)
+static inline uint8_t *
+decode_signed_32 (uint8_t * PC, long *lng)
 {
   word_t n;
   PC = (decode_unsigned_32 (PC, &n));
@@ -413,8 +413,8 @@ decode_signed_32 (byte_t * PC, long *lng)
   return (PC);
 }
 
-static inline byte_t *
-decode_signed_64 (byte_t * PC, int64_t * big)
+static inline uint8_t *
+decode_signed_64 (uint8_t * PC, int64_t * big)
 {
   uint64_t n;
   PC = (decode_unsigned_64 (PC, &n));
@@ -434,8 +434,8 @@ decode_signed_64 (byte_t * PC, int64_t * big)
   }
 }
 
-static inline byte_t *
-decode_float (byte_t * PC, double * dbl)
+static inline uint8_t *
+decode_float (uint8_t * PC, double * dbl)
 {
   int64_t significand;
   long exponent;
@@ -695,7 +695,7 @@ push_object (SCHEME_OBJECT object)
 }
 
 static inline void
-push_entry (byte_t * PC)
+push_entry (uint8_t * PC)
 {
   push_object (MAKE_CC_ENTRY (PC + CC_ENTRY_HEADER_SIZE));
 }
@@ -827,8 +827,8 @@ DEFINE_INST (trap_trap_0)
   return ((* (traps_0[code])) (PC));
 }
 
-static byte_t *
-illegal_trap_0 (byte_t * PC)
+static uint8_t *
+illegal_trap_0 (uint8_t * PC)
 {
   ILL;
 }
@@ -839,8 +839,8 @@ DEFINE_INST (trap_trap_1_wr)
   return ((* (traps_1[code])) (PC, r1));
 }
 
-static byte_t *
-illegal_trap_1 (byte_t * PC, wreg_t r1)
+static uint8_t *
+illegal_trap_1 (uint8_t * PC, wreg_t r1)
 {
   ILL;
 }
@@ -851,8 +851,8 @@ DEFINE_INST (trap_trap_2_wr)
   return ((* (traps_2[code])) (PC, r1, r2));
 }
 
-static byte_t *
-illegal_trap_2 (byte_t * PC, wreg_t r1, wreg_t r2)
+static uint8_t *
+illegal_trap_2 (uint8_t * PC, wreg_t r1, wreg_t r2)
 {
   ILL;
 }
@@ -863,8 +863,8 @@ DEFINE_INST (trap_trap_3_wr)
   return ((* (traps_3[code])) (PC, r1, r2, r3));
 }
 
-static byte_t *
-illegal_trap_3 (byte_t * PC, wreg_t r1, wreg_t r2, wreg_t r3)
+static uint8_t *
+illegal_trap_3 (uint8_t * PC, wreg_t r1, wreg_t r2, wreg_t r3)
 {
   ILL;
 }
@@ -885,8 +885,8 @@ illegal_trap_3 (byte_t * PC, wreg_t r1, wreg_t r2, wreg_t r3)
     EXIT_VM ((result).arg.interpreter_code)
 \f
 #define DEFINE_TRAP_0(nl, util_name)                                   \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC)                                                        \
+static uint8_t *                                                       \
+trap_##nl (uint8t * PC)                                                        \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -898,8 +898,8 @@ trap_##nl (byte_t * PC)                                                     \
 }
 
 #define DEFINE_TRAP_1(nl, util_name)                                   \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1)                                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1)                               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -911,8 +911,8 @@ trap_##nl (byte_t * PC, wreg_t source1)                                     \
 }
 
 #define DEFINE_TRAP_2(nl, util_name)                                   \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2)                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1, wreg_t source2)               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -924,8 +924,8 @@ trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2)                     \
 }
 
 #define DEFINE_TRAP_3(nl, util_name)                                   \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2, wreg_t source3)        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1, wreg_t source2, wreg_t source3) \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -937,8 +937,8 @@ trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2, wreg_t source3)     \
 }
 \f
 #define DEFINE_TRAP_R0(nl, util_name)                                  \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC)                                                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC)                                               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -950,8 +950,8 @@ trap_##nl (byte_t * PC)                                                     \
 }
 
 #define DEFINE_TRAP_R1(nl, util_name)                                  \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1)                                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1)                               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -963,8 +963,8 @@ trap_##nl (byte_t * PC, wreg_t source1)                                     \
 }
 
 #define DEFINE_TRAP_R2(nl, util_name)                                  \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2)                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1, wreg_t source2)               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -976,8 +976,8 @@ trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2)                     \
 }
 
 #define DEFINE_TRAP_R3(nl, util_name)                                  \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2, wreg_t source3)        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC, wreg_t source1, wreg_t source2, wreg_t source3) \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name ((&result),                                      \
@@ -989,8 +989,8 @@ trap_##nl (byte_t * PC, wreg_t source1, wreg_t source2, wreg_t source3)     \
 }
 
 #define DEFINE_TRAMPOLINE(nl, util_name)                               \
-static byte_t *                                                                \
-trap_##nl (byte_t * PC)                                                        \
+static uint8_t *                                                       \
+trap_##nl (uint8_t * PC)                                               \
 {                                                                      \
   TRAP_PREFIX (result);                                                        \
   comutil_##util_name                                                  \
@@ -1093,8 +1093,8 @@ DEFINE_INST (enter_closure)
     }
 
   {
-    byte_t * block = (PC - (CLOSURE_ENTRY_START
-                           + ((index + 1) * CLOSURE_ENTRY_SIZE)));
+    uint8_t * block = (PC - (CLOSURE_ENTRY_START
+                             + ((index + 1) * CLOSURE_ENTRY_SIZE)));
     unsigned int count = (read_u16 (block));
     SCHEME_OBJECT * targets
       = (skip_compiled_closure_padding
@@ -1289,15 +1289,15 @@ DEFINE_BINARY_FR (atan2, ATAN2, atan2)
 \f
 /* Address decoders */
 
-static inline byte_t *
-decode_address (byte_t * PC, word_t * address)
+static inline uint8_t *
+decode_address (uint8_t * PC, word_t * address)
 {
   address_decoder_t * decoder = address_decoders[NEXT_BYTE];
   return ((*decoder) (PC, address));
 }
 
-static byte_t *
-illegal_address (byte_t * PC, word_t * address)
+static uint8_t *
+illegal_address (uint8_t * PC, word_t * address)
 {
   (void) PC;                   /* ignore */
   (void) address;              /* ignore */
@@ -1535,7 +1535,7 @@ DEFINE_ADDRESS_DECODER (postinc_f)
 }
 
 static inline word_t
-pcr_value (byte_t * PC, word_t offset)
+pcr_value (uint8_t * PC, word_t offset)
 {
   return (((word_t) PC) + offset);
 }