On 07.05.2025 11:38, Michael Ackermann via Tinycc-devel wrote:
All information is supplied in detail to re-produce,If i've not missed anything. If further information was necessary I'll do my best to provide any.
Well, see... In my opinion, what software developers always underestimate, is the development of the software in their head while they spent hours and weeks of thinking on some project and while consuming lots of air and food to provide the necessary vital resources. In any case, what you know about your project is not what anyone else knows, and is not what most other people ever would want to know. > Any idea why arm-tcc would not escape on __asm__ token to process inline > assembly, I have no idea why arm-tcc would behave as you say because it doesn't. But in order to have something that we can talk about we need to see the file first. You do have it on your computer already (I assume), but you don't want to show it, for whatever reason. So, as an exception, I tried to find it on the net. Here it is (presumably): __asm__( ".text \n" ".global " START " \n" ".type " START ",%function \n" START ": \n" " mov fp, #0 \n" " mov lr, #0 \n" " ldr a2, 1f \n" " add a2, pc, a2 \n" " mov a1, sp \n" "2: and ip, a1, #-16 \n" " mov sp, ip \n" " bl " START "_c \n" ".weak _DYNAMIC \n" ".hidden _DYNAMIC \n" ".align 2 \n" "1: .word _DYNAMIC-2b \n" ); and the error was: ./arch/arm/crt_arch.h:18: error: operand expected Now, unfortunately, line 18 is the end of the entire __asm__() statement. In order to get better results we can remove quotes and try to compile the file as asm.S: .text .global START .type START ,%function START : mov fp, #0 mov lr, #0 ldr a2, 1f add a2, pc, a2 mov a1, sp 2: and ip, a1, #-16 mov sp, ip bl START_c .weak _DYNAMIC .hidden _DYNAMIC .align 2 1: .word _DYNAMIC-2b now the error is: asm.S:7: error: operand expected which is at ldr a2, 1f
I do know already asm processing with any other than ARCH=i386 was absent and/or incomplete, but i wanted to give arm-tcc another try regardless.
I don't know much of the state of arm-asm either except that it was added not that long ago. Obviously it does not recognize 'a2' as a register or pseudo register. If you know what 'a2' means then maybe you could rewrite the snippet in some aspects such that it would actually work with tcc. -- gr _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel