Scott Shawcroft
b35fa44c8a
Merge MicroPython 1.12 into CircuitPython
2021-05-03 14:01:18 -07:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython
2021-04-26 15:47:41 -07:00
Scott Shawcroft
09f7b43c64
Merge MicroPython 1.10 into CircuitPython
2021-04-21 15:59:17 -07:00
Scott Shawcroft
b057fb8a4b
codeformat
2021-04-19 22:22:44 -07:00
microDev
a52eb88031
run code formatting script
2021-03-15 19:27:36 +05:30
Diego Elio Pettenò
34b4993d63
Add license to some obvious files.
2020-07-06 19:16:25 +01:00
Damien George
5f1dd5b86b
py/asmarm: Simplify asm_arm_bl_ind to only load via index, not literal.
...
The maximum index into mp_fun_table is currently less than 1024 and should
stay that way to keep things efficient for all architectures, so there is
no need to handle loading the pointer directly via a literal in this
function.
2018-10-13 15:16:33 +11:00
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.
2018-08-16 13:45:24 +10:00
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.
2018-02-24 23:10:20 +11:00
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.
2017-07-31 18:35:40 +10:00
Damien George
761e4c7ff6
all: Remove trailing spaces, per coding conventions.
2017-07-19 13:12:10 +10:00
Damien George
3f9c45efd1
py/asmarm: Fix assembler's PASS_EMIT constant name.
2017-01-03 15:40:50 +11:00
Damien George
93ee6603b1
py/asm: Fix x86 and ARM assemblers due to recent code refactoring.
2016-12-09 22:54:45 +11:00
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).
2016-12-09 22:50:58 +11:00
Damien George
612599587b
py: Factor out common code from assemblers into asmbase.[ch].
...
All assemblers should "derive" from mp_asm_base_t.
2016-11-28 09:24:50 +11:00
Damien George
567b349c2b
py: Implement native multiply operation in viper emitter.
2015-06-04 14:00:29 +00:00
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.
2015-05-08 22:35:34 +01:00
Damien George
4dea922610
py: Adjust some spaces in code style/format, purely for consistency.
2015-04-09 15:29:54 +00:00
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.
2015-01-14 00:38:33 +00:00
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
...
Addresses issue #1022 .
2015-01-01 20:32:09 +00:00
Paul Sokolovsky
c0bc3bd736
asmarm: Fix bug with encoding small negative ints using MVN instruction.
2014-12-14 03:24:17 +02:00
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.
2014-10-12 16:59:29 +01:00
Damien George
1ef2348df0
py: Implement and,or,xor native ops for viper.
2014-10-12 14:21:06 +01:00
Fabian Vogt
e5268963c6
Implement missing ARM emitter functions for viper
2014-10-04 00:57:21 +02:00
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.
2014-09-29 19:42:06 +01:00
Damien George
0b610de017
py: Make macro names in assemblers consistent, and tidy up a bit.
2014-09-29 19:42:06 +01:00
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 .
2014-09-15 16:39:24 +01:00
Damien George
dda46460ff
Code style/whitespace cleanup; remove obsolete headers.
...
And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
2014-09-03 22:47:23 +01:00
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
2014-09-03 23:07:42 +02:00
Fabian Vogt
16ee30c6fa
Clarify copyright on asmarm files
2014-08-28 01:18:56 +02:00
Fabian Vogt
fe3d16e8c2
Basic native ARM emitter
2014-08-27 18:18:50 +02:00