Damien George
2964b41c28
py/asm*: Support assembling code to jump to a register, and get PC+off.
Useful for position independent code, and implementing state machines.
6 years ago
Damien George
c0bcf00ed1
py/asm*.c: Remove unnecessary check for num_locals<0 in asm entry func.
All callers of the asm entry function guarantee that num_locals>=0, so no
need to add an explicit check for it. Use an assertion instead.
Also, the signature of asm_x86_entry is changed to match the other asm
entry functions.
7 years ago
Alexander Steffen
55f33240f3
all: Use the name MicroPython consistently in comments
There were several different spellings of MicroPython present in comments,
when there should be only one.
7 years ago
Damien George
761e4c7ff6
all: Remove trailing spaces, per coding conventions.
7 years ago
Damien George
3f9c45efd1
py/asmarm: Fix assembler's PASS_EMIT constant name.
8 years ago
Damien George
93ee6603b1
py/asm: Fix x86 and ARM assemblers due to recent code refactoring.
8 years ago
Damien George
155fdc74d5
py/asm: Remove need for dummy_data when doing initial assembler passes.
For all but the last pass the assembler only needs to count how much space
is needed for the machine code, it doesn't actually need to emit anything.
The dummy_data just uses unnecessary RAM and without it the code is not
any more complex (and code size does not increase for Thumb and Xtensa
archs).
8 years ago
Damien George
612599587b
py: Factor out common code from assemblers into asmbase.[ch].
All assemblers should "derive" from mp_asm_base_t.
8 years ago
Damien George
567b349c2b
py: Implement native multiply operation in viper emitter.
10 years ago
Paul Sokolovsky
351424e719
emitnative: Revamp ARM codegen compile after full-arg support refactors.
The code was apparently broken after 9988618e0e
"py: Implement full func arg passing for native emitter.". This attempts to
propagate those changes to ARM emitter.
10 years ago
Damien George
4dea922610
py: Adjust some spaces in code style/format, purely for consistency.
10 years ago
Damien George
d9dc6fff21
py: Allocate memory for assembled code at start of PASS_EMIT.
Previously was allocating at end of PASS_COMPUTE, and this pass was
being run twice, so memory was being allocated twice.
10 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Paul Sokolovsky
c0bc3bd736
asmarm: Fix bug with encoding small negative ints using MVN instruction.
10 years ago
Damien George
91cfd414c0
py: Implement native load for viper.
Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using
machine instructions.
10 years ago
Damien George
1ef2348df0
py: Implement and,or,xor native ops for viper.
10 years ago
Fabian Vogt
e5268963c6
Implement missing ARM emitter functions for viper
10 years ago
Damien George
3112cde900
py: Implement more binary ops for viper emitter.
This included a bit of restructuring of the assembler backends. Note
that the ARM backend is missing a few functions and won't compile.
10 years ago
Damien George
0b610de017
py: Make macro names in assemblers consistent, and tidy up a bit.
10 years ago
Damien George
d4a799f152
py: Make asm_arm_less_op take destination register as first arg.
This gets ARM native emitter working againg and addresses issue #858 .
10 years ago
Damien George
dda46460ff
Code style/whitespace cleanup; remove obsolete headers.
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
10 years ago
Fabian Vogt
b7235b8412
Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and MP_PLAT_FREE_EXEC macros
Fixes issue #840
10 years ago
Fabian Vogt
16ee30c6fa
Clarify copyright on asmarm files
10 years ago
Fabian Vogt
fe3d16e8c2
Basic native ARM emitter
10 years ago