Hello Michael, Thank you for a detailed explanation! This helps a lot, and also correlates with my own experiments; I, however, did vpop() after save_reg(), and also missed that SValue's `r` field should be updated as well. Initially I wanted to implement all atomics as function calls; however, I'm not sure how other architectures support memory models, so I would like to leave some kind of a saving loophole. The plan is to provide a set of functions which are responsible for the code generation; all architectures supporting atomics should provide these. Some architectures could even implement these routines in terms of usual calls, if they opt to do so.
With your help and advice, I've been able to provide a very basic implementation for x86_64; I'll publish it soon here, as well as some preceding patches. -- Best regards, Dmitry Selyutin _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel