From: nasm-bot f. C. G. <gor...@gm...> - 2018-11-12 07:01:24
|
Commit-ID: 2776c76763ff98c7f9d88e7b394b82ec0bc9f37f Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=2776c76763ff98c7f9d88e7b394b82ec0bc9f37f Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Mon, 5 Nov 2018 12:13:21 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 11 Nov 2018 21:43:46 +0300 test: nasm-t -- Add optimization Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- travis/test/optimization-o0.bin.t | Bin 0 -> 1764 bytes travis/test/optimization-o1.bin.t | Bin 0 -> 1741 bytes travis/test/optimization-ox.bin.t | Bin 0 -> 1732 bytes {test => travis/test}/optimization.asm | 10 +++------- travis/test/optimization.json | 30 ++++++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/travis/test/optimization-o0.bin.t b/travis/test/optimization-o0.bin.t new file mode 100644 index 0000000..4fd5ba5 Binary files /dev/null and b/travis/test/optimization-o0.bin.t differ diff --git a/travis/test/optimization-o1.bin.t b/travis/test/optimization-o1.bin.t new file mode 100644 index 0000000..a630ec2 Binary files /dev/null and b/travis/test/optimization-o1.bin.t differ diff --git a/travis/test/optimization-ox.bin.t b/travis/test/optimization-ox.bin.t new file mode 100644 index 0000000..d21baf8 Binary files /dev/null and b/travis/test/optimization-ox.bin.t differ diff --git a/test/optimization.asm b/travis/test/optimization.asm similarity index 84% copy from test/optimization.asm copy to travis/test/optimization.asm index d78209d..0c1451b 100644 --- a/test/optimization.asm +++ b/travis/test/optimization.asm @@ -1,7 +1,3 @@ -;Testname=O0; Arguments=-O0 -fbin -ooptimization.bin; Files=stdout stderr optimization.bin -;Testname=O1; Arguments=-O1 -fbin -ooptimization.bin; Files=stdout stderr optimization.bin -;Testname=Ox; Arguments=-Ox -fbin -ooptimization.bin; Files=stdout stderr optimization.bin - BITS 32 ; Simple @@ -73,7 +69,7 @@ galog2: ; Sbyte tests... onetwentysix equ 126 onetwentynine equ 129 - + add eax,onetwentyseven ; sbyte (forward) add eax,onetwentyeight ; not sbyte (forward) add eax,onetwentyseven ; sbyte (forward) @@ -84,7 +80,7 @@ add ecx,onetwentyeight ; not sbyte (forward) add ecx,onetwentyseven ; sbyte (forward) add ecx,onetwentysix ; sbyte (backward) add ecx,onetwentynine ; not sbyte (backward) - + onetwentyseven equ 127 onetwentyeight equ 128 @@ -99,6 +95,6 @@ ialog1: add eax, ialog2-ialog1 times 127 - 3 nop ialog2: - + ; Do not confuse forward references and segmentless addresses! jmp 12345 diff --git a/travis/test/optimization.json b/travis/test/optimization.json new file mode 100644 index 0000000..85bb9a8 --- /dev/null +++ b/travis/test/optimization.json @@ -0,0 +1,30 @@ +[ + { + "description": "Test optimization options (-Ox)", + "id": "optimization", + "format": "bin", + "source": "optimization.asm", + "option": "-Ox", + "target": [ + { "output": "optimization-ox.bin" } + ] + }, + { + "description": "Test optimization options (-O0)", + "ref": "optimization", + "source": "optimization.asm", + "option": "-O0", + "target": [ + { "output": "optimization-o0.bin" } + ] + }, + { + "description": "Test optimization options (-O1)", + "ref": "optimization", + "source": "optimization.asm", + "option": "-O1", + "target": [ + { "output": "optimization-o1.bin" } + ] + } +] |