diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-20 17:52:13 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-20 17:52:13 -0700 |
| commit | 03a7069d60e50748e8c7653788ceece81c197a3b (patch) | |
| tree | ec24234bdd06866e8958b64ab1203724260de4a3 | |
| parent | 30ee7019ca651bce1fe966c1089fe977d51dc92b (diff) | |
py: Change asm form to make minimal port happy.
| -rw-r--r-- | py/argcheck.c | 2 | ||||
| -rw-r--r-- | py/stackctrl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/py/argcheck.c b/py/argcheck.c index d639d08fb..28bce8a86 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -33,7 +33,7 @@ void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw) { // NOTE(tannewt): This prevents this function from being optimized away. // Without it, functions can crash when reading invalid args. - asm (""); + __asm volatile (""); // TODO maybe take the function name as an argument so we can print nicer error messages if (n_kw && !takes_kw) { diff --git a/py/stackctrl.c b/py/stackctrl.c index 1c46a9434..d9969b56c 100644 --- a/py/stackctrl.c +++ b/py/stackctrl.c @@ -32,7 +32,7 @@ void mp_stack_ctrl_init(void) { // Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto. - asm(""); + __asm volatile (""); volatile int stack_dummy; MP_STATE_THREAD(stack_top) = (char*)&stack_dummy; } @@ -44,7 +44,7 @@ void mp_stack_set_top(void *top) { mp_uint_t mp_stack_usage(void) { // Assumes descending stack // Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto. - asm(""); + __asm volatile (""); volatile int stack_dummy; return MP_STATE_THREAD(stack_top) - (char*)&stack_dummy; } |
