]> granicus.if.org Git - yasm/commit
Make jmp with seg:off equ behave the same as NASM.
authorPeter Johnson <peter@tortall.net>
Sat, 19 Jan 2008 08:59:19 +0000 (08:59 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 19 Jan 2008 08:59:19 +0000 (08:59 -0000)
commitd1b8736d7a03b229a9ecd8523a5b6994cca83e77
tree4a83d59cc5260e949d3b9eed25f841d995fcf1a4
parente1f577f6d264843e367d4fefda6e06cfe07b8867
Make jmp with seg:off equ behave the same as NASM.
Formerly:
  foo equ 1:2
  jmp foo
would result in a far jump.  Now, an explicit "far" is required:
  jmp far foo
to generate a far jump.

In addition, the direct use of seg:off in immediates and effective
addresses will result in an error; the use of EQU'ed seg:off values
is still legal (and will still result in just the offset).  This
behavior is more sane and also matches NASM behavior.
Thus:
  foo equ 1:2
  mov ax, foo   ; okay, just 2
  mov ax, [foo] ; okay, just 2
  mov ax, 1:2   ; illegal
  mov ax, [1:2] ; illegal

svn path=/trunk/yasm/; revision=2028
14 files changed:
libyasm/insn.c
libyasm/insn.h
modules/arch/x86/tests/Makefile.inc
modules/arch/x86/tests/farbasic.asm
modules/arch/x86/tests/jmpfar.asm [new file with mode: 0644]
modules/arch/x86/tests/jmpfar.hex [new file with mode: 0644]
modules/arch/x86/tests/segoff-err.asm [new file with mode: 0644]
modules/arch/x86/tests/segoff-err.errwarn [new file with mode: 0644]
modules/arch/x86/tests/segoff.asm
modules/arch/x86/tests/segoff.hex
modules/arch/x86/x86id.c
modules/objfmts/bin/tests/bin-farabs.asm
modules/objfmts/bin/tests/bin-farabs.hex
modules/parsers/nasm/nasm-parse.c