Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static inline uint32_t
- svp64_field_get(uint32_t value, uint32_t head, uint32_t tail)
- {
- const uint32_t mask = ((UINT32_C(1) << (tail - head)) - UINT32_C(1));
- return ((value >> head) & mask);
- }
- static inline void
- svp64_field_set(uint32_t *value, uint32_t head, uint32_t tail, uint32_t field)
- {
- const uint32_t mask = ((UINT32_C(1) << (tail - head)) - UINT32_C(1));
- *value |= ((field & mask) << head);
- }
- struct svp64_prefix {
- uint32_t fields;
- };
- static inline uint32_t
- svp64_prefix_insn_get(const struct svp64_prefix *prefix)
- {
- return svp64_field_get (prefix->fields, 0, 32);
- }
- static inline void
- svp64_prefix_insn_set(struct svp64_prefix *prefix, uint32_t insn)
- {
- svp64_field_set (&prefix->fields, 0, 32, insn);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement