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

Side by Side Diff: courgette/testdata/rel32_x64_02.txt

Issue 2008253004: Refactor rel32 searching process for x64 to make it more similar to x86. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
(Empty)
1 # Test rel32 jump instructions with abs32 and .reloc obstructions.
2
3 # .text start RVA and end RVA
4 1000
5 3000
6 # .reloc start RVA and end RVA
7 # Typically this won't overlap with .text.
8 # Note: If we use 1020, then the algorithm would never encounter it, so the
9 # .reloc does not get skipped! This edge case is not worth fixing right now.
10 101F
11 1030
12 # End RVA
13 5000
14
15 # Assume ImageBase = 00400000. This does not affect the test.
16 Program:
17 00401000: 55 push ebp
18 00401001: 8B EC mov ebp,esp
19 00401003: E8 00 00 00 00 call 00401008 # Overlaps with abs32
20 00401008: E9 00 00 00 00 jmp 0040100D # Overlaps with abs32
21 0040100D: 0F 80 00 00 00 00 jo 00401013
22 00401013: 0F 81 00 00 00 00 jno 00401019
23 00401019: 0F 82 00 00 00 00 jb 0040101F
24 0040101F: 0F 83 00 00 00 00 jae 00401025 # Overlaps with .reloc
25 00401025: 0F 84 00 00 00 00 je 0040102B # Overlaps with .reloc
26 0040102B: 0F 85 00 00 00 00 jne 00401031 # Overlaps with .reloc
27 00401031: 0F 86 00 00 00 00 jbe 00401037
28 00401037: 0F 87 00 00 00 00 ja 0040103D
29 0040103D: 0F 88 00 00 00 00 js 00401043
30 00401043: 0F 89 00 00 00 00 jns 00401049
31 00401049: 0F 8A 00 00 00 00 jp 0040104F # Ignored!
32 0040104F: 0F 8B 00 00 00 00 jnp 00401055 # Ignored!
33 00401055: 0F 8C 00 00 00 00 jl 0040105B # Overlaps with abs32
34 0040105B: 0F 8D 00 00 00 00 jge 00401061 # Overlaps with abs32
35 00401061: 0F 8E 00 00 00 00 jle 00401067
36 00401067: 0F 8F 00 00 00 00 jg 0040106D
37 0040106D: FF 15 00 00 00 00 call 00401073
38 00401073: FF 25 00 00 00 00 jmp 00401079
39 00401079: 8B 05 00 00 00 00 mov eax, 00401079
40 0040107F: 8B 3D 00 00 00 00 mov edi, 00401085
41 00401085: 8D 05 00 00 00 00 lea eax, 00401079
42 0040108B: 8D 3D 00 00 00 00 lea edi, 00401079
43 00401091: 48 8B 05 00 00 00 00 mov rax, 00401098
44 00401098: 48 8B 3D 00 00 00 00 mov rdi, 0040109F
45 0040109F: 48 8D 05 00 00 00 00 lea rax, 004010A6
46 004010A6: 48 8D 3D 00 00 00 00 lea rdi, 004010AD
47 004010AD: 4C 8B 05 00 00 00 00 mov r8, 004010B4
48 004010B4: 4C 8B 3D 00 00 00 00 mov r15, 004010BB
49 004010BB: 4C 8D 05 00 00 00 00 lea r8, 004010C2
50 004010C2: 4C 8D 3D 00 00 00 00 lea r15, 004010C9
51 004010C9: 5D pop ebp
52 004010CA: C3 ret
53
54 Abs32:
55 1004
56 1008
57 105A # Straddles across two instruction.
58 105F # Same, but covers the op code (and not the target) of the second.
59
60 Expected:
61 # 1004
62 # 1009
63 100F
64 1015
65 101B
66 # 1021
67 # 1027
68 # 102D
69 1033
70 1039
71 103F
72 1045
73 # 1057
74 # 105D
75 1063
76 1069
77 106F
78 1075
79 107B
80 1081
81 1087
82 108D
83 1094
84 109B
85 10A2
86 10A9
87 10B0
88 10B7
89 10BE
90 10C5
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698