David Lechner
3dc324d3f1
tests: Format all Python code with black, except tests in basics subdir.
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py. The basics/ subdirectory is excluded for now so we
aren't changing too much at once.
In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
5 years ago
Damien George
30e25174bb
tests: Rename "array" module to "uarray".
5 years ago
Damien George
cd35dd9d9a
py: Allow to pass in read-only buffers to viper and inline-asm funcs.
Fixes #4936 .
5 years ago
Damien George
664f03f466
tests: Add a test for argument passing to inline-asm functions.
9 years ago
Damien George
8f54c08691
py/inlineasm: Add ability to specify return type of asm_thumb funcs.
Supported return types are: object, bool, int, uint.
For example:
@micropython.asm_thumb
def foo(r0, r1) -> uint:
add(r0, r0, r1)
9 years ago
Damien George
ea8be373a9
py/inlinethumb: Remove 30-bit restriction on movwt instruction.
movwt can now move a full 32-bit constant into a register.
9 years ago
Henrik Sölver
e242b1785f
py/emitinlinethumb: Add support for MRS instruction.
Only IPSR and BASEPRI special registers supported at the moment, but easy
to extend in the future.
9 years ago
adminpete
d6201fc4b7
py: In inline asm, vldr and vstr offsets now in bytes not words.
As per ARM convention.
9 years ago
Damien George
096d1e4512
py: Add lsl/lsr/asr opcode support to inline Thumb2 assembler.
9 years ago
=
5008972fef
py/inlinethumb: Support for core floating point instructions.
Adds support for the following Thumb2 VFP instructions, via the option
MICROPY_EMIT_INLINE_THUMB_FLOAT:
vcmp
vsqrt
vneg
vcvt_f32_to_s32
vcvt_s32_to_f32
vmrs
vmov
vldr
vstr
vadd
vsub
vmul
vdiv
10 years ago
Damien George
96e37d3bb8
tests: Add tests for inline assembler beq_n and beq_w ops.
10 years ago
Damien George
eff10f66a6
py: Implement bl/bx instructions for inline Thumb assembler.
10 years ago
Damien George
192d536fe4
py: Implement clz and rbit for inline Thumb assembler.
10 years ago
Damien George
32f0b7942c
py: Implement sdiv/udiv for inline Thumb assembler.
10 years ago
Damien George
0d967b8ae4
py: Implement push/pop for inline Thumb assembler.
10 years ago
Damien George
c4ccb078a5
tests: Add inline assembler test for pyboard.
11 years ago