Home
last modified time | relevance | path

Searched refs:a (Results 1 – 25 of 128) sorted by relevance

123456

/hal_rpi_pico-latest/src/host/pico_divider/
Ddivider.c10 int32_t div_s32s32(int32_t a, int32_t b) { in div_s32s32() argument
11 return hw_divider_quotient_s32(a, b); in div_s32s32()
14 divmod_result_t divmod_s32s32(int32_t a, int32_t b) { in divmod_s32s32() argument
15 return hw_divider_divmod_s32(a, b); in divmod_s32s32()
18 uint32_t div_u32u32(uint32_t a, uint32_t b) { in div_u32u32() argument
19 return hw_divider_u32_quotient(a, b); in div_u32u32()
22 divmod_result_t divmod_u32u32(uint32_t a, uint32_t b) { in divmod_u32u32() argument
23 return hw_divider_divmod_u32(a, b); in divmod_u32u32()
41 static inline qr_u64 udiv64(uint64_t a, uint64_t b) { in udiv64() argument
45 rc.remainder = a; in udiv64()
[all …]
/hal_rpi_pico-latest/src/rp2_common/pico_divider/
Ddivider_compiler.c10 int32_t div_s32s32(int32_t a, int32_t b) { in div_s32s32() argument
11 return hw_divider_quotient_s32(a, b); in div_s32s32()
14 divmod_result_t divmod_s32s32(int32_t a, int32_t b) { in divmod_s32s32() argument
15 return hw_divider_divmod_s32(a, b); in divmod_s32s32()
18 uint32_t div_u32u32(uint32_t a, uint32_t b) { in div_u32u32() argument
19 return hw_divider_u32_quotient(a, b); in div_u32u32()
22 divmod_result_t divmod_u32u32(uint32_t a, uint32_t b) { in divmod_u32u32() argument
23 return hw_divider_divmod_u32(a, b); in divmod_u32u32()
41 static inline qr_u64 udiv64(uint64_t a, uint64_t b) { in udiv64() argument
45 rc.remainder = a; in udiv64()
[all …]
/hal_rpi_pico-latest/src/host/hardware_divider/include/hardware/
Ddivider.h31 static inline divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b) { in hw_divider_divmod_u32() argument
32 if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-1); // todo check this in hw_divider_divmod_u32()
33 return (((uint64_t)(a%b))<<32u) | (a/b); in hw_divider_divmod_u32()
45 static inline divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b) { in hw_divider_divmod_s32() argument
46 if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-__sign_of(a)); in hw_divider_divmod_s32()
47 return (((uint64_t)(a%b))<<32u) | (uint32_t)(a/b); in hw_divider_divmod_s32()
61 static inline void hw_divider_divmod_s32_start(int32_t a, int32_t b) { in hw_divider_divmod_s32_start() argument
62 hw_divider_result_threadlocal = hw_divider_divmod_s32(a, b); in hw_divider_divmod_s32_start()
74 static inline void hw_divider_divmod_u32_start(uint32_t a, uint32_t b) { in hw_divider_divmod_u32_start() argument
75 hw_divider_result_threadlocal = hw_divider_divmod_u32(a, b); in hw_divider_divmod_u32_start()
[all …]
/hal_rpi_pico-latest/src/rp2_common/hardware_divider/include/hardware/
Ddivider.h72 divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b);
74 static inline divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b) { in hw_divider_divmod_s32() argument
75 if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-__sign_of(a)); in hw_divider_divmod_s32()
76 return (((uint64_t)(a%b))<<32u) | (uint32_t)(a/b); in hw_divider_divmod_s32()
90 divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b);
92 static inline divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b) { in hw_divider_divmod_u32() argument
93 if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-1); // todo check this in hw_divider_divmod_u32()
94 return (((uint64_t)(a%b))<<32u) | (a/b); in hw_divider_divmod_u32()
107 static inline void hw_divider_divmod_s32_start(int32_t a, int32_t b) { in hw_divider_divmod_s32_start() argument
110 sio_hw->div_sdividend = (uint32_t)a; in hw_divider_divmod_s32_start()
[all …]
/hal_rpi_pico-latest/src/common/pico_divider_headers/include/pico/
Ddivider.h42 int32_t div_s32s32(int32_t a, int32_t b);
53 static inline int32_t divmod_s32s32_rem(int32_t a, int32_t b, int32_t *rem) { in divmod_s32s32_rem() argument
54 divmod_result_t r = hw_divider_divmod_s32(a, b); in divmod_s32s32_rem()
67 divmod_result_t divmod_s32s32(int32_t a, int32_t b);
77 uint32_t div_u32u32(uint32_t a, uint32_t b);
88 static inline uint32_t divmod_u32u32_rem(uint32_t a, uint32_t b, uint32_t *rem) { in divmod_u32u32_rem() argument
89 divmod_result_t r = hw_divider_divmod_u32(a, b); in divmod_u32u32_rem()
102 divmod_result_t divmod_u32u32(uint32_t a, uint32_t b);
112 int64_t div_s64s64(int64_t a, int64_t b);
123 int64_t divmod_s64s64_rem(int64_t a, int64_t b, int64_t *rem);
[all …]
/hal_rpi_pico-latest/test/pico_float_test/
Dpico_double_test.c27 extern int __aeabi_dcmpun(double a, double b);
33 extern __attribute__((pcs("aapcs"))) void __aeabi_cdcmpeq(double a, double b);
35 int test__aeabi_cdcmpeq(double a, double b, int expected) { in test__aeabi_cdcmpeq() argument
36 uint32_t cpsr_value = call_apsr_d(a, b, __aeabi_cdcmpeq); in test__aeabi_cdcmpeq()
40 a, b, cpsr.flags.z, expected); in test__aeabi_cdcmpeq()
98 extern __attribute__((pcs("aapcs"))) void __aeabi_cdcmple(double a, double b);
100 extern __attribute__((pcs("aapcs"))) void __aeabi_cdrcmple(double a, double b);
102 int test_dcmple_gt(double a, double b, int expected) { in test_dcmple_gt() argument
103 if ((a <= b) != expected) { in test_dcmple_gt()
105 a, b, a <= b, expected); in test_dcmple_gt()
[all …]
Dpico_float_test.c26 extern int __aeabi_fcmpun(float a, float b);
32 extern __attribute__((pcs("aapcs"))) void __aeabi_cfcmpeq(float a, float b);
34 int test__aeabi_cfcmpeq(float a, float b, int expected) { in test__aeabi_cfcmpeq() argument
35 uint32_t cpsr_value = call_apsr_f(a, b, __aeabi_cfcmpeq); in test__aeabi_cfcmpeq()
39 a, b, cpsr.flags.z, expected); in test__aeabi_cfcmpeq()
97 extern __attribute__((pcs("aapcs"))) void __aeabi_cfcmple(float a, float b);
99 extern __attribute__((pcs("aapcs"))) void __aeabi_cfrcmple(float a, float b);
101 int test_fcmple_gt(float a, float b, int expected) { in test_fcmple_gt() argument
102 if ((a <= b) != expected) { in test_fcmple_gt()
104 a, b, a <= b, expected); in test_fcmple_gt()
[all …]
/hal_rpi_pico-latest/docs/
Dlogo-mobile.svg15a.50715.50715,0,0,1,.64431.53875c-.16085,1.517.75688,1.32594.97375,1.05634,2.38917-2.97065,4.91974…
16a.50084.50084,0,0,1,.43005-.75445c.92449-.02391.982-.67308.57694-.94363-3.02411-2.02014-5.05663-4.…
/hal_rpi_pico-latest/src/rp2_common/pico_platform_compiler/include/pico/platform/
Dcompiler.h44 #define __printflike(a, b) argument
53 #define __CONCAT1(a, b) a ## b argument
56 #define __CONCAT(a, b) __CONCAT1(a, b) argument
59 #define __STRING(a) #a argument
134 #define count_of(a) (sizeof(a)/sizeof((a)[0])) argument
141 #define MAX(a, b) ((a)>(b)?(a):(b)) argument
148 #define MIN(a, b) ((b)>(a)?(a):(b)) argument
/hal_rpi_pico-latest/src/host/pico_platform/include/pico/
Dplatform.h107 #define count_of(a) (sizeof(a)/sizeof((a)[0])) argument
111 #define MAX(a, b) ((a)>(b)?(a):(b)) argument
115 #define MIN(a, b) ((b)>(a)?(a):(b)) argument
135 #define __fast_mul(a,b) ((a)*(b)) argument
139 static inline int32_t __mul_instruction(int32_t a,int32_t b) in __mul_instruction() argument
141 return a*b; in __mul_instruction()
/hal_rpi_pico-latest/test/pico_divider_test/
Dpico_divider_test.c195 uint32_t __attribute__((naked)) time_32(uint32_t a, uint32_t b, uint32_t (*func)(uint32_t a, uint32… in time_32() argument
215 uint32_t __attribute__((naked)) time_64(uint64_t a, uint64_t b, uint64_t (*func64)(uint64_t a, uint… in time_64() argument
236 uint32_t compiler_div_s32(uint32_t a, uint32_t b) { in compiler_div_s32() argument
237 return ((int32_t)a) / (int32_t)b; in compiler_div_s32()
240 uint32_t pico_div_s32(uint32_t a, uint32_t b) { in pico_div_s32() argument
241 return div_s32s32(a, b); in pico_div_s32()
244 uint32_t compiler_div_u32(uint32_t a, uint32_t b) { in compiler_div_u32() argument
245 return a/b; in compiler_div_u32()
248 uint32_t pico_div_u32(uint32_t a, uint32_t b) { in pico_div_u32() argument
249 return div_u32u32(a, b); in pico_div_u32()
[all …]
Dpico_divider_nesting_test.c30 int a = z / 7; in timer_callback() local
32 if (z != a * 7 + b) { in timer_callback()
35 a = z / -7; in timer_callback()
37 if (z != a * -7 + b) { in timer_callback()
94 uint a = z / 11; in test_irq_handler0() local
96 if (z != a * 11 + b) { in test_irq_handler0()
115 uint a = z / -13; in test_irq_handler1() local
117 if (z != a * -13 + b) { in test_irq_handler1()
163 uint a = z / 11; in test_nesting() local
165 if (z != a * 11 + b) { in test_nesting()
[all …]
/hal_rpi_pico-latest/src/rp2040/pico_platform/include/pico/
Dplatform.h187 __force_inline static int32_t __mul_instruction(int32_t a, int32_t b) { in __mul_instruction() argument
189 __asm ("mul %0, %0, %1" : "+l" (a) : "l" (b) : ); in __mul_instruction()
191 pico_default_asm ("muls %0, %1" : "+l" (a) : "l" (b) : "cc"); in __mul_instruction()
193 return a; in __mul_instruction()
209 #define __fast_mul(a, b) __builtin_choose_expr(__builtin_constant_p(b) && !__builtin_constant_p(a),… argument
210 (__builtin_popcount(b) >= 2 ? __mul_instruction(a,b) : (a)*(b)), \
211 (a)*(b))
/hal_rpi_pico-latest/src/rp2350/pico_platform/include/pico/
Dplatform.h258 __force_inline static int32_t __mul_instruction(int32_t a, int32_t b) { in __mul_instruction() argument
260 __asm ("mul %0, %0, %1" : "+r" (a) : "r" (b) : ); in __mul_instruction()
262 pico_default_asm ("muls %0, %1" : "+l" (a) : "l" (b) : "cc"); in __mul_instruction()
264 return a; in __mul_instruction()
280 #define __fast_mul(a, b) __builtin_choose_expr(__builtin_constant_p(b) && !__builtin_constant_p(a),… argument
281 (__builtin_popcount(b) >= 2 ? __mul_instruction(a,b) : (a)*(b)), \
282 (a)*(b))
/hal_rpi_pico-latest/src/rp2_common/pico_double/
Ddouble_fma_dcp.S72 @ compute mn+a with full intermediate precision
75 @ [r13,#0] a
82 ldrd r4,r5,[r12,#0] @ fetch a using original SP
88 …,r6,r5 @ set N if mn has opposite sign to a, i.e. if the operation is essentially a
89 WXUP r4,r5 @ write a to coprocessor to get its classification
100 …mov r2,#0 @ seems to be no 16-bit instruction which zeros a register without aff…
106 bmi 50f @ mn has opposite sign to a so operation is essentially a subtraction
115 @ r4:r5 a IEEE packed
120 … @ branch if |a| is big compared to |mn|, more precisely if ea-(em+en)≥3 so e.…
124 @ here |mn| is big compared to |a|; e.g. if em+en=0 (so 1≤mn<4) then ea≤2 and a<8
[all …]
/hal_rpi_pico-latest/bazel/util/
Dtransition.bzl8 """A helper that drastically simplifies declaration of a transition.
10 A transition in Bazel is a way to force changes to the way the build is
11 evaluated for all dependencies of a given rule.
16 a -> b -> c
18 Normally, if you set `defines` on a, they couldn't apply to b or c because
19 they are dependencies of a. There's no way for b or c to know about a's
20 settings, because they don't even know a exists!
22 We can fix this via a transition! If we put a transition in front of `a`
23 that sets --copts=-DFOO=42, we're telling Bazel to build a and all of its
30 you need to do is provide a set of attrs, and then a `flag_overrides`
[all …]
Dsdk_define.bzl21 doc = """A simple rule that offers a skylib flag as a define.
23 These can be listed in the `deps` attribute of a `cc_library` to get access
24 to the value of a define.
/hal_rpi_pico-latest/bazel/
DREADME.md3 ## Using the Pico SDK in a Bazel project.
5 ### Add pico-sdk as a dependency
6 First, in your `MODULE.bazel` file, add a dependency on the Pico SDK and
40 ### Selecting a different board
46 If you have a bespoke board definition, you can configure the Pico SDK to use it
47 by pointing `--@pico-sdk//bazel/config:PICO_CONFIG_HEADER` to a `cc_library`
48 that defines `PICO_BOARD` and either a `PICO_CONFIG_HEADER` define or a
53 Creation of UF2 images can be done as explicit build steps on a per-binary
54 rule basis, or through an aspect. Running a wildcard build with the
55 `pico_uf2_aspect` enabled is the easiest way to create a UF2 for every ELF
[all …]
Ddefs.bzl34 doc = """Generates a .h header file for each listed pio source.
37 the include path if you depend on this rule from a `cc_library`.
69 """Expresses compatibility with a config_setting."""
76 """Expresses incompatibility with a config_setting."""
83 """Expresses a rule is compatible with the rp2 family."""
87 """Expresses a rule is compatible a Pico W."""
96 """A helper macro for declaring a Pico board to use with PICO_CONFIG_HEADER.
100 a cc_library that you can configure //bazel/config:PICO_CONFIG_HEADER to
/hal_rpi_pico-latest/tools/
Duf2_aspect.bzl1 # TODO: Default to a list of known compatible rules until the toolchain emits
2 # firmware images with a .elf extension. When binaries have a .elf suffix,
4 # filtering can be added to more easily support a wider array of file types.
42 Normally with Bazel, a cc_binary or other rule cannot be "extended" to emit
43 additional outputs. However, this aspect may be used as a secondary, adjacent
46 This can be used from a build to produce UF2 files alongside the regular
56 It's also possible to use this aspect within a custom macro (e.g. my_cc_binary)
/hal_rpi_pico-latest/src/common/pico_util/include/pico/util/
Dpheap.h61 typedef bool (*pheap_comparator)(void *user_data, pheap_node_id_t a, pheap_node_id_t b);
129 static pheap_node_id_t ph_merge_nodes(pheap_t *heap, pheap_node_id_t a, pheap_node_id_t b) { in ph_merge_nodes() argument
130 if (!a) return b; in ph_merge_nodes()
131 if (!b) return a; in ph_merge_nodes()
132 if (heap->comparator(heap->user_data, a, b)) { in ph_merge_nodes()
133 ph_add_child_node(heap, a, b); in ph_merge_nodes()
134 return a; in ph_merge_nodes()
136 ph_add_child_node(heap, b, a); in ph_merge_nodes()
/hal_rpi_pico-latest/
DCONTRIBUTING.md3 ## How to Report a Bug
5 …pi/pico-sdk/pulls). If you find think you have found a bug in the SDK please report it by [opening…
9a GitHub account and fork the original repository to your own account. You can make changes, save …
21 * Opening braces should not be placed on a new line.
DREADME.md8 A single program runs on the device at a time and starts with a conventional `main()` method. Stand…
54 1. Install CMake (at least version 3.13), python 3, a native compiler, and a GCC cross compiler
65 3. Setup a `CMakeLists.txt` like:
83 * Or with the Raspberry Pi Pico SDK as a submodule :
84 1. Clone the SDK as a submodule called `pico-sdk`
85 1. Setup a `CMakeLists.txt` like:
106 1. Setup a `CMakeLists.txt` like:
115 # pico_sdk_import.cmake is a single file copied from this SDK
130 2. Setup a `CMakeLists.txt` like:
148 About the simplest you can do is a single source file (e.g. hello_world.c)
[all …]
/hal_rpi_pico-latest/src/common/pico_binary_info/
Dbinary_info.bzl3 # PICO_BUILD_DEFINE: PICO_PROGRAM_NAME, Provided by PICO_DEFAULT_BINARY_INFO or a manually linked c…
4 # PICO_BUILD_DEFINE: PICO_PROGRAM_DESCRIPTION, Provided by PICO_DEFAULT_BINARY_INFO or a manually l…
5 # PICO_BUILD_DEFINE: PICO_PROGRAM_URL, Provided by PICO_DEFAULT_BINARY_INFO or a manually linked cu…
6 # PICO_BUILD_DEFINE: PICO_PROGRAM_VERSION_STRING, Provided by PICO_DEFAULT_BINARY_INFO or a manuall…
19 # TODO: There's no practical way to support this correctly without a
/hal_rpi_pico-latest/cmake/
Dgeneric_board.cmake1 # For boards without their own cmake file, we look for a header file
23 …if (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ \t\]*(.*…
26 …if (LINE MATCHES "^[ \t\]*//[ \t\]*pico_cmake_set_default[ \t\]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t\]*=[ …

123456