Skip to content

Commit 03a7069

Browse files
committed
py: Change asm form to make minimal port happy.
1 parent 30ee701 commit 03a7069

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

py/argcheck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
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) {
3434
// NOTE(tannewt): This prevents this function from being optimized away.
3535
// Without it, functions can crash when reading invalid args.
36-
asm ("");
36+
__asm volatile ("");
3737
// TODO maybe take the function name as an argument so we can print nicer error messages
3838

3939
if (n_kw && !takes_kw) {

py/stackctrl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
void mp_stack_ctrl_init(void) {
3434
// Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto.
35-
asm("");
35+
__asm volatile ("");
3636
volatile int stack_dummy;
3737
MP_STATE_THREAD(stack_top) = (char*)&stack_dummy;
3838
}
@@ -44,7 +44,7 @@ void mp_stack_set_top(void *top) {
4444
mp_uint_t mp_stack_usage(void) {
4545
// Assumes descending stack
4646
// Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto.
47-
asm("");
47+
__asm volatile ("");
4848
volatile int stack_dummy;
4949
return MP_STATE_THREAD(stack_top) - (char*)&stack_dummy;
5050
}

0 commit comments

Comments
 (0)