source: rtems/cpukit/score/cpu/nios2/include/rtems/score/cpuimpl.h @ 3a646426

5
Last change on this file since 3a646426 was 3a646426, checked in by Sebastian Huber <sebastian.huber@…>, on 07/19/18 at 10:53:34

score: Add _CPU_Instruction_illegal()

On some architectures/simulators it is difficult to provoke an
exception with misaligned or illegal data loads. Use an illegal
instruction instead.

Update #3433.

  • Property mode set to 100644
File size: 839 bytes
Line 
1/**
2 * @file
3 *
4 * @brief CPU Port Implementation API
5 */
6
7/*
8 * Copyright (c) 2013 embedded brains GmbH
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef _RTEMS_SCORE_CPUIMPL_H
16#define _RTEMS_SCORE_CPUIMPL_H
17
18#include <rtems/score/cpu.h>
19
20#define CPU_PER_CPU_CONTROL_SIZE 0
21
22#ifndef ASM
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28void _CPU_Context_volatile_clobber( uintptr_t pattern );
29
30void _CPU_Context_validate( uintptr_t pattern );
31
32RTEMS_INLINE_ROUTINE void _CPU_Instruction_illegal( void )
33{
34  __asm__ volatile ( ".word 0" );
35}
36
37RTEMS_INLINE_ROUTINE void _CPU_Instruction_no_operation( void )
38{
39  __asm__ volatile ( "nop" );
40}
41
42#ifdef __cplusplus
43}
44#endif
45
46#endif /* ASM */
47
48#endif /* _RTEMS_SCORE_CPUIMPL_H */
Note: See TracBrowser for help on using the repository browser.