#10 nasm -O ignores explicit operand size

closed-fixed
nobody
None
8
2002-05-21
2002-05-20
No

nasm -O will optimize operands, even if given with
explicit size overrides. This is broken; if the
programmer has specified a certain size, that should be
considered inviolate.

It appears NASM does this correctly for jumps, but
incorrectly for data operands.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Following is the source to a small DOS .COM file to
    explicitly test these cases.

    org 0x100
    mov bx,0x4C00
    add bx,word 0 ;optimized by 0.98.31 (-On, tested 2-4)
    mov ax,bx
    jmp near endlabel
    endlabel: ;not optimized by 0.98.31 (-On, 2-4)
    int 0x21

     
  • H. Peter Anvin

    H. Peter Anvin - 2002-05-21
    • status: open --> closed-fixed
     
  • H. Peter Anvin

    H. Peter Anvin - 2002-05-21

    Logged In: YES
    user_id=58697

    The syntax used in NASM is ambiguous in too many cases. We
    have settled on using a new keyword "strict" to disable
    optimization, and the appropriate change has been checked
    into CVS.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks