From nobody Thu May 16 08:21:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586882685; cv=none; d=zohomail.com; s=zohoarc; b=JT/Hps0rQs0j1XbfzVV84TaiPQ/LdGd8U0AMxXyHPZ8XCQBv1hXYfnT7TC40RDk2mhMN8ewMw/WZhjkevgLE0xs7PLeD963TjWc5JnUd7jlx+O08UL1VQplErlfdDTBx7oXw0OYCmCZ6390BRsRoul4eOxT4b8/s8/Iaxtlvaqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586882685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uTz3KcJlNsaV83gD8WOBIeR47sdCWtE05dPDmVPpmB4=; b=SDcpEDWHdS9nULk+ZHuhQ6Npqv2hHMKLG2UWXurq3JzCU2Yy2JK5gJSkG/xVU3T6Htqbs1B2ig7b1ZrKyAsxBpICxGdHGtFViEypKe0vhWBlWmUfN2X/Sbe+lsnlNMwh8KY03d03vbEBLCZRCks8mL+sB+SFvz42xASZh3cbnkM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586882685170336.0386159874221; Tue, 14 Apr 2020 09:44:45 -0700 (PDT) Received: from localhost ([::1]:34708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOfz-0004bR-RL for importer@patchew.org; Tue, 14 Apr 2020 12:44:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55924) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOaY-0002Rr-Iw for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOaX-0004yt-Eh for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:06 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56346 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jOOaW-0004yG-DP for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:04 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-yt9V2ageO_aleN7rSZpbtA-1; Tue, 14 Apr 2020 12:39:02 -0400 Received: by mail-wm1-f70.google.com with SMTP id t62so4527501wma.0 for ; Tue, 14 Apr 2020 09:39:01 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id v19sm14240210wra.57.2020.04.14.09.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586882343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uTz3KcJlNsaV83gD8WOBIeR47sdCWtE05dPDmVPpmB4=; b=V6wKG60PZidT77mqvK4xHklw/QPxNpArZ0gTODLxgzSk2/VwauNEE/6JjF233YHyWxaRQw p4LTsruChkBqjdhswgmORxq6gcVxzBe5IbobwwQ0syNKD3zkmXYaEvXTp1gUi3o48XyD+p NY1ii4QqtGCBYBch3oFqBroBla5QE5o= X-MC-Unique: yt9V2ageO_aleN7rSZpbtA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0U0eCjik1vGrpyxoZhXD2gNf3y9hyHhyj+DOXzp6ISo=; b=biuf1zMBLpHVMM6mR6ukFlJm2TrSl7ZX8yR2aQ7u4q/yuActukQGhNC65VNNPHcLgf hW2PaiX0vvn0JCbgWfiy/qhIl1UPHzYJvgxVpqkhp2bUtAY9q1ti7bUWK2R0aS9Xx/Bg uOHiUN+GnyLqYeQTNQmiZxsy2Dbw34Fs8AbuzYV4Vs73i2cn2Rdf7PFL7AGC1ol1hVoo W6AAZjXAizEK37D0Zrqx3HPA07NpQJf9+ZF3KAXqdg0ICdasya7dXmZPDo5jLBItGkNH m5Vhlm5WE7c0xIxhaPMfCoEQLK/6SwGc8dRckR//NphoovbkH0aIRBrIK5MfLjEiMJqr 9kGw== X-Gm-Message-State: AGi0PuYjiwOTbI1RaV8Baz4nkoNdWb0rHXYmDhVThRyO6yEIv//Mo4zR 0eCAe8ALWHliTHoLKKnfHxFyQU+1qWSdfs1PMqjx09nRx617Ke99h9y7uMIVVd73Hi3RPnnq0/R ipfk8sLcGqxLLrl0= X-Received: by 2002:a05:6000:8f:: with SMTP id m15mr21488084wrx.19.1586882340604; Tue, 14 Apr 2020 09:39:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKgPqfzGoFMleiKmVQw3PAx05Z2Sh+q2EwkDaLefCqAgbJXI5czyX5f1i7P6KprNahM53ZS3g== X-Received: by 2002:a05:6000:8f:: with SMTP id m15mr21488068wrx.19.1586882340443; Tue, 14 Apr 2020 09:39:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v3 1/2] gdbstub: Introduce gdb_get_float32() to get 32-bit float registers Date: Tue, 14 Apr 2020 18:38:52 +0200 Message-Id: <20200414163853.12164-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200414163853.12164-1-philmd@redhat.com> References: <20200414163853.12164-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Laurent Vivier , qemu-ppc@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Since we now use a GByteArray, we can not use stfl_p() directly. Introduce the gdb_get_float32() helper to load a float32 register. Fixes: a010bdbe719 ("extend GByteArray to read register helpers") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: Use buf[sizeof(CPU_FloatU)] (rth) --- include/exec/gdbstub.h | 10 ++++++++++ target/sh4/gdbstub.c | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index b52d9933ee..0891d93de2 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -125,6 +125,16 @@ static inline int gdb_get_reg128(GByteArray *buf, uint= 64_t val_hi, return 16; } =20 +static inline int gdb_get_float32(GByteArray *array, float32 val) +{ + uint8_t buf[sizeof(CPU_FloatU)]; + + stfl_p(buf, val); + g_byte_array_append(array, buf, sizeof(buf)); + + return sizeof(buf); +} + static inline int gdb_get_zeroes(GByteArray *array, size_t len) { for (size_t i =3D 0; i < len; i++) { diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c index 49fc4a0cc6..34ad3ca050 100644 --- a/target/sh4/gdbstub.c +++ b/target/sh4/gdbstub.c @@ -58,11 +58,9 @@ int superh_cpu_gdb_read_register(CPUState *cs, GByteArra= y *mem_buf, int n) return gdb_get_regl(mem_buf, env->fpscr); case 25 ... 40: if (env->fpscr & FPSCR_FR) { - stfl_p(mem_buf, env->fregs[n - 9]); - } else { - stfl_p(mem_buf, env->fregs[n - 25]); + return gdb_get_float32(mem_buf, env->fregs[n - 9]); } - return 4; + return gdb_get_float32(mem_buf, env->fregs[n - 25]); case 41: return gdb_get_regl(mem_buf, env->ssr); case 42: --=20 2.21.1 From nobody Thu May 16 08:21:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1586882853; cv=none; d=zohomail.com; s=zohoarc; b=b6UhQi+mLQij2EgziS0QXxIGZndhDRYuYjzzlhg+coJTU7IRZWgt4ZT1XpXrTTKcyMA0zzuSqIlkB13nUpCu0VbYHQiqkFObH5tqzfGmkCWs2mRmBAX6Zi6OvNG0IzE3bVpPzyNm76o2Cbv68ncTG9asjt0Wem+4L+V2/aeDJPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586882853; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wLPOsT0G9YgHpWjxZdatLGrUy6tREQ/Zz1zlQsaY33Y=; b=Lz2KTmC/SsNsILWo6rdr6UyrhJoKPsK6SaT/bOQtUeVaAma+6INr2xwrTgKLoCHGqdT6rEIe8GuH06/EsB4JblD/3dp96kvjV0Q2yU09N9nZ/WOEWOf0aMLbt9jD8KVhv7ZDhw8K9oafG+nGDcPcYwHSfv56jOJDzO+kvvk2Cbw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586882853086964.3935585703176; Tue, 14 Apr 2020 09:47:33 -0700 (PDT) Received: from localhost ([::1]:34820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOih-00017A-Jm for importer@patchew.org; Tue, 14 Apr 2020 12:47:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56008) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOad-0002VZ-G9 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOab-00051x-KY for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:10 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55333 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jOOaa-00050z-K7 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:39:09 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-257-OLcvDoOGMVuEoXLqDnm-MQ-1; Tue, 14 Apr 2020 12:39:06 -0400 Received: by mail-wr1-f71.google.com with SMTP id q10so2465099wrv.10 for ; Tue, 14 Apr 2020 09:39:06 -0700 (PDT) Received: from x1w.redhat.com (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id y16sm19742574wrp.78.2020.04.14.09.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586882348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wLPOsT0G9YgHpWjxZdatLGrUy6tREQ/Zz1zlQsaY33Y=; b=V9Wsvw+0tqbAilmXnpoXkVN9Ih1VkOuy+K9y/5sVEPaHNuGQEiLX8LHFAhNE+tLg/AJH9/ hh8+UhzWmL3N2JRh8AYHX1A4ydq3dX8wfPWAUdIVpbHPeh43mSx4PyxfTMmYLEar54BhDe dsGIiTfgwtx8hfEESgyofn6EUifazWE= X-MC-Unique: OLcvDoOGMVuEoXLqDnm-MQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fgRMUlDSYeLU1J9t9ILaCd5LaYgUOns3F9y47+OL018=; b=sy/TOC/0OzgIwNNzsbMA6/i+emTZxcl0WtnFSTUkGuG+EGVeCYvv9C92H08g4a0/fV hge+2AFN/ZOS0kyQJtqP75BksMjYTN4fJL02ccmnO3Mpylao9og+hNccgC4KWr7HxGU8 /pNoNXWQO/I6t1WwmFfQbPgWMCVb3Q6sq7QJ+9voF5lzlQ/UW9grmhPsjIjmfqC2JEoo sPU/j0wRl4uJz2D5IYz/Cq4F6MXsXxftmX5DAnBxQtyEWcfGUM3UhRUCU998eV3Ny1Qg uVdRMQFQ/V0cwaazfUm+LwVPCPk89rgLLAyATlw5j6PTVkJti/cqfSHX7JkJ3lOyZl76 ksbw== X-Gm-Message-State: AGi0PubmzS/ySif40wYRmFwyYSFjes3dyrxD23iE7V5rBUQfnd8im/x7 7mloRIBsL1Abf8vgfiEQwbhRmycKCn6d/Pb//mboUkPEx6SnyhB7S59fzisCQ/OEOgzYiE6cmPX ONVeotbIl/3a7CbQ= X-Received: by 2002:a05:600c:11:: with SMTP id g17mr682195wmc.142.1586882345459; Tue, 14 Apr 2020 09:39:05 -0700 (PDT) X-Google-Smtp-Source: APiQypJv0HRPGl8oO/D/2OKdI8rHzW7AhMum3n/XMFlmrYYaBLnmH8uOR47/T8aI59uj8eNaWT55gg== X-Received: by 2002:a05:600c:11:: with SMTP id g17mr682181wmc.142.1586882345223; Tue, 14 Apr 2020 09:39:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 v3 2/2] gdbstub: Introduce gdb_get_float64() to get 64-bit float registers Date: Tue, 14 Apr 2020 18:38:53 +0200 Message-Id: <20200414163853.12164-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200414163853.12164-1-philmd@redhat.com> References: <20200414163853.12164-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Laurent Vivier , qemu-ppc@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" When converted to use GByteArray in commits 462474d760c and a010bdbe719, the call to stfq_p() was removed. This call serialize a float. Since we now use a GByteArray, we can not use stfq_p() directly. Introduce the gdb_get_float64() helper to load a float64 register. Fixes: 462474d760c ("target/m68k: use gdb_get_reg helpers") Fixes: a010bdbe719 ("extend GByteArray to read register helpers") Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: Use buf[sizeof(CPU_DoubleU)] (rth) --- include/exec/gdbstub.h | 10 ++++++++++ target/m68k/helper.c | 3 ++- target/ppc/gdbstub.c | 4 ++-- target/ppc/translate_init.inc.c | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 0891d93de2..262181d8d6 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -135,6 +135,16 @@ static inline int gdb_get_float32(GByteArray *array, f= loat32 val) return sizeof(buf); } =20 +static inline int gdb_get_float64(GByteArray *array, float64 val) +{ + uint8_t buf[sizeof(CPU_DoubleU)]; + + stfq_p(buf, val); + g_byte_array_append(array, buf, sizeof(buf)); + + return sizeof(buf); +} + static inline int gdb_get_zeroes(GByteArray *array, size_t len) { for (size_t i =3D 0; i < len; i++) { diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 014657c637..cc80b48dda 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -72,7 +72,8 @@ static int cf_fpu_gdb_get_reg(CPUM68KState *env, GByteArr= ay *mem_buf, int n) { if (n < 8) { float_status s; - return gdb_get_reg64(mem_buf, floatx80_to_float64(env->fregs[n].d,= &s)); + return gdb_get_float64(mem_buf, + floatx80_to_float64(env->fregs[n].d, &s)); } switch (n) { case 8: /* fpcontrol */ diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index eb362dd9ae..5c11c88b2a 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -130,7 +130,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray = *buf, int n) gdb_get_regl(buf, env->gpr[n]); } else if (n < 64) { /* fprs */ - gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); + gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32)); } else { switch (n) { case 64: @@ -184,7 +184,7 @@ int ppc_cpu_gdb_read_register_apple(CPUState *cs, GByte= Array *buf, int n) gdb_get_reg64(buf, env->gpr[n]); } else if (n < 64) { /* fprs */ - gdb_get_reg64(buf, *cpu_fpr_ptr(env, n - 32)); + gdb_get_float64(buf, *cpu_fpr_ptr(env, n - 32)); } else if (n < 96) { /* Altivec */ gdb_get_reg64(buf, n - 64); diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.in= c.c index e853164a86..d825cb5975 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -9881,7 +9881,7 @@ static int gdb_get_float_reg(CPUPPCState *env, GByteA= rray *buf, int n) { uint8_t *mem_buf; if (n < 32) { - gdb_get_reg64(buf, *cpu_fpr_ptr(env, n)); + gdb_get_float64(buf, *cpu_fpr_ptr(env, n)); mem_buf =3D gdb_get_reg_ptr(buf, 8); ppc_maybe_bswap_register(env, mem_buf, 8); return 8; --=20 2.21.1