diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-09-15 12:17:37 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-09-15 12:17:37 -0400 |
commit | 30e6af0dcd8d967c083311f3a105a68ac5e158e7 (patch) | |
tree | 7a98254293fc0678a881ae58cafd580b3c7963c2 | |
parent | 455a7c87e8227d83b7bd8982285fed95546cb8c9 (diff) | |
download | qemu-seabios-30e6af0dcd8d967c083311f3a105a68ac5e158e7.tar.gz |
Fix 'union u64_u32_u' member names.
Use 'lo' to mean the low bits and 'hi' to mean the high bits of a
64bit value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/byteorder.h | 2 | ||||
-rw-r--r-- | src/farptr.h | 4 | ||||
-rw-r--r-- | src/types.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/byteorder.h b/src/byteorder.h index 94e3a3b..5a8a64a 100644 --- a/src/byteorder.h +++ b/src/byteorder.h @@ -17,8 +17,8 @@ static inline u32 __swab32(u32 val) { static inline u64 __swab64(u64 val) { union u64_u32_u i, o; i.val = val; - o.hi = __swab32(i.lo); o.lo = __swab32(i.hi); + o.hi = __swab32(i.lo); return o.val; } diff --git a/src/farptr.h b/src/farptr.h index 3a85c6b..5b6c5c1 100644 --- a/src/farptr.h +++ b/src/farptr.h @@ -26,8 +26,8 @@ extern u16 __segment_FS, __segment_GS; #define READ64_SEG(prefix, SEG, value, var) do { \ union u64_u32_u __value; \ union u64_u32_u *__r64_ptr = (union u64_u32_u *)&(var); \ - READ32_SEG(prefix, SEG, __value.hi, __r64_ptr->hi); \ READ32_SEG(prefix, SEG, __value.lo, __r64_ptr->lo); \ + READ32_SEG(prefix, SEG, __value.hi, __r64_ptr->hi); \ *(u64*)&(value) = __value.val; \ } while (0) #define WRITE8_SEG(prefix, SEG, var, value) \ @@ -44,8 +44,8 @@ extern u16 __segment_FS, __segment_GS; union u64_u32_u *__w64_ptr = (union u64_u32_u *)&(var); \ typeof(var) __value_tmp = (value); \ __value.val = *(u64*)&__value_tmp; \ - WRITE32_SEG(prefix, SEG, __w64_ptr->hi, __value.hi); \ WRITE32_SEG(prefix, SEG, __w64_ptr->lo, __value.lo); \ + WRITE32_SEG(prefix, SEG, __w64_ptr->hi, __value.hi); \ } while (0) // Macros for automatically choosing the appropriate memory size diff --git a/src/types.h b/src/types.h index b10f3b3..24b078e 100644 --- a/src/types.h +++ b/src/types.h @@ -17,7 +17,7 @@ typedef signed long long s64; typedef u32 size_t; union u64_u32_u { - struct { u32 hi, lo; }; + struct { u32 lo, hi; }; u64 val; }; |