From f24146370e30e4eb247976cf50e7624d52db840f Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 25 Feb 2024 11:35:22 -0500 Subject: Merge x86 tips into architecture topic doc Signed-off-by: Malfurious --- docs/re/test_v_cmp.txt | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 docs/re/test_v_cmp.txt (limited to 'docs/re/test_v_cmp.txt') diff --git a/docs/re/test_v_cmp.txt b/docs/re/test_v_cmp.txt deleted file mode 100644 index c98424f..0000000 --- a/docs/re/test_v_cmp.txt +++ /dev/null @@ -1,17 +0,0 @@ -CMP subtracts operands and sets internal flags. Among these, it sets the -zero flag if the difference is zero (operands are equal). - -TEST sets the zero flag (ZF) when the result of the AND operation is zero. If -the two operands are equal, their bitwise AND is zero only when the operands -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 creates the -following equivalencies: - -test eax, eax -je ----> if (eax == 0) {} - -cmp eax, ebx -je ----> if (eax == ebx) {} -- cgit v1.2.3