diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-06 22:38:53 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-07 22:43:28 +0100 |
commit | 9988618e0e0f5c319e31b135d993e22efb593093 (patch) | |
tree | d89d8df392ce2669c9e516a05b11742e72dc8cf2 /py/asmx64.h | |
parent | 18bd51707c218137005cd73cb5a35ebfe2bccd6e (diff) | |
download | micropython-9988618e0e0f5c319e31b135d993e22efb593093.tar.gz micropython-9988618e0e0f5c319e31b135d993e22efb593093.zip |
py: Implement full func arg passing for native emitter.
This patch gets full function argument passing working with native
emitter. Includes named args, keyword args, default args, var args
and var keyword args. Fully Python compliant.
It reuses the bytecode mp_setup_code_state function to do all the hard
work. This function is slightly adjusted to accommodate native calls,
and the native emitter is forced a bit to emit similar prelude and
code-info as bytecode.
Diffstat (limited to 'py/asmx64.h')
-rw-r--r-- | py/asmx64.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/asmx64.h b/py/asmx64.h index cb021b2f3c..0d3af9aa18 100644 --- a/py/asmx64.h +++ b/py/asmx64.h @@ -78,9 +78,13 @@ asm_x64_t* asm_x64_new(mp_uint_t max_num_labels); void asm_x64_free(asm_x64_t* as, bool free_code); void asm_x64_start_pass(asm_x64_t *as, uint pass); void asm_x64_end_pass(asm_x64_t *as); +mp_uint_t asm_x64_get_code_pos(asm_x64_t *as); mp_uint_t asm_x64_get_code_size(asm_x64_t* as); void* asm_x64_get_code(asm_x64_t* as); +void asm_x64_align(asm_x64_t *as, mp_uint_t align); +void asm_x64_data(asm_x64_t *as, mp_uint_t bytesize, mp_uint_t val); + void asm_x64_nop(asm_x64_t* as); void asm_x64_push_r64(asm_x64_t* as, int src_r64); void asm_x64_pop_r64(asm_x64_t* as, int dest_r64); |