#115 (dd (1 << 0) results in 0 instead of 1 with HEAD.) – The Yasm Modular Assembler Project

Ticket #115 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

dd (1 << 0) results in 0 instead of 1 with HEAD.

Reported by: bird-yasm@… Owned by: peter@…
Priority: P1 Milestone:
Component: Core Version: other
Severity: major Keywords:
Cc:

Description

The title says it all. I'll try track down when it broke.

one-shift-zero.asm:

    ; This should generate 01000000 in the listing not 00000000
    dd  (1 << 0)

./yasm -f elf -l one-shift-zero.lst -o one-shift-zero.o one-shift-zero.asm

Attachments

Change History

comment:1 Changed 2 years ago by peter@…

  • owner set to peter@…
  • status changed from new to assigned

Most likely [1900]. I'll work on fixing this immediately. Thanks!

comment:2 Changed 2 years ago by bird-yasm@…

I can confirm that it's 1900. Thanks for the swift reply!

comment:3 Changed 2 years ago by bird-yasm@…

The YASM_EXPR_SHL and YASM_EXPR_SHR cases should check for operand->val.l >= 0 instead of operand->val.l > 0.

comment:4 Changed 2 years ago by peter

  • status changed from assigned to closed
  • resolution set to fixed

(In [1979]) Fix #115: 1<<0 resulted in 0 instead of 1 (broken in [1900]).

comment:5 Changed 2 years ago by peter@…

Should have refreshed; I found that myself in the meantime as well. Thanks!

comment:6 Changed 2 years ago by peter

(In [1980]) Merge [1979] from trunk: Fix #115 (1<<0 resulted in 0 instead of 1).

comment:7 Changed 2 years ago by bird-yasm@…

The code (VirtualBox?) builds and runs fine with yasm HEAD.

Thanks again for the swift the response! - knut

Add/Change #115 (dd (1 << 0) results in 0 instead of 1 with HEAD.)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.