aboutsummaryrefslogtreecommitdiff
path: root/disassembler_win32.h
diff options
context:
space:
mode:
authorSamuel Huang <huangs@chromium.org>2018-06-13 17:47:39 +0000
committerEdward Lesmes <ehmaldonado@google.com>2021-07-23 22:52:46 +0000
commit607ce603f280a101f869adf591fe1032353636bd (patch)
tree5ae341f507e286096ed6ea0eefa84080e19e90f1 /disassembler_win32.h
parent1b25709592fb250dd0abeffbbae15206597ec3a2 (diff)
downloadzucchini-607ce603f280a101f869adf591fe1032353636bd.tar.gz
[Zucchini] Introduce bit operations into algorithm.h.
This CL makes algorithm.h in Chromium match trunk's version. Details: - Add {GetBit(), GetSignedBits(), GetUnsignedBits(), SignedFit()}. These will be used by the ARM Disassembler. - Rename ceil() to AlignCeil() to avoid confusion with ceil() from <cmath>. - Extensive unit tests. - Minor enum type fix in disassembler_win32.h (offset_t should not be used to represent lengths). Change-Id: Icf9ce254bce2e5a3e9c286dbb5a704aeacd8bc35 Reviewed-on: https://chromium-review.googlesource.com/1098556 Reviewed-by: Samuel Huang <huangs@chromium.org> Reviewed-by: Greg Thompson <grt@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#566893} NOKEYCHECK=True GitOrigin-RevId: 2c50b5af45fa271f06317419f6b8bfc5f4a80be0
Diffstat (limited to 'disassembler_win32.h')
-rw-r--r--disassembler_win32.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/disassembler_win32.h b/disassembler_win32.h
index 8e410ee..29033ce 100644
--- a/disassembler_win32.h
+++ b/disassembler_win32.h
@@ -30,7 +30,7 @@ struct Win32X86Traits {
static constexpr ExecutableType kExeType = kExeTypeWin32X86;
enum : uint16_t { kMagic = 0x10B };
enum : uint16_t { kRelocType = 3 };
- enum : offset_t { kVAWidth = 4 };
+ enum : uint32_t { kVAWidth = 4 };
static const char kExeTypeString[];
using ImageOptionalHeader = pe::ImageOptionalHeader;
@@ -43,7 +43,7 @@ struct Win32X64Traits {
static constexpr ExecutableType kExeType = kExeTypeWin32X64;
enum : uint16_t { kMagic = 0x20B };
enum : uint16_t { kRelocType = 10 };
- enum : offset_t { kVAWidth = 8 };
+ enum : uint32_t { kVAWidth = 8 };
static const char kExeTypeString[];
using ImageOptionalHeader = pe::ImageOptionalHeader64;