Commit af1be2e2 authored by Vineet Gupta's avatar Vineet Gupta
Browse files

ARC: handle gcc generated __builtin_trap for older compiler



ARC gcc prior to GNU 2018.03 release didn't have a target specific
__builtin_trap() implementation, generating default abort() call.

Implement the abort() call - emulating what newer gcc does for the same,
as suggested by Arnd.

Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent f5a16b93
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -161,3 +161,11 @@ void do_insterror_or_kprobe(unsigned long address, struct pt_regs *regs)


	insterror_is_error(address, regs);
	insterror_is_error(address, regs);
}
}

/*
 * abort() call generated by older gcc for __builtin_trap()
 */
void abort(void)
{
	__asm__ __volatile__("trap_s  5\n");
}