summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitnative.c
Commit message (Collapse)AuthorAge
* py: Partially fix viper multi-comparison; add test for it.Damien George2014-10-19
|
* py: Fix x86 viper code generation, mem8 <-> mem16 for load.Damien George2014-10-12
|
* py: Implement native load for viper.Damien George2014-10-12
| | | | | Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using machine instructions.
* py: Implement and,or,xor native ops for viper.Damien George2014-10-12
|
* Implement missing ARM emitter functions for viperFabian Vogt2014-10-04
|
* py: Change [u]int to mp_[u]int_t in qstr.[ch], and some other places.Damien George2014-10-03
| | | | This should pretty much resolve issue #50.
* py: Fix viper store on x86; add tests for viper ptr16.Damien George2014-09-29
|
* py: Add casting to viper; add native mem stores to viper.Damien George2014-09-29
| | | | | | | | | | Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code.
* py: Implement more binary ops for viper emitter.Damien George2014-09-29
| | | | | This included a bit of restructuring of the assembler backends. Note that the ARM backend is missing a few functions and won't compile.
* py: Allow viper to use ints as direct conditionals in jumps.Damien George2014-09-29
| | | | Allows things like: if 1: ...
* py: Make macro names in assemblers consistent, and tidy up a bit.Damien George2014-09-29
|
* py: In asmthumb, clean up unit/int types and ite ops.Damien George2014-09-29
|
* py: Make native emitter handle multi-compare and not/is not/not in ops.Damien George2014-09-23
|
* py: Make asm_arm_less_op take destination register as first arg.Damien George2014-09-15
| | | | This gets ARM native emitter working againg and addresses issue #858.
* py: Load strings as objects when compiling viper.Damien George2014-09-12
| | | | | | | | | Eventually, viper wants to be able to use raw pointers to strings and arrays for efficient access. But for now, let's just load strings as a Python object so they can be used as normal. This will anyway be compatible with eventual intended viper behaviour. Addresses issue #857.
* py: Put define of x86 argument registers in asmx86.h.Damien George2014-09-08
|
* py: Convert [u]int to mp_[u]int_t in emit.h and associated .c files.Damien George2014-09-08
| | | | Towards resolving issue #50.
* py: Clean up x86-64 native assembler; allow use of extended regs.Damien George2014-09-07
| | | | Native x86-64 now has 3 locals in registers.
* py: Adjust regs for x86 so that 1 more local can live in a reg.Damien George2014-09-06
|
* py: Allow x86 native functions to take arguments.Damien George2014-09-06
| | | | Fix some bugs with x86 stack and saving registers correctly.
* py: Add support for emitting native x86 machine code.Damien George2014-09-06
|
* py: Native emitter now supports delete name & global, and end finally.Damien George2014-09-06
|
* Code style/whitespace cleanup; remove obsolete headers.Damien George2014-09-03
| | | | And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
* py: Fix 2 bugs in native emitter: jump_or_pop and stack settling.Damien George2014-08-29
| | | | Addresses issue #838.
* Basic native ARM emitterFabian Vogt2014-08-27
|
* py: Code clean-up in native emitter; improve thumb native calls.Damien George2014-08-16
|
* py: Viper can call functions with native types, and raise exceptions.Damien George2014-08-16
|
* py: Viper can now store to global.Damien George2014-08-15
|
* py: Fix typing of viper locals; allow default types in annotation.Damien George2014-08-15
|
* py: Allow viper to have type annotations.Damien George2014-08-15
| | | | | | | | | Viper functions can now be annotated with the type of their arguments and return value. Eg: @micropython.viper def f(x:int) -> int: return x + 1
* Rename machine_(u)int_t to mp_(u)int_t.Damien George2014-07-03
| | | | See discussion in issue #50.
* py: Improvements to native emitter.Damien George2014-06-30
| | | | | | | | | | | Native emitter can now compile try/except blocks using nlr_push/nlr_pop. It probably only works for 1 level of exception handling. It doesn't work on Thumb (only x64). Native emitter can also handle some additional op codes. With this patch, 198 tests now pass using "-X emit=native" option to micropython.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-06-25
|\
| * py: Include mpconfig.h before all other includes.Paul Sokolovsky2014-06-21
| | | | | | | | | | | | It defines types used by all other headers. Fixes #691.
* | py: Implement delete_attr in native emitter.Damien George2014-06-22
|/
* py: Fix break from within a for loop.Damien George2014-05-30
| | | | | | | Needed to pop the iterator object when breaking out of a for loop. Need also to be careful to unwind exception handler before popping iterator. Addresses issue #635.
* py: Implement long int parsing in int(...).Damien George2014-05-28
| | | | Addresses issue #627.
* py: Combine native emitters to 1 glue function; distinguish viper.Damien George2014-05-10
| | | | | | | | This patch simplifies the glue between native emitter and runtime, and handles viper code like inline assember: return values are converted to Python objects. Fixes issue #531.
* py: Fix stack access in thumb native emitter.Damien George2014-05-07
|
* py: Improve native emitter; now supports more opcodes.Damien George2014-05-07
|
* py, compiler: Improve passes; add an extra pass for native emitter.Damien George2014-05-07
|
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
* py: Remove unnecessary LOAD_CONST_ID bytecode.Damien George2014-04-27
| | | | It's the same as LOAD_CONST_STR.
* py: Implement keyword-only args.Damien George2014-04-27
| | | | | | | Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
* py: Wrap #if's around emitter functions that are used only by emitcpy.Damien George2014-04-20
| | | | | | | 3 emitter functions are needed only for emitcpy, and so we can #if them out when compiling with emitcpy support. Also remove unused SETUP_LOOP bytecode.
* py: Making closures now passes pointer to stack, not a tuple for vars.Damien George2014-04-20
| | | | | | | Closed over variables are now passed on the stack, instead of creating a tuple and passing that. This way memory for the closed over variables can be allocated within the closure object itself. See issue #510 for background.
* py: Merge BINARY_OP_SUBSCR and store_subscr (w/ delete) into subscr.Damien George2014-04-17
| | | | mp_obj_t->subscr now does load/store/delete.
* py: Remove unique_codes from emitglue.c. Replace with pointers.Damien George2014-04-13
| | | | | | | | | | | | | | | | Attempt to address issue #386. unique_code_id's have been removed and replaced with a pointer to the "raw code" information. This pointer is stored in the actual byte code (aligned, so the GC can trace it), so that raw code (ie byte code, native code and inline assembler) is kept only for as long as it is needed. In memory it's now like a tree: the outer module's byte code points directly to its children's raw code. So when the outer code gets freed, if there are no remaining functions that need the raw code, then the children's code gets freed as well. This is pretty much like CPython does it, except that CPython stores indexes in the byte code rather than machine pointers. These indices index the per-function constant table in order to find the relevant code.
* py: Big improvements to inline assembler.Damien George2014-04-13
| | | | | | | | | Improved the Thumb assembler back end. Added many more Thumb instructions to the inline assembler. Improved parsing of assembler instructions and arguments. Assembler functions can now be passed the address of any object that supports the buffer protocol (to get the address of the buffer). Added an example of how to sum numbers from an array in assembler.
* py: Improve inline assembler; improve compiler constant folding.Damien George2014-04-12
|