Simplify reg_read/reg_write, obtaining a perf boost.
Single reg_read/reg_write is now about 25% faster.
This commit is contained in:
@@ -130,12 +130,10 @@ static inline void uc_common_init(struct uc_struct* uc)
|
||||
}
|
||||
|
||||
#define CHECK_REG_TYPE(type) do { \
|
||||
if (unlikely(size)) { \
|
||||
if (unlikely(*size < sizeof(type))) { \
|
||||
return UC_ERR_NOMEM; \
|
||||
} \
|
||||
*size = sizeof(type); \
|
||||
if (unlikely(*size < sizeof(type))) { \
|
||||
return UC_ERR_NOMEM; \
|
||||
} \
|
||||
*size = sizeof(type); \
|
||||
ret = UC_ERR_OK; \
|
||||
} while(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user