Skip to content

Commit af1be2e

Browse files
committed
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent f5a16b9 commit af1be2e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎arch/arc/kernel/traps.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,11 @@ void do_insterror_or_kprobe(unsigned long address, struct pt_regs *regs)
161161

162162
insterror_is_error(address, regs);
163163
}
164+
165+
/*
166+
* abort() call generated by older gcc for __builtin_trap()
167+
*/
168+
void abort(void)
169+
{
170+
__asm__ __volatile__("trap_s 5\n");
171+
}

0 commit comments

Comments
 (0)