Skip to content

Commit c4dea28

Browse files
Fix several asm warnings in PIO build
1 parent 20b620d commit c4dea28

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cores/esp8266/StackThunk.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern uint32_t stack_thunk_refcnt;
5151

5252
// Thunking macro
5353
#define make_stack_thunk(fcnToThunk) \
54-
__asm("\n\
54+
__asm__ ("\n\
5555
.text\n\
5656
.literal_position\n\
5757
.literal .LC_STACK_VALUE"#fcnToThunk", 0xdeadbeef\n\

cores/esp8266/core_esp8266_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ extern "C" bool ets_post_rom(uint8 prio, ETSSignal sig, ETSParam par);
172172

173173
extern "C" bool IRAM_ATTR ets_post(uint8 prio, ETSSignal sig, ETSParam par) {
174174
uint32_t saved;
175-
asm volatile ("rsr %0,ps":"=a" (saved));
175+
__asm__ __volatile__ ("rsr %0,ps":"=a" (saved));
176176
bool rc=ets_post_rom(prio, sig, par);
177177
xt_wsr_ps(saved);
178178
return rc;

cores/esp8266/core_esp8266_si2c.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void ICACHE_RAM_ATTR Twi::busywait(unsigned int v)
234234
unsigned int i;
235235
for (i = 0; i < v; i++) // loop time is 5 machine cycles: 31.25ns @ 160MHz, 62.5ns @ 80MHz
236236
{
237-
asm("nop"); // minimum element to keep GCC from optimizing this function out.
237+
__asm__ __volatile__("nop"); // minimum element to keep GCC from optimizing this function out.
238238
}
239239
}
240240

libraries/GDBStub/src/internal/gdbstub.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static inline int gdbHandleCommand() {
445445
writeByte(i, gdbGetHexVal(&data, 8));
446446
}
447447
//Make sure caches are up-to-date. Procedure according to Xtensa ISA document, ISYNC inst desc.
448-
asm volatile("ISYNC\nISYNC\n");
448+
__asm__ __volatile__ ("ISYNC\nISYNC\n");
449449
gdbSendPacketOK();
450450
} else {
451451
//Trying to do a software breakpoint on a flash proc, perhaps?

0 commit comments

Comments
 (0)