[llvm-bugs] [Bug 43351] New: [MIPS][FreeBSD] n32: error: la used to load 64-bit address

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 18 06:24:54 PDT 2019


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

            Bug ID: 43351
           Summary: [MIPS][FreeBSD] n32: error: la used to load 64-bit
                    address
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kevans at FreeBSD.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

When compiling FreeBSD mipns32 libc:

error: la used to load 64-bit address

This is our usage that's failing:

root at viper:/usr/src/lib/libc/mips/gen# grep -in 'ptr_la' _ctx_start.S
51:     PTR_LA  t9, _ctx_done

So loading the address of _ctx_done into t9. We compile this something along
the lines of:

$ cc -target mips64-unknown-freebsd13.0 -EB -mabi=n32 -msoft-float

The above error comes from the MipsAsmParser, gated by a conditional:
Is32BitAddress && ABI.ArePtrs64bit()

Further diagnosis reveals that cc is accepting -mabi=n32 and usually doing the
right thing, but when _ctx_start.S is compiled -mabi=n32 is seemingly lost and
the above thinks we're compiling for n64, as the target triple would otherwise
indicate. std::cout in MipsABIInfo::computeTargetABI and in the clang mips
driver's mips::getMipsCPUAndABI confirms that in the former,
Options.getABIName() is an empty string and in the latter, ABIName=n32 by the
time the function returns.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190918/e948518b/attachment.html>


More information about the llvm-bugs mailing list