Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: courgette/disassembler_elf_32_x86.cc

Issue 1935203002: [Courgette] Using LabelManager to reduce Courgette-apply peak RAM by 25%. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « courgette/disassembler_elf_32_x86.h ('k') | courgette/disassembler_win32_x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "courgette/disassembler_elf_32_x86.h" 5 #include "courgette/disassembler_elf_32_x86.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "courgette/assembly_program.h" 12 #include "courgette/assembly_program.h"
13 #include "courgette/courgette.h" 13 #include "courgette/courgette.h"
14 14
15 namespace courgette { 15 namespace courgette {
16 16
17 CheckBool DisassemblerElf32X86::TypedRVAX86::ComputeRelativeTarget( 17 CheckBool DisassemblerElf32X86::TypedRVAX86::ComputeRelativeTarget(
18 const uint8_t* op_pointer) { 18 const uint8_t* op_pointer) {
19 set_relative_target(Read32LittleEndian(op_pointer) + 4); 19 set_relative_target(Read32LittleEndian(op_pointer) + 4);
20 return true; 20 return true;
21 } 21 }
22 22
23 CheckBool DisassemblerElf32X86::TypedRVAX86::EmitInstruction( 23 CheckBool DisassemblerElf32X86::TypedRVAX86::EmitInstruction(
24 AssemblyProgram* program, 24 AssemblyProgram* program,
25 RVA target_rva) { 25 Label* label) {
26 return program->EmitRel32(program->FindOrMakeRel32Label(target_rva)); 26 return program->EmitRel32(label);
27 } 27 }
28 28
29 uint16_t DisassemblerElf32X86::TypedRVAX86::op_size() const { 29 uint16_t DisassemblerElf32X86::TypedRVAX86::op_size() const {
30 return 4; 30 return 4;
31 } 31 }
32 32
33 DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length) 33 DisassemblerElf32X86::DisassemblerElf32X86(const void* start, size_t length)
34 : DisassemblerElf32(start, length) { 34 : DisassemblerElf32(start, length) {
35 } 35 }
36 36
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 continue; 194 continue;
195 } 195 }
196 } 196 }
197 p += 1; 197 p += 1;
198 } 198 }
199 199
200 return true; 200 return true;
201 } 201 }
202 202
203 } // namespace courgette 203 } // namespace courgette
OLDNEW
« no previous file with comments | « courgette/disassembler_elf_32_x86.h ('k') | courgette/disassembler_win32_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698