mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
zig.h: Add zig_trap() and zig_breakpoint() implementations for Hexagon.
This commit is contained in:
parent
62074ec61b
commit
aa19e71a27
@ -256,6 +256,8 @@ typedef char bool;
|
||||
#define zig_trap() __asm__ volatile("udf #0xfe")
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
#define zig_trap() __asm__ volatile("udf #0xfdee")
|
||||
#elif defined(__hexagon__)
|
||||
#define zig_trap() __asm__ volatile("r27:26 = memd(#0xbadc0fee)")
|
||||
#elif defined(__loongarch__) || defined(__powerpc__)
|
||||
#define zig_trap() __asm__ volatile(".word 0x0")
|
||||
#elif defined(__mips__)
|
||||
@ -280,6 +282,8 @@ typedef char bool;
|
||||
#define zig_breakpoint() __asm__ volatile("bkpt #0x0")
|
||||
#elif defined(__aarch64__)
|
||||
#define zig_breakpoint() __asm__ volatile("brk #0xf000")
|
||||
#elif defined(__hexagon__)
|
||||
#define zig_breakpoint() __asm__ volatile("brkpt")
|
||||
#elif defined(__loongarch__)
|
||||
#define zig_breakpoint() __asm__ volatile("break 0x0")
|
||||
#elif defined(__mips__)
|
||||
|
Loading…
Reference in New Issue
Block a user