about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-11 21:38:25 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-11 21:38:25 -0700
commit554bd0996872ffcadf808229cc38e445d6016dae (patch)
tree34ac4352ef3f8e7e5752d6b9237d711dff571bd3
parentbe995e2193ba054488e9752373c07fc250b06026 (diff)
downloadmu-554bd0996872ffcadf808229cc38e445d6016dae.tar.gz
label offset computation still has a bug
I changed the test a little to make it obvious.
Basically there's no way we can compute the segment offset correctly
without knowing the segment name in the previous assertion.
-rw-r--r--subx/apps/survey.subx13
1 files changed, 7 insertions, 6 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index abdd6939..0cedd7bc 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -671,6 +671,7 @@ test-compute-offsets:
     #   == code 0x1
     #   ab x/imm32
     #   == data 0x1000
+    #   00
     #   x:
     #     34
     #
@@ -679,8 +680,8 @@ test-compute-offsets:
     #   segment 'code' has size 0x5
     #   segment 'data' is at file offset 0x5
     #   label 'x' is in segment 'data'
-    #   label 'x' is at segment offset 0x0
-    #   segment 'data' has size 0x1
+    #   label 'x' is at segment offset 0x1
+    #   segment 'data' has size 0x2
     #
     # . prolog
     55/push-EBP
@@ -805,10 +806,10 @@ test-compute-offsets:
     e8/call  check-trace-contains/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . check-trace-contains("segment 'data' has size 0x00000001.", msg)
+    # . check-trace-contains("segment 'data' has size 0x00000002.", msg)
     # . . push args
     68/push  "F - test-compute-offsets/3"/imm32
-    68/push  "segment 'data' has size 0x00000001."/imm32
+    68/push  "segment 'data' has size 0x00000002."/imm32
     # . . call
     e8/call  check-trace-contains/disp32
     # . . discard args
@@ -821,10 +822,10 @@ test-compute-offsets:
     e8/call  check-trace-contains/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . check-trace-contains("label 'x' is at segment offset 0x00000000.", msg)
+    # . check-trace-contains("label 'x' is at segment offset 0x00000001.", msg)
     # . . push args
     68/push  "F - test-compute-offsets/5"/imm32
-    68/push  "label 'x' is at segment offset 0x00000000."/imm32
+    68/push  "label 'x' is at segment offset 0x00000001."/imm32
     # . . call
     e8/call  check-trace-contains/disp32
     # . . discard args
2 17:10:33 -0700 1357 - temporarily revert floating-point support' href='/akkartik/mu/commit/039wait.cc?h=hlt&id=827898fc1b41e1974bf4ec2eebbd97fe23ff3d08'>827898fc ^
c76b49e7 ^
3a622511 ^
c76b49e7 ^





795f5244 ^
166e3c0d ^



c76b49e7 ^

c6034af3 ^

c76b49e7 ^

795f5244 ^

c76b49e7 ^





ac0e9db5 ^
05d17773 ^
9d670bb5 ^
795f5244 ^
dd2e01e4 ^
05d17773 ^
3a622511 ^
c76b49e7 ^

363685b8 ^
1ea1bd9c ^
363685b8 ^

1ead3562 ^
bc643692 ^
83d8299d ^
5497090a ^
363685b8 ^
5497090a ^
363685b8 ^
1ead3562 ^
bc643692 ^
363685b8 ^
6e698858 ^




363685b8 ^




ac0e9db5 ^
363685b8 ^





795f5244 ^
166e3c0d ^
363685b8 ^
166e3c0d ^
1b76245c ^
e4630643 ^

5f98a10c ^
1b76245c ^
e4630643 ^

166e3c0d ^



e4630643 ^
1b76245c ^
e4630643 ^

363685b8 ^
6e698858 ^
cdd6fd09 ^
363685b8 ^



9d670bb5 ^


ac0e9db5 ^
05d17773 ^

ac0e9db5 ^
e4630643 ^
ac0e9db5 ^
6e698858 ^
dd2e01e4 ^
05d17773 ^

363685b8 ^


134dad7c ^



795f5244 ^
166e3c0d ^



134dad7c ^

ac0e9db5 ^
134dad7c ^

134dad7c ^






ac0e9db5 ^

134dad7c ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167