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

xuli1 at eswincomputing dot com <xuli1 at eswincomputing dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|14.0                        |15.0

--- Comment #1 from xuli1 at eswincomputing dot com <xuli1 at eswincomputing 
dot com> ---

riscv32-unknown-elf-gcc -march=rv32gc  -mabi=ilp32d -O2 memcpy.c -S -o memcpy.s

A portion of the assembly code for `memcpy` is as follows(Note the first
`lw/sw` instruction):

.L7:
        lw      a2,32(s1)
        lw      t5,0(s1)
        lw      t4,4(s1)
        lw      t3,8(s1)
        lw      t1,12(s1)
        lw      a7,16(s1)
        lw      a6,20(s1)
        lw      a0,24(s1)
        lw      a1,28(s1)
        addi    a5,a5,36
        sw      a2,-4(a5)
        sw      t5,-36(a5)
        sub     a2,a4,a5
        sw      t4,-32(a5)
        sw      t3,-28(a5)
        sw      t1,-24(a5)
        sw      a7,-20(a5)
        sw      a6,-16(a5)
        sw      a0,-12(a5)
        sw      a1,-8(a5)
        addi    s1,s1,36
        bgt     a2,a3,.L7

Reply via email to