diff options
| author | 2015-12-06 15:11:09 -0500 | |
|---|---|---|
| committer | 2015-12-06 15:14:51 -0500 | |
| commit | 56e22e6aac513e65acfec208a5d5ba2170eceb7a (patch) | |
| tree | 27fa840b335e0898bd7220638e5e6b9ffeef79f9 /src | |
| parent | arm_interface: Make GetNumInstructions const (diff) | |
| download | yuzu-56e22e6aac513e65acfec208a5d5ba2170eceb7a.tar.gz yuzu-56e22e6aac513e65acfec208a5d5ba2170eceb7a.tar.xz yuzu-56e22e6aac513e65acfec208a5d5ba2170eceb7a.zip | |
dyncom: Remove static keyword from header functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_run.h | 4 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_thumb.h | 2 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfp_helper.h | 32 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_run.h b/src/core/arm/dyncom/arm_dyncom_run.h index 85c8d798e..8eb694fee 100644 --- a/src/core/arm/dyncom/arm_dyncom_run.h +++ b/src/core/arm/dyncom/arm_dyncom_run.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * @return If the PC is being read, then the word-aligned PC value is returned. | 30 | * @return If the PC is being read, then the word-aligned PC value is returned. |
| 31 | * If the PC is not being read, then the value stored in the register is returned. | 31 | * If the PC is not being read, then the value stored in the register is returned. |
| 32 | */ | 32 | */ |
| 33 | static inline u32 CHECK_READ_REG15_WA(const ARMul_State* cpu, int Rn) { | 33 | inline u32 CHECK_READ_REG15_WA(const ARMul_State* cpu, int Rn) { |
| 34 | return (Rn == 15) ? ((cpu->Reg[15] & ~0x3) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; | 34 | return (Rn == 15) ? ((cpu->Reg[15] & ~0x3) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| @@ -43,6 +43,6 @@ static inline u32 CHECK_READ_REG15_WA(const ARMul_State* cpu, int Rn) { | |||
| 43 | * @return If the PC is being read, then the incremented PC value is returned. | 43 | * @return If the PC is being read, then the incremented PC value is returned. |
| 44 | * If the PC is not being read, then the values stored in the register is returned. | 44 | * If the PC is not being read, then the values stored in the register is returned. |
| 45 | */ | 45 | */ |
| 46 | static inline u32 CHECK_READ_REG15(const ARMul_State* cpu, int Rn) { | 46 | inline u32 CHECK_READ_REG15(const ARMul_State* cpu, int Rn) { |
| 47 | return (Rn == 15) ? ((cpu->Reg[15] & ~0x1) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; | 47 | return (Rn == 15) ? ((cpu->Reg[15] & ~0x1) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; |
| 48 | } | 48 | } |
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.h b/src/core/arm/dyncom/arm_dyncom_thumb.h index 447974363..c1be3c735 100644 --- a/src/core/arm/dyncom/arm_dyncom_thumb.h +++ b/src/core/arm/dyncom/arm_dyncom_thumb.h | |||
| @@ -38,7 +38,7 @@ enum class ThumbDecodeStatus { | |||
| 38 | // Translates a Thumb mode instruction into its ARM equivalent. | 38 | // Translates a Thumb mode instruction into its ARM equivalent. |
| 39 | ThumbDecodeStatus TranslateThumbInstruction(u32 addr, u32 instr, u32* ainstr, u32* inst_size); | 39 | ThumbDecodeStatus TranslateThumbInstruction(u32 addr, u32 instr, u32* ainstr, u32* inst_size); |
| 40 | 40 | ||
| 41 | static inline u32 GetThumbInstruction(u32 instr, u32 address) { | 41 | inline u32 GetThumbInstruction(u32 instr, u32 address) { |
| 42 | // Normally you would need to handle instruction endianness, | 42 | // Normally you would need to handle instruction endianness, |
| 43 | // however, it is fixed to little-endian on the MPCore, so | 43 | // however, it is fixed to little-endian on the MPCore, so |
| 44 | // there's no need to check for this beforehand. | 44 | // there's no need to check for this beforehand. |
diff --git a/src/core/arm/skyeye_common/vfp/vfp_helper.h b/src/core/arm/skyeye_common/vfp/vfp_helper.h index 3358ff1d9..210972917 100644 --- a/src/core/arm/skyeye_common/vfp/vfp_helper.h +++ b/src/core/arm/skyeye_common/vfp/vfp_helper.h | |||
| @@ -85,7 +85,7 @@ enum : u32 { | |||
| 85 | 85 | ||
| 86 | #define vfp_single(inst) (((inst) & 0x0000f00) == 0xa00) | 86 | #define vfp_single(inst) (((inst) & 0x0000f00) == 0xa00) |
| 87 | 87 | ||
| 88 | static inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift) | 88 | inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift) |
| 89 | { | 89 | { |
| 90 | if (shift) { | 90 | if (shift) { |
| 91 | if (shift < 32) | 91 | if (shift < 32) |
| @@ -96,7 +96,7 @@ static inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift) | |||
| 96 | return val; | 96 | return val; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static inline u64 vfp_shiftright64jamming(u64 val, unsigned int shift) | 99 | inline u64 vfp_shiftright64jamming(u64 val, unsigned int shift) |
| 100 | { | 100 | { |
| 101 | if (shift) { | 101 | if (shift) { |
| 102 | if (shift < 64) | 102 | if (shift < 64) |
| @@ -107,7 +107,7 @@ static inline u64 vfp_shiftright64jamming(u64 val, unsigned int shift) | |||
| 107 | return val; | 107 | return val; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static inline u32 vfp_hi64to32jamming(u64 val) | 110 | inline u32 vfp_hi64to32jamming(u64 val) |
| 111 | { | 111 | { |
| 112 | u32 v; | 112 | u32 v; |
| 113 | u32 highval = val >> 32; | 113 | u32 highval = val >> 32; |
| @@ -121,7 +121,7 @@ static inline u32 vfp_hi64to32jamming(u64 val) | |||
| 121 | return v; | 121 | return v; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static inline void add128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) | 124 | inline void add128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) |
| 125 | { | 125 | { |
| 126 | *resl = nl + ml; | 126 | *resl = nl + ml; |
| 127 | *resh = nh + mh; | 127 | *resh = nh + mh; |
| @@ -129,7 +129,7 @@ static inline void add128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) | |||
| 129 | *resh += 1; | 129 | *resh += 1; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static inline void sub128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) | 132 | inline void sub128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) |
| 133 | { | 133 | { |
| 134 | *resl = nl - ml; | 134 | *resl = nl - ml; |
| 135 | *resh = nh - mh; | 135 | *resh = nh - mh; |
| @@ -137,7 +137,7 @@ static inline void sub128(u64* resh, u64* resl, u64 nh, u64 nl, u64 mh, u64 ml) | |||
| 137 | *resh -= 1; | 137 | *resh -= 1; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static inline void mul64to128(u64* resh, u64* resl, u64 n, u64 m) | 140 | inline void mul64to128(u64* resh, u64* resl, u64 n, u64 m) |
| 141 | { | 141 | { |
| 142 | u32 nh, nl, mh, ml; | 142 | u32 nh, nl, mh, ml; |
| 143 | u64 rh, rma, rmb, rl; | 143 | u64 rh, rma, rmb, rl; |
| @@ -164,20 +164,20 @@ static inline void mul64to128(u64* resh, u64* resl, u64 n, u64 m) | |||
| 164 | *resh = rh; | 164 | *resh = rh; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static inline void shift64left(u64* resh, u64* resl, u64 n) | 167 | inline void shift64left(u64* resh, u64* resl, u64 n) |
| 168 | { | 168 | { |
| 169 | *resh = n >> 63; | 169 | *resh = n >> 63; |
| 170 | *resl = n << 1; | 170 | *resl = n << 1; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static inline u64 vfp_hi64multiply64(u64 n, u64 m) | 173 | inline u64 vfp_hi64multiply64(u64 n, u64 m) |
| 174 | { | 174 | { |
| 175 | u64 rh, rl; | 175 | u64 rh, rl; |
| 176 | mul64to128(&rh, &rl, n, m); | 176 | mul64to128(&rh, &rl, n, m); |
| 177 | return rh | (rl != 0); | 177 | return rh | (rl != 0); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static inline u64 vfp_estimate_div128to64(u64 nh, u64 nl, u64 m) | 180 | inline u64 vfp_estimate_div128to64(u64 nh, u64 nl, u64 m) |
| 181 | { | 181 | { |
| 182 | u64 mh, ml, remh, reml, termh, terml, z; | 182 | u64 mh, ml, remh, reml, termh, terml, z; |
| 183 | 183 | ||
| @@ -249,7 +249,7 @@ enum : u32 { | |||
| 249 | VFP_SNAN = (VFP_NAN|VFP_NAN_SIGNAL) | 249 | VFP_SNAN = (VFP_NAN|VFP_NAN_SIGNAL) |
| 250 | }; | 250 | }; |
| 251 | 251 | ||
| 252 | static inline int vfp_single_type(const vfp_single* s) | 252 | inline int vfp_single_type(const vfp_single* s) |
| 253 | { | 253 | { |
| 254 | int type = VFP_NUMBER; | 254 | int type = VFP_NUMBER; |
| 255 | if (s->exponent == 255) { | 255 | if (s->exponent == 255) { |
| @@ -271,7 +271,7 @@ static inline int vfp_single_type(const vfp_single* s) | |||
| 271 | // Unpack a single-precision float. Note that this returns the magnitude | 271 | // Unpack a single-precision float. Note that this returns the magnitude |
| 272 | // of the single-precision float mantissa with the 1. if necessary, | 272 | // of the single-precision float mantissa with the 1. if necessary, |
| 273 | // aligned to bit 30. | 273 | // aligned to bit 30. |
| 274 | static inline void vfp_single_unpack(vfp_single* s, s32 val, u32* fpscr) | 274 | inline void vfp_single_unpack(vfp_single* s, s32 val, u32* fpscr) |
| 275 | { | 275 | { |
| 276 | s->sign = vfp_single_packed_sign(val) >> 16, | 276 | s->sign = vfp_single_packed_sign(val) >> 16, |
| 277 | s->exponent = vfp_single_packed_exponent(val); | 277 | s->exponent = vfp_single_packed_exponent(val); |
| @@ -293,7 +293,7 @@ static inline void vfp_single_unpack(vfp_single* s, s32 val, u32* fpscr) | |||
| 293 | 293 | ||
| 294 | // Re-pack a single-precision float. This assumes that the float is | 294 | // Re-pack a single-precision float. This assumes that the float is |
| 295 | // already normalised such that the MSB is bit 30, _not_ bit 31. | 295 | // already normalised such that the MSB is bit 30, _not_ bit 31. |
| 296 | static inline s32 vfp_single_pack(const vfp_single* s) | 296 | inline s32 vfp_single_pack(const vfp_single* s) |
| 297 | { | 297 | { |
| 298 | u32 val = (s->sign << 16) + | 298 | u32 val = (s->sign << 16) + |
| 299 | (s->exponent << VFP_SINGLE_MANTISSA_BITS) + | 299 | (s->exponent << VFP_SINGLE_MANTISSA_BITS) + |
| @@ -335,7 +335,7 @@ struct vfp_double { | |||
| 335 | #define vfp_double_packed_exponent(v) (((v) >> VFP_DOUBLE_MANTISSA_BITS) & ((1 << VFP_DOUBLE_EXPONENT_BITS) - 1)) | 335 | #define vfp_double_packed_exponent(v) (((v) >> VFP_DOUBLE_MANTISSA_BITS) & ((1 << VFP_DOUBLE_EXPONENT_BITS) - 1)) |
| 336 | #define vfp_double_packed_mantissa(v) ((v) & ((1ULL << VFP_DOUBLE_MANTISSA_BITS) - 1)) | 336 | #define vfp_double_packed_mantissa(v) ((v) & ((1ULL << VFP_DOUBLE_MANTISSA_BITS) - 1)) |
| 337 | 337 | ||
| 338 | static inline int vfp_double_type(const vfp_double* s) | 338 | inline int vfp_double_type(const vfp_double* s) |
| 339 | { | 339 | { |
| 340 | int type = VFP_NUMBER; | 340 | int type = VFP_NUMBER; |
| 341 | if (s->exponent == 2047) { | 341 | if (s->exponent == 2047) { |
| @@ -357,7 +357,7 @@ static inline int vfp_double_type(const vfp_double* s) | |||
| 357 | // Unpack a double-precision float. Note that this returns the magnitude | 357 | // Unpack a double-precision float. Note that this returns the magnitude |
| 358 | // of the double-precision float mantissa with the 1. if necessary, | 358 | // of the double-precision float mantissa with the 1. if necessary, |
| 359 | // aligned to bit 62. | 359 | // aligned to bit 62. |
| 360 | static inline void vfp_double_unpack(vfp_double* s, s64 val, u32* fpscr) | 360 | inline void vfp_double_unpack(vfp_double* s, s64 val, u32* fpscr) |
| 361 | { | 361 | { |
| 362 | s->sign = vfp_double_packed_sign(val) >> 48; | 362 | s->sign = vfp_double_packed_sign(val) >> 48; |
| 363 | s->exponent = vfp_double_packed_exponent(val); | 363 | s->exponent = vfp_double_packed_exponent(val); |
| @@ -379,7 +379,7 @@ static inline void vfp_double_unpack(vfp_double* s, s64 val, u32* fpscr) | |||
| 379 | 379 | ||
| 380 | // Re-pack a double-precision float. This assumes that the float is | 380 | // Re-pack a double-precision float. This assumes that the float is |
| 381 | // already normalised such that the MSB is bit 30, _not_ bit 31. | 381 | // already normalised such that the MSB is bit 30, _not_ bit 31. |
| 382 | static inline s64 vfp_double_pack(const vfp_double* s) | 382 | inline s64 vfp_double_pack(const vfp_double* s) |
| 383 | { | 383 | { |
| 384 | u64 val = ((u64)s->sign << 48) + | 384 | u64 val = ((u64)s->sign << 48) + |
| 385 | ((u64)s->exponent << VFP_DOUBLE_MANTISSA_BITS) + | 385 | ((u64)s->exponent << VFP_DOUBLE_MANTISSA_BITS) + |
| @@ -415,7 +415,7 @@ struct op { | |||
| 415 | u32 flags; | 415 | u32 flags; |
| 416 | }; | 416 | }; |
| 417 | 417 | ||
| 418 | static inline u32 fls(u32 x) | 418 | inline u32 fls(u32 x) |
| 419 | { | 419 | { |
| 420 | int r = 32; | 420 | int r = 32; |
| 421 | 421 | ||