From ed2dcb8dc05d0cf1175826e8d568c3b81d61e73c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 26 Feb 2009 14:47:17 -0800 Subject: [PATCH] optimization.asm: add EA optimization tests Add tests for EA optimizations --- test/optimization.asm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/optimization.asm b/test/optimization.asm index 2390586..fcc209e 100644 --- a/test/optimization.asm +++ b/test/optimization.asm @@ -46,5 +46,29 @@ times 127 - 3 nop calog2: +; Simple +lea eax, [eax+dolug2-dolug1] +dolug1: +times 127 nop +dolug2: + +; Must start short +ealog1: +lea eax, [eax+ealog2-ealog1] +times 127 - 3 nop +ealog2: + +; Must stay long! +lea eax, [eax+folug2-folug1] +folug1: +times 128 nop +folug2: + +; Must stay long! +galog1: +lea eax, [eax+galog2-galog1] +times 128 - 3 nop +galog2: + ; Do not confuse forward references and segmentless addresses! jmp 12345 -- 2.7.4