0002fd0cf7
at the _cas0 label, the linker would generate spurious stack adjustment before the return: atexitdont+0x84 0x000000000003614c CLREX $0xf atexitdont+0x88 0x0000000000036150 MOVW R31,R0 atexitdont+0x8c 0x0000000000036154 MOV (SP)16!,R30 <- ???????????? atexitdont+0x90 0x0000000000036158 RETURN the work arround is to move the code into its own cas0 text symbol. this fixes impossible cwfs crashes in srvi().
13 lines
175 B
ArmAsm
13 lines
175 B
ArmAsm
TEXT _tas(SB), 1, $-4
|
|
MOVW $1, R2
|
|
_tas1:
|
|
LDXRW (R0), R1
|
|
STXRW R2, (R0), R3
|
|
CBNZ R3, _tas1
|
|
MOVW R1, R0
|
|
B _barrier(SB)
|
|
|
|
TEXT _barrier(SB), 1, $-4
|
|
DMB $0xB // ISH
|
|
RETURN
|