1 | /* |
---|
2 | * This file sets up basic CPU dependency settings based on |
---|
3 | * compiler settings. For example, it can determine if |
---|
4 | * floating point is available. This particular implementation |
---|
5 | * is specified to the NO CPU port. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1999. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
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.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _RTEMS_SCORE_NO_CPU_H |
---|
18 | #define _RTEMS_SCORE_NO_CPU_H |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | /* |
---|
25 | * This file contains the information required to build |
---|
26 | * RTEMS for a particular member of the NO CPU family. |
---|
27 | * It does this by setting variables to indicate which |
---|
28 | * implementation dependent features are present in a particular |
---|
29 | * member of the family. |
---|
30 | * |
---|
31 | * This is a good place to list all the known CPU models |
---|
32 | * that this port supports and which RTEMS CPU model they correspond |
---|
33 | * to. |
---|
34 | */ |
---|
35 | |
---|
36 | #if defined(rtems_multilib) |
---|
37 | /* |
---|
38 | * Figure out all CPU Model Feature Flags based upon compiler |
---|
39 | * predefines. |
---|
40 | */ |
---|
41 | |
---|
42 | #define CPU_MODEL_NAME "rtems_multilib" |
---|
43 | #define NOCPU_HAS_FPU 1 |
---|
44 | |
---|
45 | #elif defined(__m32c__) |
---|
46 | |
---|
47 | #define CPU_MODEL_NAME "m32c" |
---|
48 | #define M32C_HAS_FPU 0 |
---|
49 | |
---|
50 | #else |
---|
51 | |
---|
52 | #error "Unsupported CPU Model" |
---|
53 | |
---|
54 | #endif |
---|
55 | |
---|
56 | /* |
---|
57 | * Define the name of the CPU family. |
---|
58 | */ |
---|
59 | |
---|
60 | #define CPU_NAME "m32c" |
---|
61 | |
---|
62 | #define m32c_get_flg( _flg ) \ |
---|
63 | __asm__ volatile( "stc flg, %0" : "=r" (_flg)) |
---|
64 | |
---|
65 | #define m32c_set_flg( _flg ) \ |
---|
66 | __asm__ volatile( "ldc %1, flg" : "=r" (_flg) : "r" (_flg) ) |
---|
67 | |
---|
68 | #ifdef __cplusplus |
---|
69 | } |
---|
70 | #endif |
---|
71 | |
---|
72 | #endif /* _RTEMS_SCORE_NO_CPU_H */ |
---|