py: Change asm form to make minimal port happy.

This commit is contained in:
Scott Shawcroft 2017-06-20 17:52:13 -07:00
parent 30ee7019ca
commit 03a7069d60
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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;
}