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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
When compiling FreeBSD mipns32 libc:
error: la used to load 64-bit address
This is our usage that's failing:
root@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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs