svn commit: r1314 - in trunk/yasm/modules: arch/x86 arch/x86/tests objfmts/bin/tests objfmts/coff/tests objfmts/elf/tests objfmts/elf/tests/gas64 objfmts/win64/tests

peter at tortall.net peter at tortall.net
Sun Nov 6 21:12:42 PST 2005


Author: peter
Date: Sun Nov  6 21:12:22 2005
New Revision: 1314

Added:
   trunk/yasm/modules/arch/x86/tests/arithsmall.asm
   trunk/yasm/modules/arch/x86/tests/arithsmall.errwarn
   trunk/yasm/modules/arch/x86/tests/arithsmall.hex
Modified:
   trunk/yasm/modules/arch/x86/tests/Makefile.inc
   trunk/yasm/modules/arch/x86/tests/addbyte.asm
   trunk/yasm/modules/arch/x86/tests/addbyte.errwarn
   trunk/yasm/modules/arch/x86/tests/addbyte.hex
   trunk/yasm/modules/arch/x86/tests/nomem64.asm
   trunk/yasm/modules/arch/x86/tests/nomem64.errwarn
   trunk/yasm/modules/arch/x86/tests/nomem64.hex
   trunk/yasm/modules/arch/x86/x86arch.h
   trunk/yasm/modules/arch/x86/x86bc.c
   trunk/yasm/modules/arch/x86/x86id.re
   trunk/yasm/modules/objfmts/bin/tests/bigorg.asm
   trunk/yasm/modules/objfmts/bin/tests/bigorg.errwarn
   trunk/yasm/modules/objfmts/bin/tests/bigorg.hex
   trunk/yasm/modules/objfmts/coff/tests/x86id.hex
   trunk/yasm/modules/objfmts/elf/tests/elf-x86id.hex
   trunk/yasm/modules/objfmts/elf/tests/elfglobal.hex
   trunk/yasm/modules/objfmts/elf/tests/gas64/elf_gas64_reloc.hex
   trunk/yasm/modules/objfmts/win64/tests/win64-dataref.asm
   trunk/yasm/modules/objfmts/xdf/tests/xdflong.asm
Changeset:
   http://www.tortall.net/projects/yasm/changeset/1314

Log:
Change some optimization settings so that imm8 optimizations actually get
triggered for more cases and optimize from 64-bit down to 32-bit for 64-bit
mov instructions.  This change means that mov reg64, constant will be
auto-sized up to 64 bits, but mov reg64, expr/symbol will default to 32 bits.
You must use mov reg64, qword expr/symbol if you need 64 bits, or in GAS
mode use movabsq expr/symbol, reg64.

This makes the generated code smaller and default most usages into 32-bit
relocations appropriate for ELF64 and Win64.  Right now, 32-bit unsigned
relocs are generated instead of 32-bit signed; this will need to be fixed.

* x86arch.h (x86_insn.postop): Add X86_POSTOP_SIGNEXT_IMM32.
* x86bc.c (x86_bc_insn_resolve): Implement.
* x86id.re (OPAP_SImm32Avail): New flag.
(MOD_Op2AddSp): New modifier to encode spare directly into 2nd opcode byte.
(arith_insn): Use MOD_Op2AddSp and add forced-size override forms.
(mov_insn): Use OPAP_SImm32Avail and add forced-size override form.
(yasm_x86__finalize_insn): Implement new flag and modifier.

Fix up testcases for changes.



More information about the yasm-cvs mailing list