diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/cpu/nec/necdasm.cpp | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/cpu/nec/necdasm.cpp')
-rw-r--r-- | src/devices/cpu/nec/necdasm.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/devices/cpu/nec/necdasm.cpp b/src/devices/cpu/nec/necdasm.cpp index cd326436fd4..1b80daf4eda 100644 --- a/src/devices/cpu/nec/necdasm.cpp +++ b/src/devices/cpu/nec/necdasm.cpp @@ -9,7 +9,7 @@ #include "emu.h" -static const UINT8 *Iconfig; +static const uint8_t *Iconfig; enum { @@ -67,10 +67,10 @@ enum struct NEC_I386_OPCODE { char mnemonic[32]; - UINT32 flags; - UINT32 param1; - UINT32 param2; - UINT32 param3; + uint32_t flags; + uint32_t param1; + uint32_t param2; + uint32_t param3; offs_t dasm_flags; }; @@ -79,8 +79,8 @@ struct NEC_GROUP_OP { const NEC_I386_OPCODE *opcode; }; -static const UINT8 *opcode_ptr; -static const UINT8 *opcode_ptr_base; +static const uint8_t *opcode_ptr; +static const uint8_t *opcode_ptr_base; static const NEC_I386_OPCODE necv_opcode_table1[256] = { @@ -864,9 +864,9 @@ static const char *const nec_sfreg[256] = "???", "???", "???", "???", "ispr", "???", "???", "idb" }; -static UINT32 pc; -static UINT8 modrm; -static UINT32 segment; +static uint32_t pc; +static uint8_t modrm; +static uint32_t segment; static offs_t dasm_flags; static char modrm_string[256]; @@ -875,7 +875,7 @@ static char modrm_string[256]; #define MAX_LENGTH 8 -static inline UINT8 FETCH(void) +static inline uint8_t FETCH(void) { if ((opcode_ptr - opcode_ptr_base) + 1 > MAX_LENGTH) return 0xff; @@ -884,9 +884,9 @@ static inline UINT8 FETCH(void) } #if 0 -static inline UINT16 FETCH16(void) +static inline uint16_t FETCH16(void) { - UINT16 d; + uint16_t d; if ((opcode_ptr - opcode_ptr_base) + 2 > MAX_LENGTH) return 0xffff; d = opcode_ptr[0] | (opcode_ptr[1] << 8); @@ -896,7 +896,7 @@ static inline UINT16 FETCH16(void) } #endif -static inline UINT8 FETCHD(void) +static inline uint8_t FETCHD(void) { if ((opcode_ptr - opcode_ptr_base) + 1 > MAX_LENGTH) return 0xff; @@ -904,9 +904,9 @@ static inline UINT8 FETCHD(void) return *opcode_ptr++; } -static inline UINT16 FETCHD16(void) +static inline uint16_t FETCHD16(void) { - UINT16 d; + uint16_t d; if ((opcode_ptr - opcode_ptr_base) + 2 > MAX_LENGTH) return 0xffff; d = opcode_ptr[0] | (opcode_ptr[1] << 8); @@ -915,7 +915,7 @@ static inline UINT16 FETCHD16(void) return d; } -static char *hexstring(UINT32 value, int digits) +static char *hexstring(uint32_t value, int digits) { static char buffer[20]; buffer[0] = '0'; @@ -926,7 +926,7 @@ static char *hexstring(UINT32 value, int digits) return (buffer[1] >= '0' && buffer[1] <= '9') ? &buffer[1] : &buffer[0]; } -static char *shexstring(UINT32 value, int digits, int always) +static char *shexstring(uint32_t value, int digits, int always) { static char buffer[20]; if (value >= 0x80000000) @@ -940,9 +940,9 @@ static char *shexstring(UINT32 value, int digits, int always) static void handle_modrm(char* s) { - INT8 disp8; - INT16 disp16; - UINT8 mod, rm; + int8_t disp8; + int16_t disp16; + uint8_t mod, rm; modrm = FETCHD(); mod = (modrm >> 6) & 0x3; @@ -971,7 +971,7 @@ static void handle_modrm(char* s) case 6: if( mod == 0 ) { disp16 = FETCHD16(); - s += sprintf( s, "%s", hexstring((unsigned) (UINT16) disp16, 0) ); + s += sprintf( s, "%s", hexstring((unsigned) (uint16_t) disp16, 0) ); } else { s += sprintf( s, "bp" ); } @@ -980,22 +980,22 @@ static void handle_modrm(char* s) } if( mod == 1 ) { disp8 = FETCHD(); - s += sprintf( s, "%s", shexstring((INT32)disp8, 0, TRUE) ); + s += sprintf( s, "%s", shexstring((int32_t)disp8, 0, TRUE) ); } else if( mod == 2 ) { disp16 = FETCHD16(); - s += sprintf( s, "%s", shexstring((INT32)disp16, 0, TRUE) ); + s += sprintf( s, "%s", shexstring((int32_t)disp16, 0, TRUE) ); } s += sprintf( s, "]" ); } -static char* handle_param(char* s, UINT32 param) +static char* handle_param(char* s, uint32_t param) { - UINT8 i8; - UINT16 i16; - UINT16 ptr; - UINT32 addr; - INT8 d8; - INT16 d16; + uint8_t i8; + uint16_t i16; + uint16_t ptr; + uint32_t addr; + int8_t d8; + int16_t d16; switch(param) { @@ -1049,17 +1049,17 @@ static char* handle_param(char* s, UINT32 param) case PARAM_I8: i8 = FETCHD(); - s += sprintf( s, "%s", shexstring((INT8)i8, 0, FALSE) ); + s += sprintf( s, "%s", shexstring((int8_t)i8, 0, FALSE) ); break; case PARAM_I16: i16 = FETCHD16(); - s += sprintf( s, "%s", shexstring((INT16)i16, 0, FALSE) ); + s += sprintf( s, "%s", shexstring((int16_t)i16, 0, FALSE) ); break; case PARAM_UI8: i8 = FETCHD(); - s += sprintf( s, "%s", shexstring((UINT8)i8, 0, FALSE) ); + s += sprintf( s, "%s", shexstring((uint8_t)i8, 0, FALSE) ); break; case PARAM_IMM: @@ -1132,7 +1132,7 @@ static char* handle_param(char* s, UINT32 param) return s; } -static void handle_fpu(char *s, UINT8 op1, UINT8 op2) +static void handle_fpu(char *s, uint8_t op1, uint8_t op2) { switch (op1 & 0x7) { @@ -1507,10 +1507,10 @@ static void handle_fpu(char *s, UINT8 op1, UINT8 op2) } } -static void decode_opcode(char *s, const NEC_I386_OPCODE *op, UINT8 op1 ) +static void decode_opcode(char *s, const NEC_I386_OPCODE *op, uint8_t op1 ) { int i; - UINT8 op2; + uint8_t op2; switch( op->flags ) { @@ -1579,9 +1579,9 @@ handle_unknown: sprintf(s, "???"); } -int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const UINT8 *decryption_table) +int necv_dasm_one(char *buffer, uint32_t eip, const uint8_t *oprom, const uint8_t *decryption_table) { - UINT8 op; + uint8_t op; Iconfig = decryption_table; opcode_ptr = opcode_ptr_base = oprom; |