From cc82a850a0ebfbacb7fb62ea2c5b7dd6aebb005d Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Wed, 23 Dec 2015 08:38:41 -0800 Subject: Replace bltzal with lapc for MIPS R6 builds. The R6 version of MIPS does not support the bltzal instruction. This patch changes dl-startup.h and dl-sysdep.h to use lapc on R6 instead. lapc is a new R6 insruction so older systems need to continue to use bltzal in order to load register $31. Signed-off-by: Steve Ellcey --- ldso/ldso/mips/dl-sysdep.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ldso/ldso/mips/dl-sysdep.h') diff --git a/ldso/ldso/mips/dl-sysdep.h b/ldso/ldso/mips/dl-sysdep.h index 6041245d0..b2caa7fa0 100644 --- a/ldso/ldso/mips/dl-sysdep.h +++ b/ldso/ldso/mips/dl-sysdep.h @@ -225,10 +225,15 @@ elf_machine_load_address (void) { ElfW(Addr) addr; __asm__ (" .set noreorder\n" +# if !defined __mips_isa_rev || __mips_isa_rev < 6 " " STRINGXP (PTR_LA) " %0, 0f\n" " bltzal $0, 0f\n" " nop\n" "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" +#else + "0: lapc $31, 0\n" + " " STRINGXP (PTR_SUBU) " %0, $31, %0\n" +#endif " .set reorder\n" : "=r" (addr) : /* No inputs */ -- cgit v1.2.3