when I compile assembly 'xx.s' in xcode and there are some errors "error: unexpected token in '.section' directive .section .text " in xx.s the code is below:
.section .text
.global PreMDCT
PreMDCT:
stmdb sp!, {r4 - r11, lr}
add r9, r0, r1, lsl #2
sub r3, r9, #32
movs r1, r1, asr #2
beq PreMDCT_END
.end
thanks
While that is valid gcc / as code, it might not be valid xcode syntax.
The xcode devoloper manual suggests that .text is a directive of its own and it's the first implicit directive. Thus it may works simply with
.text
.global asdf
asdf:
nop
ret
.end
or even without the first directive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With