Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_asm_inline_gcc.h
Go to the documentation of this file.
1/* Intel x86 GCC specific test inline assembler functions and macros */
2
3/*
4 * Copyright (c) 2015, Wind River Systems, Inc.
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef _TEST_ASM_INLINE_GCC_H
10#define _TEST_ASM_INLINE_GCC_H
11
12#if !defined(__GNUC__) || !defined(CONFIG_X86)
13#error test_asm_inline_gcc.h goes only with x86 GCC
14#endif
15
16#define _trigger_isr_handler(irq) __asm__ volatile("int %0" : : "i" (irq) : "memory")
17
18#define _get_esp(x) __asm__("movq %%rsp, %0" : "=r" (x))
19
20#endif /* _TEST_ASM_INLINE_GCC_H */