diff options
author | Samuel Huang <huangs@chromium.org> | 2018-06-13 17:47:39 +0000 |
---|---|---|
committer | Edward Lesmes <ehmaldonado@google.com> | 2021-07-23 22:52:46 +0000 |
commit | 607ce603f280a101f869adf591fe1032353636bd (patch) | |
tree | 5ae341f507e286096ed6ea0eefa84080e19e90f1 /reloc_utils.cc | |
parent | 1b25709592fb250dd0abeffbbae15206597ec3a2 (diff) | |
download | zucchini-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 'reloc_utils.cc')
-rw-r--r-- | reloc_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/reloc_utils.cc b/reloc_utils.cc index 84f488e..c9fb432 100644 --- a/reloc_utils.cc +++ b/reloc_utils.cc @@ -81,7 +81,7 @@ RelocRvaReaderWin32::RelocRvaReaderWin32( offset_t cur_reloc_units_offset = cur_reloc_units_.begin() - image_.begin(); if (lo > cur_reloc_units_offset) { offset_t delta = - ceil<offset_t>(lo - cur_reloc_units_offset, kRelocUnitSize); + AlignCeil<offset_t>(lo - cur_reloc_units_offset, kRelocUnitSize); cur_reloc_units_.Skip(delta); } } |