tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] inline assembly parsing with invalid bad expression synta


From: Michael Ackermann
Subject: [Tinycc-devel] inline assembly parsing with invalid bad expression syntax error
Date: Mon, 25 Nov 2024 00:30:04 +0000

Good evening,

cleanup and testing further with linux-2.4.37.11 kernel compilation:
include/asm-i386/spinlock.h includes include/asm-i386/rwlock.h

While parsing valid x86 inline asm with tcc (latest mob branch HEAD)
linux/include/asm/spinlock.h:197: error: bad expression syntax [%]


This change to kernel source merely circuumvents the compile-time parsing error:
 #define __build_write_lock_const(rw, helper) \
-       asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
+       asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \

However, although this prevents the parsing error, the intermediate change to
kernel source applied probably causes incorrect run-time behaviour
(while testing SMP/IOAPIC that probably does rely upon locking and sporadically
 panics while booting with smp enabled, not sure yet.)

Help would be appreciated:
- if and how the inline assembly part could be re-written for tcc compatibility
  that retains correct behaviour of the code
- and/or a patch to tcc to process valid inline assembly without a parsing
  error thrown

Thanks.

-- 

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]