diff options
author | Oxore <oxore@protonmail.com> | 2023-05-01 20:11:36 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-01 20:11:36 +0300 |
commit | 67cd57b5e5dcf4c434e368a805f566daf829853f (patch) | |
tree | 5930c2751bd0b39091c7d6df035c68f06af42eb4 /common.h | |
parent | becd897fe8bd4458d6c089dfcb07299a13f7b817 (diff) |
Impl BTST, BCHG, BSET and BCLR
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,19 +13,19 @@ constexpr size_t kInstructionSizeStepBytes = 2; constexpr size_t kRomSizeBytes = 4 * 1024 * 1024; constexpr size_t kDisasmMapSizeElements = kRomSizeBytes / kInstructionSizeStepBytes; -constexpr size_t Min(size_t a, size_t b) { return a < b ? a : b; } +static inline constexpr size_t Min(size_t a, size_t b) { return a < b ? a : b; } -constexpr uint16_t GetU16BE(uint8_t *buffer) +static inline constexpr uint16_t GetU16BE(uint8_t *buffer) { return (static_cast<uint16_t>(buffer[0]) << 8) | static_cast<uint16_t>(buffer[1]); } -constexpr int16_t GetI16BE(uint8_t *buffer) +static inline constexpr int16_t GetI16BE(uint8_t *buffer) { return (static_cast<uint16_t>(buffer[0]) << 8) | static_cast<uint16_t>(buffer[1]); } -constexpr int32_t GetI32BE(uint8_t *buffer) +static inline constexpr int32_t GetI32BE(uint8_t *buffer) { return (static_cast<uint32_t>(buffer[0]) << 24) | (static_cast<uint32_t>(buffer[1]) << 16) | |