diff options
author | Malfurious <m@lfurio.us> | 2021-07-30 00:58:53 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-08-01 18:41:37 -0400 |
commit | 1953417c3ec3419b6d14b3ef0ead1759a33c756b (patch) | |
tree | ae3e7387cfa265a6706640826c88036a594caa2c /docs/re | |
parent | 17592e720a70a5ce6ce3ab3c02ba7ec07558840b (diff) | |
download | lib-des-gnux-1953417c3ec3419b6d14b3ef0ead1759a33c756b.tar.gz lib-des-gnux-1953417c3ec3419b6d14b3ef0ead1759a33c756b.zip |
Elaborate on test v cmp
cmp instruction did not have an example.
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'docs/re')
-rw-r--r-- | docs/re/test_v_cmp.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/re/test_v_cmp.txt b/docs/re/test_v_cmp.txt index 5a0c5af..c98424f 100644 --- a/docs/re/test_v_cmp.txt +++ b/docs/re/test_v_cmp.txt @@ -7,8 +7,11 @@ themselves are zero. TEST also sets the sign flag (SF) when the most significant bit is set in the result, and the parity flag (PF) when the number of set bits is even. -JE (alias of JZ) tests the zero flag and jumps if it is set. This makes: +JE (alias of JZ) tests the zero flag and jumps if it is set. This creates the +following equivalencies: + test eax, eax -je 0x1234 -equivalent to the C statement: -if (eax == 0) +je <somewhere> ----> if (eax == 0) {} + +cmp eax, ebx +je <somewhere> ----> if (eax == ebx) {} |