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/dsp56k/tables.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/dsp56k/tables.cpp')
-rw-r--r-- | src/devices/cpu/dsp56k/tables.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/src/devices/cpu/dsp56k/tables.cpp b/src/devices/cpu/dsp56k/tables.cpp index 5837580409e..72a46bfa0ee 100644 --- a/src/devices/cpu/dsp56k/tables.cpp +++ b/src/devices/cpu/dsp56k/tables.cpp @@ -12,7 +12,7 @@ namespace DSP56K /******************/ /* Table decoding */ /******************/ -bfShift decode_BBB_table(UINT16 BBB) +bfShift decode_BBB_table(uint16_t BBB) { switch(BBB) { @@ -24,7 +24,7 @@ bfShift decode_BBB_table(UINT16 BBB) return BBB_INVALID; } -void decode_cccc_table(const UINT16 cccc, op_mnem& mnemonic) +void decode_cccc_table(const uint16_t cccc, op_mnem& mnemonic) { switch (cccc) { @@ -67,7 +67,7 @@ void decode_cccc_table(const UINT16 cccc, op_mnem& mnemonic) // NEW // } } -void decode_DDDDD_table(const UINT16 DDDDD, reg_id& SD) +void decode_DDDDD_table(const uint16_t DDDDD, reg_id& SD) { switch(DDDDD) { @@ -107,7 +107,7 @@ void decode_DDDDD_table(const UINT16 DDDDD, reg_id& SD) } } -void decode_DD_table(const UINT16 DD, reg_id& SD) +void decode_DD_table(const uint16_t DD, reg_id& SD) { switch (DD) { @@ -118,9 +118,9 @@ void decode_DD_table(const UINT16 DD, reg_id& SD) } } -void decode_DDF_table(const UINT16 DD, const UINT16 F, reg_id& S, reg_id& D) +void decode_DDF_table(const uint16_t DD, const uint16_t F, reg_id& S, reg_id& D) { - const UINT16 switchVal = (DD << 1) | F; + const uint16_t switchVal = (DD << 1) | F; switch (switchVal) { @@ -135,7 +135,7 @@ void decode_DDF_table(const UINT16 DD, const UINT16 F, reg_id& S, reg_id& D) } } -void decode_EE_table(const UINT16 EE, reg_id& D) +void decode_EE_table(const uint16_t EE, reg_id& D) { switch(EE) { @@ -145,7 +145,7 @@ void decode_EE_table(const UINT16 EE, reg_id& D) } } -void decode_F_table(const UINT16 F, reg_id& SD) +void decode_F_table(const uint16_t F, reg_id& SD) { switch(F) { @@ -154,9 +154,9 @@ void decode_F_table(const UINT16 F, reg_id& SD) } } -void decode_h0hF_table(const UINT16 h0h, UINT16 F, reg_id& S, reg_id& D) +void decode_h0hF_table(const uint16_t h0h, uint16_t F, reg_id& S, reg_id& D) { - const UINT16 switchVal = (h0h << 1) | F; + const uint16_t switchVal = (h0h << 1) | F; switch (switchVal) { @@ -171,7 +171,7 @@ void decode_h0hF_table(const UINT16 h0h, UINT16 F, reg_id& S, reg_id& D) } } -void decode_HH_table(const UINT16 HH, reg_id& SD) +void decode_HH_table(const uint16_t HH, reg_id& SD) { switch(HH) { @@ -182,7 +182,7 @@ void decode_HH_table(const UINT16 HH, reg_id& SD) } } -void decode_HHH_table(const UINT16 HHH, reg_id& SD) +void decode_HHH_table(const uint16_t HHH, reg_id& SD) { switch(HHH) { @@ -197,7 +197,7 @@ void decode_HHH_table(const UINT16 HHH, reg_id& SD) } } -void decode_IIIIx_table(const UINT16 IIII, const UINT16 x, reg_id& S, reg_id& D) +void decode_IIIIx_table(const uint16_t IIII, const uint16_t x, reg_id& S, reg_id& D) { S = D = iINVALID; switch(IIII) @@ -221,9 +221,9 @@ void decode_IIIIx_table(const UINT16 IIII, const UINT16 x, reg_id& S, reg_id& D) } } -void decode_JJJF_table(const UINT16 JJJ, const UINT16 F, reg_id& S, reg_id& D) +void decode_JJJF_table(const uint16_t JJJ, const uint16_t F, reg_id& S, reg_id& D) { - const UINT16 switchVal = (JJJ << 1) | F; + const uint16_t switchVal = (JJJ << 1) | F; switch(switchVal) { @@ -246,9 +246,9 @@ void decode_JJJF_table(const UINT16 JJJ, const UINT16 F, reg_id& S, reg_id& D) } } -void decode_JJF_table(const UINT16 JJ, const UINT16 F, reg_id& S, reg_id& D) +void decode_JJF_table(const uint16_t JJ, const uint16_t F, reg_id& S, reg_id& D) { - const UINT16 switchVal = (JJ << 1) | F; + const uint16_t switchVal = (JJ << 1) | F; switch (switchVal) { @@ -263,9 +263,9 @@ void decode_JJF_table(const UINT16 JJ, const UINT16 F, reg_id& S, reg_id& D) } } -void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D) +void decode_JF_table(const uint16_t J, const uint16_t F, reg_id& S, reg_id& D) { - const UINT16 switchVal = (J << 1) | F; + const uint16_t switchVal = (J << 1) | F; switch(switchVal) { @@ -276,7 +276,7 @@ void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D) } } -// NEW // void decode_k_table(UINT16 k, char *Dnot) +// NEW // void decode_k_table(uint16_t k, char *Dnot) // NEW // { // NEW // switch(k) // NEW // { @@ -285,7 +285,7 @@ void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D) // NEW // } // NEW // } -void decode_kSign_table(const UINT16 k, std::string& plusMinus) +void decode_kSign_table(const uint16_t k, std::string& plusMinus) { switch(k) { @@ -294,7 +294,7 @@ void decode_kSign_table(const UINT16 k, std::string& plusMinus) } } -void decode_KKK_table(const UINT16 KKK, reg_id& D1, reg_id& D2) +void decode_KKK_table(const uint16_t KKK, reg_id& D1, reg_id& D2) { switch(KKK) { @@ -309,7 +309,7 @@ void decode_KKK_table(const UINT16 KKK, reg_id& D1, reg_id& D2) } } -void decode_NN_table(UINT16 NN, reg_id& ret) +void decode_NN_table(uint16_t NN, reg_id& ret) { switch(NN) { @@ -320,7 +320,7 @@ void decode_NN_table(UINT16 NN, reg_id& ret) } } -void decode_TT_table(UINT16 TT, reg_id& ret) +void decode_TT_table(uint16_t TT, reg_id& ret) { switch(TT) { @@ -331,9 +331,9 @@ void decode_TT_table(UINT16 TT, reg_id& ret) } } -void decode_QQF_table(const UINT16 QQ, const UINT16 F, reg_id& S1, reg_id& S2, reg_id& D) +void decode_QQF_table(const uint16_t QQ, const uint16_t F, reg_id& S1, reg_id& S2, reg_id& D) { - const UINT16 switchVal = (QQ << 1) | F; + const uint16_t switchVal = (QQ << 1) | F; switch(switchVal) { @@ -348,9 +348,9 @@ void decode_QQF_table(const UINT16 QQ, const UINT16 F, reg_id& S1, reg_id& S2, r } } -void decode_QQF_special_table(const UINT16 QQ, const UINT16 F, reg_id& S1, reg_id& S2, reg_id& D) +void decode_QQF_special_table(const uint16_t QQ, const uint16_t F, reg_id& S1, reg_id& S2, reg_id& D) { - const UINT16 switchVal = (QQ << 1) | F; + const uint16_t switchVal = (QQ << 1) | F; switch(switchVal) { @@ -365,9 +365,9 @@ void decode_QQF_special_table(const UINT16 QQ, const UINT16 F, reg_id& S1, reg_i } } -void decode_QQQF_table(const UINT16 QQQ, const UINT16 F, reg_id& S1, reg_id& S2, reg_id& D) +void decode_QQQF_table(const uint16_t QQQ, const uint16_t F, reg_id& S1, reg_id& S2, reg_id& D) { - const UINT16 switchVal = (QQQ << 1) | F; + const uint16_t switchVal = (QQQ << 1) | F; switch(switchVal) { @@ -390,7 +390,7 @@ void decode_QQQF_table(const UINT16 QQQ, const UINT16 F, reg_id& S1, reg_id& S2, } } -void decode_RR_table(UINT16 RR, reg_id& ret) +void decode_RR_table(uint16_t RR, reg_id& ret) { switch(RR) { @@ -401,7 +401,7 @@ void decode_RR_table(UINT16 RR, reg_id& ret) } } -void decode_rr_table(UINT16 rr, reg_id& ret) +void decode_rr_table(uint16_t rr, reg_id& ret) { switch(rr) { @@ -412,7 +412,7 @@ void decode_rr_table(UINT16 rr, reg_id& ret) } } -void decode_s_table(const UINT16 s, op_mnem& arithmetic) +void decode_s_table(const uint16_t s, op_mnem& arithmetic) { switch(s) { @@ -421,7 +421,7 @@ void decode_s_table(const UINT16 s, op_mnem& arithmetic) } } -void decode_ss_table(const UINT16 ss, op_mnem& arithmetic) +void decode_ss_table(const uint16_t ss, op_mnem& arithmetic) { switch(ss) { @@ -433,9 +433,9 @@ void decode_ss_table(const UINT16 ss, op_mnem& arithmetic) } } -void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg_id& S, reg_id& D) +void decode_uuuuF_table(const uint16_t uuuu, const uint16_t F, std::string& arg, reg_id& S, reg_id& D) { - const UINT16 switchVal = (uuuu << 1) | F; + const uint16_t switchVal = (uuuu << 1) | F; //D = "sub?"; //S = "add"; @@ -475,7 +475,7 @@ void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg } } -void decode_Z_table(const UINT16 Z, std::string& ea) +void decode_Z_table(const uint16_t Z, std::string& ea) { /* This is fixed as per the Family Manual errata addendum */ switch(Z) @@ -485,7 +485,7 @@ void decode_Z_table(const UINT16 Z, std::string& ea) } } -void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea) +void assemble_ea_from_m_table(const uint16_t m, const int n, std::string& ea) { char temp[32]; switch(m) @@ -496,7 +496,7 @@ void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea) ea = temp; } -void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std::string& ea2) +void assemble_eas_from_mm_table(uint16_t mm, int n1, int n2, std::string& ea1, std::string& ea2) { char temp1[32]; char temp2[32]; @@ -515,7 +515,7 @@ void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std ea2 = temp2; } -void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea) +void assemble_ea_from_MM_table(uint16_t MM, int n, std::string& ea) { char temp[32]; switch(MM) @@ -528,7 +528,7 @@ void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea) ea = temp; } -void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea) +void assemble_ea_from_q_table(uint16_t q, int n, std::string& ea) { char temp[32]; switch(q) @@ -539,7 +539,7 @@ void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea) ea = temp; } -void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea) +void assemble_ea_from_t_table(uint16_t t, uint16_t val, std::string& ea) { char temp[32]; switch(t) @@ -552,7 +552,7 @@ void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea) ea = temp; } -void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea) +void assemble_ea_from_z_table(uint16_t z, int n, std::string& ea) { char temp[32]; switch(z) @@ -563,7 +563,7 @@ void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea) ea = temp; } -void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D) +void assemble_D_from_P_table(uint16_t P, uint16_t ppppp, std::string& D) { char temp[32]; std::string fullAddy; /* Convert Short Absolute Address to full 16-bit */ @@ -583,7 +583,7 @@ void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D) D = temp; } -void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const std::string& ea, +void assemble_arguments_from_W_table(uint16_t W, char ma, const reg_id& SD, const std::string& ea, std::string& source, std::string& destination) { char temp[32]; @@ -595,7 +595,7 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const } } -void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, const std::string& ea, +void assemble_arguments_from_W_table(uint16_t W, char ma, const std::string& SD, const std::string& ea, std::string& source, std::string& destination) { char temp[32]; @@ -607,9 +607,9 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, c } } -void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, std::string& S, std::string& D) +void assemble_reg_from_W_table(uint16_t W, char ma, const reg_id& SD, const int8_t xx, std::string& S, std::string& D) { - UINT8 abs_xx; + uint8_t abs_xx; char temp[32]; char operation[32]; @@ -629,24 +629,24 @@ void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 x } } -void assemble_address_from_IO_short_address(UINT16 pp, std::string& ea) +void assemble_address_from_IO_short_address(uint16_t pp, std::string& ea) { char temp[32]; - UINT16 fullAddy = 0xffe0; + uint16_t fullAddy = 0xffe0; fullAddy |= pp; sprintf(temp, "%.04x", fullAddy); ea = temp; } -INT8 get_6_bit_signed_value(UINT16 bits) +int8_t get_6_bit_signed_value(uint16_t bits) { - UINT16 fullAddy = bits; + uint16_t fullAddy = bits; if (fullAddy & 0x0020) fullAddy |= 0xffc0; - return (INT8)fullAddy; + return (int8_t)fullAddy; } @@ -654,12 +654,12 @@ INT8 get_6_bit_signed_value(UINT16 bits) /* HELPER FUNCTIONS */ /********************/ -UINT16 dsp56k_op_maskn(UINT16 cur, UINT16 mask) +uint16_t dsp56k_op_maskn(uint16_t cur, uint16_t mask) { int i; - UINT16 retVal = (cur & mask); - UINT16 temp = 0x0000; + uint16_t retVal = (cur & mask); + uint16_t temp = 0x0000; int offsetCount = 0; /* Shift everything right, eliminating 'whitespace'... */ @@ -694,7 +694,7 @@ bool registerOverlap(const reg_id& r0, const size_t bmd, const reg_id& r1) return false; } -UINT16 regValue16(dsp56k_core* cpustate, const reg_id& reg) +uint16_t regValue16(dsp56k_core* cpustate, const reg_id& reg) { if (reg == iX0) return X0; if (reg == iX1) return X1; @@ -725,7 +725,7 @@ UINT16 regValue16(dsp56k_core* cpustate, const reg_id& reg) return 0xdead; } -void setReg16(dsp56k_core* cpustate, const UINT16& value, const reg_id& reg) +void setReg16(dsp56k_core* cpustate, const uint16_t& value, const reg_id& reg) { if (reg == iX0) X0 = value; if (reg == iX1) X1 = value; @@ -876,7 +876,7 @@ reg_id stringAsRegID(const std::string& str) return iINVALID; } -UINT8 regIDAsNum(const reg_id& regId) +uint8_t regIDAsNum(const reg_id& regId) { if (regId == iR0) return 0; if (regId == iR1) return 1; |