Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
0496de26
Commit
0496de26
authored
Oct 03, 2015
by
Damien George
Browse files
py: Allow to enable inline assembler without native emitter.
parent
f22be4eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/compile.c
View file @
0496de26
...
...
@@ -58,8 +58,6 @@ typedef enum {
#define EMIT_ARG(fun, ...) (comp->emit_method_table->fun(comp->emit, __VA_ARGS__))
#define EMIT_LOAD_FAST(qst, local_num) (comp->emit_method_table->load_id.fast(comp->emit, qst, local_num))
#define EMIT_LOAD_GLOBAL(qst) (comp->emit_method_table->load_id.global(comp->emit, qst))
#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm))
#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__))
#else
...
...
@@ -71,6 +69,9 @@ typedef enum {
#endif
#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm))
#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__))
// elements in this struct are ordered to make it compact
typedef
struct
_compiler_t
{
qstr
source_file
;
...
...
@@ -3386,7 +3387,6 @@ mp_obj_t mp_compile(mp_parse_tree_t *parse_tree, qstr source_file, uint emit_opt
emit_inline_thumb
=
emit_inline_thumb_new
(
max_num_labels
);
}
comp
->
emit
=
NULL
;
comp
->
emit_method_table
=
NULL
;
comp
->
emit_inline_asm
=
emit_inline_thumb
;
comp
->
emit_inline_asm_method_table
=
&
emit_inline_thumb_method_table
;
compile_scope_inline_asm
(
comp
,
s
,
MP_PASS_CODE_SIZE
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment