Skip to content

Commit

Permalink
Fix ThirdParty/GCC/ATmega formatting (#965)
Browse files Browse the repository at this point in the history
Unnecessary white space was introduced in PR #768
which affected the formatting of assembly code. This PR
returns the correct formatting. No functional change.
  • Loading branch information
feilipu committed Jan 30, 2024
1 parent 04cb022 commit 8622bd5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
40 changes: 20 additions & 20 deletions portable/ThirdParty/GCC/ATmega/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ extern volatile TCB_t * volatile pxCurrentTCB;
{
__asm__ __volatile__ (
"in __tmp_reg__,__SREG__" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"out %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"out %0, %2" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"out %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"out %0, %2" "\n\t"
: /* no outputs */
: "I" ( _SFR_IO_ADDR( _WD_CONTROL_REG ) ),
"r" ( ( uint8_t ) ( _BV( _WD_CHANGE_BIT ) | _BV( WDE ) ) ),
Expand All @@ -117,11 +117,11 @@ extern volatile TCB_t * volatile pxCurrentTCB;
{
__asm__ __volatile__ (
"in __tmp_reg__,__SREG__" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"sts %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"sts %0, %2" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"sts %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"sts %0, %2" "\n\t"
: /* no outputs */
: "n" ( _SFR_MEM_ADDR( _WD_CONTROL_REG ) ),
"r" ( ( uint8_t ) ( _BV( _WD_CHANGE_BIT ) | _BV( WDE ) ) ),
Expand Down Expand Up @@ -167,11 +167,11 @@ extern volatile TCB_t * volatile pxCurrentTCB;
{
__asm__ __volatile__ (
"in __tmp_reg__,__SREG__" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"out %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"out %0, %2" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"out %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"out %0, %2" "\n\t"
: /* no outputs */
: "I" ( _SFR_IO_ADDR( _WD_CONTROL_REG ) ),
"r" ( ( uint8_t ) ( _BV( _WD_CHANGE_BIT ) | _BV( WDE ) ) ),
Expand All @@ -184,11 +184,11 @@ extern volatile TCB_t * volatile pxCurrentTCB;
{
__asm__ __volatile__ (
"in __tmp_reg__,__SREG__" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"sts %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"sts %0, %2" "\n\t"
"cli" "\n\t"
"wdr" "\n\t"
"sts %0, %1" "\n\t"
"out __SREG__,__tmp_reg__" "\n\t"
"sts %0, %2" "\n\t"
: /* no outputs */
: "n" ( _SFR_MEM_ADDR( _WD_CONTROL_REG ) ),
"r" ( ( uint8_t ) ( _BV( _WD_CHANGE_BIT ) | _BV( WDE ) ) ),
Expand Down
22 changes: 11 additions & 11 deletions portable/ThirdParty/GCC/ATmega/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@ typedef uint8_t UBaseType_t;

/* Critical section management. */

#define portENTER_CRITICAL() \
__asm__ __volatile__ ( \
"in __tmp_reg__, __SREG__" "\n\t" \
"cli" "\n\t" \
"push __tmp_reg__" "\n\t" \
::: "memory" \
#define portENTER_CRITICAL() \
__asm__ __volatile__ ( \
"in __tmp_reg__, __SREG__" "\n\t" \
"cli" "\n\t" \
"push __tmp_reg__" "\n\t" \
::: "memory" \
)


#define portEXIT_CRITICAL() \
__asm__ __volatile__ ( \
"pop __tmp_reg__" "\n\t" \
"out __SREG__, __tmp_reg__" "\n\t" \
::: "memory" \
#define portEXIT_CRITICAL() \
__asm__ __volatile__ ( \
"pop __tmp_reg__" "\n\t" \
"out __SREG__, __tmp_reg__" "\n\t" \
::: "memory" \
)


Expand Down

0 comments on commit 8622bd5

Please sign in to comment.