forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpu_regs.h
More file actions
38 lines (31 loc) · 712 Bytes
/
cpu_regs.h
File metadata and controls
38 lines (31 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2025 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#pragma once
#ifdef __arm__
#define INTEGER_REGS 10
#ifdef __ARM_FP
#define FLOATING_POINT_REGS 16
#endif
#endif
#ifdef __aarch64__
#define INTEGER_REGS 10
#ifdef __ARM_FP
#define FLOATING_POINT_REGS 8
#endif
#endif
#ifdef __riscv
#define INTEGER_REGS 12
#ifdef __riscv_vector
#define FLOATING_POINT_REGS 12
#endif
#endif
#ifndef INTEGER_REGS
#define INTEGER_REGS 0
#endif
#ifndef FLOATING_POINT_REGS
#define FLOATING_POINT_REGS 0
#endif
#define SAVED_REGISTER_COUNT (INTEGER_REGS + FLOATING_POINT_REGS)