https://sourceware.org/bugzilla/show_bug.cgi?id=32811

            Bug ID: 32811
           Summary: nooptimize doesn't apply to immediates
           Product: binutils
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: andi-bz at firstfloor dot org
  Target Milestone: ---

The documentation says

   * '{nooptimize}' - disable instruction size optimization.


I would have expected it to apply for immediates too, but it doesn't seem to
have an effect:


        {disp32} addq $0,%rbx
        {nooptimize} addq $0,%rbx
        addq $0xffff,%rbx

   0:   48 83 c3 00             add    $0x0,%rbx
   4:   48 83 c3 00             add    $0x0,%rbx
   8:   48 81 c3 ff ff 00 00    add    $0xffff,%rbx

I would have expected all three instructions to have the size size.

This would be useful to be able to generate constant sized code with .rept when
the immediate depends on the loop iteration.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to