https://llvm.org/bugs/show_bug.cgi?id=23660

            Bug ID: 23660
           Summary: .cpreturn unsupported
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: MIPS
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
        Depends on: 20967
            Blocks: 23370
    Classification: Unclassified

The .cpreturn instruction is not supported by IAS and is used in the FreeBSD
build of libc:

sys/mips/include/asm.h:#define  RESTORE_GP64            .cpreturn

lib/libc/mips/sys/cerror.S:
        .globl  _C_LABEL(__error)
NESTED_NOPROFILE(__cerror, CALLFRAME_SIZ, ra)
        .mask   0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ)
        SETUP_GP
        PTR_SUBU        sp, sp, CALLFRAME_SIZ
        SETUP_GP64(CALLFRAME_GP, __cerror)
        SAVE_GP(CALLFRAME_GP)

        PTR_S           ra, CALLFRAME_RA(sp)
        REG_S           v0, CALLFRAME_S0(sp)    # save errno value

        PTR_LA          t9, _C_LABEL(__error)   # locate address of errno
        jalr            t9

        REG_L           t0, CALLFRAME_S0(sp)
        PTR_L           ra, CALLFRAME_RA(sp)
        INT_S           t0, 0(v0)               # update errno value

        RESTORE_GP64
        PTR_ADDU        sp, sp, CALLFRAME_SIZ

        li              v0, -1
        li              v1, -1

        j               ra
END(__cerror)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to