diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-05-21 03:16:33 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-05-21 03:16:33 +0000 |
commit | 01377d8d7c90659a2db51f0475a2ee73627a6844 (patch) | |
tree | 748356edaf820933616551af79fdff4b76731864 /test/expimp.asm | |
parent | aa8b6a1ff7e3be77b64f23efb2a914d0e8cafa1a (diff) | |
download | nasm-01377d8d7c90659a2db51f0475a2ee73627a6844.tar.gz nasm-01377d8d7c90659a2db51f0475a2ee73627a6844.tar.bz2 nasm-01377d8d7c90659a2db51f0475a2ee73627a6844.zip |
Implement new "strict" keyword to inhibit optimization.
Diffstat (limited to 'test/expimp.asm')
-rw-r--r-- | test/expimp.asm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/expimp.asm b/test/expimp.asm new file mode 100644 index 0000000..90d9aed --- /dev/null +++ b/test/expimp.asm @@ -0,0 +1,61 @@ +; +; Test of explicitly and implicitly sized operands +; +start: + add esi,2 ; Implicit + add esi,123456h ; Implicit + add esi,byte 2 ; Explicit + add esi,dword 2 ; Explicit + add esi,dword 123456h ; Explicit + add esi,byte 123456h ; Explicit Truncation + + add esi,strict 2 ; Implicit Strict + add esi,strict 123456h ; Implicit Strict + add esi,strict byte 2 ; Explicit Strict + add esi,strict dword 2 ; Explicit Strict + add esi,strict dword 123456h ; Explicit Strict + add esi,strict byte 123456h ; Explicit Strict Truncation +; +; Same thing with branches +; + jmp short start ; Explicit + jmp near start ; Explicit + jmp word start ; Explicit + jmp dword start ; Explicit + jmp short forward ; Explicit + jmp near forward ; Explicit + jmp word forward ; Explicit + jmp dword forward ; Explicit +%ifdef ERROR + jmp short faraway ; Explicit (ERROR) +%endif + jmp near faraway ; Explicit + jmp word faraway ; Explicit + jmp dword faraway ; Explicit + jmp start ; Implicit + jmp forward ; Implicit + jmp faraway ; Implicit + + jmp strict short start ; Explicit Strict + jmp strict near start ; Explicit Strict + jmp strict word start ; Explicit Strict + jmp strict dword start ; Explicit Strict + jmp strict short forward ; Explicit Strict + jmp strict near forward ; Explicit Strict + jmp strict word forward ; Explicit Strict + jmp strict dword forward ; Explicit Strict +%ifdef ERROR + jmp strict short faraway ; Explicit (ERROR) +%endif + jmp strict near faraway ; Explicit Strict + jmp strict word faraway ; Explicit Strict + jmp strict dword faraway ; Explicit Strict + jmp strict start ; Implicit Strict + jmp strict forward ; Implicit Strict + jmp strict faraway ; Implicit Strict +forward: + + times 256 nop +faraway: + + |