v2.0.0
sf_table.h
1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_BOOTROM_SF_TABLE_H
8#define _PICO_BOOTROM_SF_TABLE_H
9
10// NOTE THESE FUNCTION IMPLEMENTATIONS MATCH THE BEHAVIOR DESCRIBED IN THE BOOTROM SECTION OF THE RP2040 DATASHEET
11
12#define SF_TABLE_FADD 0x00
13#define SF_TABLE_FSUB 0x04
14#define SF_TABLE_FMUL 0x08
15#define SF_TABLE_FDIV 0x0c
16#define SF_TABLE_FCMP_FAST 0x10
17#define SF_TABLE_FCMP_FAST_FLAGS 0x14
18#define SF_TABLE_FSQRT 0x18
19#define SF_TABLE_FLOAT2INT 0x1c
20#define SF_TABLE_FLOAT2FIX 0x20
21#define SF_TABLE_FLOAT2UINT 0x24
22#define SF_TABLE_FLOAT2UFIX 0x28
23#define SF_TABLE_INT2FLOAT 0x2c
24#define SF_TABLE_FIX2FLOAT 0x30
25#define SF_TABLE_UINT2FLOAT 0x34
26#define SF_TABLE_UFIX2FLOAT 0x38
27#define SF_TABLE_FCOS 0x3c
28#define SF_TABLE_FSIN 0x40
29#define SF_TABLE_FTAN 0x44
30#define SF_TABLE_V3_FSINCOS 0x48
31#define SF_TABLE_FEXP 0x4c
32#define SF_TABLE_FLN 0x50
33
34#define SF_TABLE_V1_SIZE 0x54
35
36#define SF_TABLE_FCMP_BASIC 0x54
37#define SF_TABLE_FATAN2 0x58
38#define SF_TABLE_INT642FLOAT 0x5c
39#define SF_TABLE_FIX642FLOAT 0x60
40#define SF_TABLE_UINT642FLOAT 0x64
41#define SF_TABLE_UFIX642FLOAT 0x68
42#define SF_TABLE_FLOAT2INT64 0x6c
43#define SF_TABLE_FLOAT2FIX64 0x70
44#define SF_TABLE_FLOAT2UINT64 0x74
45#define SF_TABLE_FLOAT2UFIX64 0x78
46#define SF_TABLE_FLOAT2DOUBLE 0x7c
47
48#define SF_TABLE_V2_SIZE 0x80
49
50#endif