On 07/18/2017 07:52 AM, Emilio G. Cota wrote:
On Mon, Jul 17, 2017 at 19:25:14 -1000, Richard Henderson wrote:
On 07/16/2017 10:04 AM, Emilio G. Cota wrote:
+
+/* claim the first free pointer in tcg_ctxs and increment n_tcg_ctxs */
+for (i = 0; i < smp_cpus; i++) {
+if (atomic_c
On Mon, Jul 17, 2017 at 19:25:14 -1000, Richard Henderson wrote:
> On 07/16/2017 10:04 AM, Emilio G. Cota wrote:
> >+
> >+/* claim the first free pointer in tcg_ctxs and increment n_tcg_ctxs */
> >+for (i = 0; i < smp_cpus; i++) {
> >+if (atomic_cmpxchg(&tcg_ctxs[i], NULL, s) == NUL
On 07/16/2017 10:04 AM, Emilio G. Cota wrote:
+
+/* claim the first free pointer in tcg_ctxs and increment n_tcg_ctxs */
+for (i = 0; i < smp_cpus; i++) {
+if (atomic_cmpxchg(&tcg_ctxs[i], NULL, s) == NULL) {
+unsigned int n;
+
+n = atomic_fetch_inc(&n_tcg_
This enables parallel TCG code generation. However, we do not take
advantage of it yet since tb_lock is still held during tb_gen_code.
In user-mode we use a single TCG context; see the documentation
added to tcg_region_init for the rationale.
Note that targets do not need any conversion: targets