Skip to content

Commit 0788bd9

Browse files
bors[bot]Disasm
andcommitted
Merge #152
152: Fix __delay asm function for the thumbv6m-none-eabi target r=therealprof a=Disasm Before: ``` 00000000 <__delay>: 0: 46c0 nop ; (mov r8, r8) 2: 3801 subs r0, #1 4: d1fe bne.n 0 <__delay> 4: R_ARM_THM_JUMP8 __delay 6: 4770 bx lr ``` After: ``` 00000000 <__delay>: 0: 46c0 nop ; (mov r8, r8) 2: 3801 subs r0, #1 4: d1fc bne.n 0 <__delay> 6: 4770 bx lr ``` Closes #125 Co-authored-by: Vadim Kaushan <[email protected]>
2 parents 3df114d + 5154004 commit 0788bd9

7 files changed

+2
-1
lines changed

asm.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ __cpsie:
3131
.syntax unified
3232
.thumb_func
3333
__delay:
34+
1:
3435
nop
3536
subs r0, #1
36-
bne __delay
37+
bne 1b // Branch to 1 instead of __delay does not generate R_ARM_THM_JUMP8 relocation, which breaks linking on the thumbv6m-none-eabi target
3738
bx lr
3839

3940
.section .text.__dmb

bin/thumbv6m-none-eabi.a

-56 Bytes
Binary file not shown.

bin/thumbv7em-none-eabi.a

-60 Bytes
Binary file not shown.

bin/thumbv7em-none-eabihf.a

-60 Bytes
Binary file not shown.

bin/thumbv7m-none-eabi.a

-60 Bytes
Binary file not shown.

bin/thumbv8m.base-none-eabi.a

-60 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabi.a

90 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)