1// Copyright 2017 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// zx_status_t bad_syscall(uint64_t num)
6.global bad_syscall
7.type bad_syscall, STT_FUNC
8bad_syscall:
9
10#if defined(__aarch64__)
11    mov x16, x0
12    svc #0
13    ret
14#elif defined(__x86_64__)
15    mov %rdi, %rax
16    syscall
17    ret
18#else
19#error "Unsupported arch"
20#endif
21