This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/64659] New: [SH] Immedate values not used for atomic ops


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64659

            Bug ID: 64659
           Summary: [SH] Immedate values not used for atomic ops
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org
            Target: sh*-*-*

Compiling the following example:

void test4 (volatile int* mem)
{
  __atomic_or_fetch (mem, 1, __ATOMIC_ACQ_REL);
}

with -O2 -m4a -m{l|b} -matomic-model=soft-gusa results in:

        mov    #1,r1

0:      movli.l    @r4,r0  ! 7  atomic_or_fetchsi_hard  [length = 8]
        or    r1,r0
        movco.l    r0,@r4
        bf    0b
        rts
        nop

For some reason, the predicates 'atomic_arith_operand' and
'atomic_logical_operand' don't allow immediate values, although they are
supposed to do so.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]