diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/common_funcs.h | 4 | ||||
| -rw-r--r-- | src/common/logging/backend.cpp | 2 | ||||
| -rw-r--r-- | src/common/logging/log.h | 2 | ||||
| -rw-r--r-- | src/common/string_util.cpp | 8 | ||||
| -rw-r--r-- | src/common/swap.h | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 93f1c0044..8b0d34da6 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <string> | 7 | #include <string> |
| 8 | 8 | ||
| 9 | #if !defined(ARCHITECTURE_x86_64) && !defined(ARCHITECTURE_ARM) | 9 | #if !defined(ARCHITECTURE_x86_64) |
| 10 | #include <cstdlib> // for exit | 10 | #include <cstdlib> // for exit |
| 11 | #endif | 11 | #endif |
| 12 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| @@ -32,8 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #ifdef ARCHITECTURE_x86_64 | 33 | #ifdef ARCHITECTURE_x86_64 |
| 34 | #define Crash() __asm__ __volatile__("int $3") | 34 | #define Crash() __asm__ __volatile__("int $3") |
| 35 | #elif defined(ARCHITECTURE_ARM) | ||
| 36 | #define Crash() __asm__ __volatile__("trap") | ||
| 37 | #else | 35 | #else |
| 38 | #define Crash() exit(1) | 36 | #define Crash() exit(1) |
| 39 | #endif | 37 | #endif |
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 38cc85e23..55de535c0 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -169,6 +169,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 169 | SUB(Service, AOC) \ | 169 | SUB(Service, AOC) \ |
| 170 | SUB(Service, APM) \ | 170 | SUB(Service, APM) \ |
| 171 | SUB(Service, BCAT) \ | 171 | SUB(Service, BCAT) \ |
| 172 | SUB(Service, BTM) \ | ||
| 172 | SUB(Service, Fatal) \ | 173 | SUB(Service, Fatal) \ |
| 173 | SUB(Service, Friend) \ | 174 | SUB(Service, Friend) \ |
| 174 | SUB(Service, FS) \ | 175 | SUB(Service, FS) \ |
| @@ -192,6 +193,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 192 | SUB(Service, SSL) \ | 193 | SUB(Service, SSL) \ |
| 193 | SUB(Service, Time) \ | 194 | SUB(Service, Time) \ |
| 194 | SUB(Service, VI) \ | 195 | SUB(Service, VI) \ |
| 196 | SUB(Service, WLAN) \ | ||
| 195 | CLS(HW) \ | 197 | CLS(HW) \ |
| 196 | SUB(HW, Memory) \ | 198 | SUB(HW, Memory) \ |
| 197 | SUB(HW, LCD) \ | 199 | SUB(HW, LCD) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index db4a80d0a..e8d98de99 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -56,6 +56,7 @@ enum class Class : ClassType { | |||
| 56 | Service_APM, ///< The APM (Performance) service | 56 | Service_APM, ///< The APM (Performance) service |
| 57 | Service_Audio, ///< The Audio (Audio control) service | 57 | Service_Audio, ///< The Audio (Audio control) service |
| 58 | Service_BCAT, ///< The BCAT service | 58 | Service_BCAT, ///< The BCAT service |
| 59 | Service_BTM, ///< The BTM service | ||
| 59 | Service_Fatal, ///< The Fatal service | 60 | Service_Fatal, ///< The Fatal service |
| 60 | Service_Friend, ///< The friend service | 61 | Service_Friend, ///< The friend service |
| 61 | Service_FS, ///< The FS (Filesystem) service | 62 | Service_FS, ///< The FS (Filesystem) service |
| @@ -79,6 +80,7 @@ enum class Class : ClassType { | |||
| 79 | Service_SSL, ///< The SSL service | 80 | Service_SSL, ///< The SSL service |
| 80 | Service_Time, ///< The time service | 81 | Service_Time, ///< The time service |
| 81 | Service_VI, ///< The VI (Video interface) service | 82 | Service_VI, ///< The VI (Video interface) service |
| 83 | Service_WLAN, ///< The WLAN (Wireless local area network) service | ||
| 82 | HW, ///< Low-level hardware emulation | 84 | HW, ///< Low-level hardware emulation |
| 83 | HW_Memory, ///< Memory-map and address translation | 85 | HW_Memory, ///< Memory-map and address translation |
| 84 | HW_LCD, ///< LCD register emulation | 86 | HW_LCD, ///< LCD register emulation |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 1f0456aee..0ca663032 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 5 | #include <cctype> | 6 | #include <cctype> |
| 6 | #include <cerrno> | 7 | #include <cerrno> |
| 7 | #include <cstdio> | 8 | #include <cstdio> |
| 8 | #include <cstdlib> | 9 | #include <cstdlib> |
| 9 | #include <cstring> | 10 | #include <cstring> |
| 10 | #include <boost/range/algorithm/transform.hpp> | ||
| 11 | #include "common/common_paths.h" | 11 | #include "common/common_paths.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/string_util.h" | 13 | #include "common/string_util.h" |
| @@ -24,13 +24,15 @@ namespace Common { | |||
| 24 | 24 | ||
| 25 | /// Make a string lowercase | 25 | /// Make a string lowercase |
| 26 | std::string ToLower(std::string str) { | 26 | std::string ToLower(std::string str) { |
| 27 | boost::transform(str, str.begin(), ::tolower); | 27 | std::transform(str.begin(), str.end(), str.begin(), |
| 28 | [](unsigned char c) { return std::tolower(c); }); | ||
| 28 | return str; | 29 | return str; |
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | /// Make a string uppercase | 32 | /// Make a string uppercase |
| 32 | std::string ToUpper(std::string str) { | 33 | std::string ToUpper(std::string str) { |
| 33 | boost::transform(str, str.begin(), ::toupper); | 34 | std::transform(str.begin(), str.end(), str.begin(), |
| 35 | [](unsigned char c) { return std::toupper(c); }); | ||
| 34 | return str; | 36 | return str; |
| 35 | } | 37 | } |
| 36 | 38 | ||
diff --git a/src/common/swap.h b/src/common/swap.h index fc7af4280..32af0b6ac 100644 --- a/src/common/swap.h +++ b/src/common/swap.h | |||
| @@ -69,7 +69,7 @@ inline u32 swap32(u32 _data) { | |||
| 69 | inline u64 swap64(u64 _data) { | 69 | inline u64 swap64(u64 _data) { |
| 70 | return _byteswap_uint64(_data); | 70 | return _byteswap_uint64(_data); |
| 71 | } | 71 | } |
| 72 | #elif ARCHITECTURE_ARM | 72 | #elif defined(ARCHITECTURE_ARM) && (__ARM_ARCH >= 6) |
| 73 | inline u16 swap16(u16 _data) { | 73 | inline u16 swap16(u16 _data) { |
| 74 | u32 data = _data; | 74 | u32 data = _data; |
| 75 | __asm__("rev16 %0, %1\n" : "=l"(data) : "l"(data)); | 75 | __asm__("rev16 %0, %1\n" : "=l"(data) : "l"(data)); |