From cf02c20bb02f5d2fbfee5557baf68c0e2ca5a042 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 4 Dec 2018 00:29:06 -0800 Subject: 4832 Let's start adding ':end' labels in all functions, just because it helps us visualize where function calls end in traces, thanks to the '--map' commandline argument. --- html/subx/052kernel_string_equal.subx.html | 325 ++++++++++++++--------------- 1 file changed, 162 insertions(+), 163 deletions(-) (limited to 'html/subx/052kernel_string_equal.subx.html') diff --git a/html/subx/052kernel_string_equal.subx.html b/html/subx/052kernel_string_equal.subx.html index 6543192f..b6b1c974 100644 --- a/html/subx/052kernel_string_equal.subx.html +++ b/html/subx/052kernel_string_equal.subx.html @@ -161,169 +161,168 @@ if ('onhashchange' in window) { 96 # return false 97 $kernel-string-equal:false: 98 b8/copy-to-EAX 0/imm32 - 99 -100 $kernel-string-equal:end: -101 # . restore registers -102 5f/pop-to-EDI -103 5e/pop-to-ESI -104 5b/pop-to-EBX -105 5a/pop-to-EDX -106 59/pop-to-ECX -107 # . epilog -108 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . . # copy EBP to ESP -109 5d/pop-to-EBP -110 c3/return -111 -112 # - tests -113 -114 test-compare-null-kernel-string-with-empty-array: -115 # EAX = kernel-string-equal(Null-kernel-string, "") -116 # . . push args -117 68/push ""/imm32 -118 68/push Null-kernel-string/imm32 -119 # . . call -120 e8/call kernel-string-equal/disp32 -121 # . . discard args -122 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -123 # check-ints-equal(EAX, 1, msg) -124 # . . push args -125 68/push "F - test-compare-null-kernel-string-with-empty-array"/imm32 -126 68/push 1/imm32/true -127 50/push-EAX -128 # . . call -129 e8/call check-ints-equal/disp32 -130 # . . discard args -131 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -132 c3/return -133 -134 test-compare-null-kernel-string-with-non-empty-array: -135 # EAX = kernel-string-equal(Null-kernel-string, "Abc") -136 # . . push args -137 68/push "Abc"/imm32 -138 68/push Null-kernel-string/imm32 -139 # . . call -140 e8/call kernel-string-equal/disp32 -141 # . . discard args -142 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -143 # check-ints-equal(EAX, 0, msg) -144 # . . push args -145 68/push "F - test-compare-null-kernel-string-with-non-empty-array"/imm32 -146 68/push 0/imm32/false -147 50/push-EAX -148 # . . call -149 e8/call check-ints-equal/disp32 -150 # . . discard args -151 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -152 c3/return -153 -154 test-compare-kernel-string-with-equal-array: -155 # EAX = kernel-string-equal(Abc-kernel-string, "Abc") -156 # . . push args -157 68/push "Abc"/imm32 -158 68/push Abc-kernel-string/imm32 -159 # . . call -160 e8/call kernel-string-equal/disp32 -161 # . . discard args -162 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -163 # check-ints-equal(EAX, 1, msg) -164 # . . push args -165 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 -166 68/push 1/imm32/true -167 50/push-EAX -168 # . . call -169 e8/call check-ints-equal/disp32 -170 # . . discard args -171 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -172 c3/return -173 -174 test-compare-kernel-string-with-inequal-array: -175 # EAX = kernel-string-equal(Abc-kernel-string, "Adc") -176 # . . push args -177 68/push "Adc"/imm32 -178 68/push Abc-kernel-string/imm32 -179 # . . call -180 e8/call kernel-string-equal/disp32 -181 # . . discard args -182 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -183 # check-ints-equal(EAX, 0, msg) -184 # . . push args -185 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 -186 68/push 0/imm32/false -187 50/push-EAX -188 # . . call -189 e8/call check-ints-equal/disp32 -190 # . . discard args -191 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -192 c3/return -193 -194 test-compare-kernel-string-with-empty-array: -195 # EAX = kernel-string-equal(Abc-kernel-string, "") -196 # . . push args -197 68/push ""/imm32 -198 68/push Abc-kernel-string/imm32 -199 # . . call -200 e8/call kernel-string-equal/disp32 -201 # . . discard args -202 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -203 # check-ints-equal(EAX, 0, msg) -204 # . . push args -205 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 -206 68/push 0/imm32/false -207 50/push-EAX -208 # . . call -209 e8/call check-ints-equal/disp32 -210 # . . discard args -211 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -212 c3/return -213 -214 test-compare-kernel-string-with-shorter-array: -215 # EAX = kernel-string-equal(Abc-kernel-string, "Ab") -216 # . . push args -217 68/push "Ab"/imm32 -218 68/push Abc-kernel-string/imm32 -219 # . . call -220 e8/call kernel-string-equal/disp32 -221 # . . discard args -222 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -223 # check-ints-equal(EAX, 0, msg) -224 # . . push args -225 68/push "F - test-compare-kernel-string-with-shorter-array"/imm32 -226 68/push 0/imm32/false -227 50/push-EAX -228 # . . call -229 e8/call check-ints-equal/disp32 -230 # . . discard args -231 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -232 c3/return -233 -234 test-compare-kernel-string-with-longer-array: -235 # EAX = kernel-string-equal(Abc-kernel-string, "Abcd") -236 # . . push args -237 68/push "Abcd"/imm32 -238 68/push Abc-kernel-string/imm32 -239 # . . call -240 e8/call kernel-string-equal/disp32 -241 # . . discard args -242 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP -243 # check-ints-equal(EAX, 0, msg) -244 # . . push args -245 68/push "F - test-compare-kernel-string-with-longer-array"/imm32 -246 68/push 0/imm32/false -247 50/push-EAX -248 # . . call -249 e8/call check-ints-equal/disp32 -250 # . . discard args -251 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP -252 c3/return -253 -254 == data -255 -256 Null-kernel-string: -257 00/null -258 Abc-kernel-string: -259 41/A 62/b 63/c 00/null -260 -261 # . . vim:nowrap:textwidth=0 + 99 $kernel-string-equal:end: +100 # . restore registers +101 5f/pop-to-EDI +102 5e/pop-to-ESI +103 5b/pop-to-EBX +104 5a/pop-to-EDX +105 59/pop-to-ECX +106 # . epilog +107 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . . # copy EBP to ESP +108 5d/pop-to-EBP +109 c3/return +110 +111 # - tests +112 +113 test-compare-null-kernel-string-with-empty-array: +114 # EAX = kernel-string-equal(Null-kernel-string, "") +115 # . . push args +116 68/push ""/imm32 +117 68/push Null-kernel-string/imm32 +118 # . . call +119 e8/call kernel-string-equal/disp32 +120 # . . discard args +121 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +122 # check-ints-equal(EAX, 1, msg) +123 # . . push args +124 68/push "F - test-compare-null-kernel-string-with-empty-array"/imm32 +125 68/push 1/imm32/true +126 50/push-EAX +127 # . . call +128 e8/call check-ints-equal/disp32 +129 # . . discard args +130 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +131 c3/return +132 +133 test-compare-null-kernel-string-with-non-empty-array: +134 # EAX = kernel-string-equal(Null-kernel-string, "Abc") +135 # . . push args +136 68/push "Abc"/imm32 +137 68/push Null-kernel-string/imm32 +138 # . . call +139 e8/call kernel-string-equal/disp32 +140 # . . discard args +141 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +142 # check-ints-equal(EAX, 0, msg) +143 # . . push args +144 68/push "F - test-compare-null-kernel-string-with-non-empty-array"/imm32 +145 68/push 0/imm32/false +146 50/push-EAX +147 # . . call +148 e8/call check-ints-equal/disp32 +149 # . . discard args +150 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +151 c3/return +152 +153 test-compare-kernel-string-with-equal-array: +154 # EAX = kernel-string-equal(Abc-kernel-string, "Abc") +155 # . . push args +156 68/push "Abc"/imm32 +157 68/push Abc-kernel-string/imm32 +158 # . . call +159 e8/call kernel-string-equal/disp32 +160 # . . discard args +161 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +162 # check-ints-equal(EAX, 1, msg) +163 # . . push args +164 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 +165 68/push 1/imm32/true +166 50/push-EAX +167 # . . call +168 e8/call check-ints-equal/disp32 +169 # . . discard args +170 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +171 c3/return +172 +173 test-compare-kernel-string-with-inequal-array: +174 # EAX = kernel-string-equal(Abc-kernel-string, "Adc") +175 # . . push args +176 68/push "Adc"/imm32 +177 68/push Abc-kernel-string/imm32 +178 # . . call +179 e8/call kernel-string-equal/disp32 +180 # . . discard args +181 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +182 # check-ints-equal(EAX, 0, msg) +183 # . . push args +184 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 +185 68/push 0/imm32/false +186 50/push-EAX +187 # . . call +188 e8/call check-ints-equal/disp32 +189 # . . discard args +190 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +191 c3/return +192 +193 test-compare-kernel-string-with-empty-array: +194 # EAX = kernel-string-equal(Abc-kernel-string, "") +195 # . . push args +196 68/push ""/imm32 +197 68/push Abc-kernel-string/imm32 +198 # . . call +199 e8/call kernel-string-equal/disp32 +200 # . . discard args +201 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +202 # check-ints-equal(EAX, 0, msg) +203 # . . push args +204 68/push "F - test-compare-kernel-string-with-equal-array"/imm32 +205 68/push 0/imm32/false +206 50/push-EAX +207 # . . call +208 e8/call check-ints-equal/disp32 +209 # . . discard args +210 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +211 c3/return +212 +213 test-compare-kernel-string-with-shorter-array: +214 # EAX = kernel-string-equal(Abc-kernel-string, "Ab") +215 # . . push args +216 68/push "Ab"/imm32 +217 68/push Abc-kernel-string/imm32 +218 # . . call +219 e8/call kernel-string-equal/disp32 +220 # . . discard args +221 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +222 # check-ints-equal(EAX, 0, msg) +223 # . . push args +224 68/push "F - test-compare-kernel-string-with-shorter-array"/imm32 +225 68/push 0/imm32/false +226 50/push-EAX +227 # . . call +228 e8/call check-ints-equal/disp32 +229 # . . discard args +230 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +231 c3/return +232 +233 test-compare-kernel-string-with-longer-array: +234 # EAX = kernel-string-equal(Abc-kernel-string, "Abcd") +235 # . . push args +236 68/push "Abcd"/imm32 +237 68/push Abc-kernel-string/imm32 +238 # . . call +239 e8/call kernel-string-equal/disp32 +240 # . . discard args +241 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +242 # check-ints-equal(EAX, 0, msg) +243 # . . push args +244 68/push "F - test-compare-kernel-string-with-longer-array"/imm32 +245 68/push 0/imm32/false +246 50/push-EAX +247 # . . call +248 e8/call check-ints-equal/disp32 +249 # . . discard args +250 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +251 c3/return +252 +253 == data +254 +255 Null-kernel-string: +256 00/null +257 Abc-kernel-string: +258 41/A 62/b 63/c 00/null +259 +260 # . . vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0