diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-31 21:41:53 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-31 21:41:53 +0000 |
commit | 5127202722b2e9f07b4df9be2dc411baa5545290 (patch) | |
tree | 925e1f6c4c352c1d4649a81ad1482eab313c6b65 /lib | |
parent | 5202dfbb2646cfbfb585f1a00a079438010373e5 (diff) | |
download | ovm-5127202722b2e9f07b4df9be2dc411baa5545290.tar.gz ovm-5127202722b2e9f07b4df9be2dc411baa5545290.tar.bz2 ovm-5127202722b2e9f07b4df9be2dc411baa5545290.zip |
Introduced 3 new union members to data_t
These new members are just signed versions of the previous members.
This makes type punning and usage for signed versions easier than
before (no need for memcpy).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -48,8 +48,11 @@ typedef i64 s_word; typedef union { byte as_byte; + s_byte as_char; hword as_hword; + s_hword as_int; word as_word; + s_word as_long; } data_t; typedef enum |