From nobody Mon Nov 10 19:06:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1558133436; cv=none; d=zoho.com; s=zohoarc; b=bCjj+vjqAMkAE9eLC93MijEBc1DbP5oNZqpTW7nAWTCr44AaNYeF5Ku4rAdkm4vJeUgc4/Tw56xvTP1NDMgBYRw9luIOlfGqPOWK3O8PUV23BDHDl8fj9MfG2CUZw9G0hRMwWllFReye1wJcWB8VHJ/kATGnDPRY04w9jzcfclE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558133436; 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:ARC-Authentication-Results; bh=7+yQx6OLxf+FYJ6x1tpH2MOMowTuy0Bufj466O5eB5Q=; b=Y5kyf7K8wgnW9e8Xy/w4jsutc2Q5jSMdTAbEMD/IYfnq8sc69wih2aAUmMXnR0RLNBXPGX64cRJoUL7zKaQOpLil9MzrpFh3lzVVckvQ5BoeOtbJNySdAwa7pdzmJvpqRRr5obR6UKO4za0imGiFhc2y6aBgPY4oVb7zjzGiEKs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558133436128866.1645930018591; Fri, 17 May 2019 15:50:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:54758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRlgL-0005Ns-Uf for importer@patchew.org; Fri, 17 May 2019 18:50:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRlbK-0001KQ-3G for qemu-devel@nongnu.org; Fri, 17 May 2019 18:45:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRlbJ-0005Zg-11 for qemu-devel@nongnu.org; Fri, 17 May 2019 18:45:18 -0400 Received: from mail-yb1-xb41.google.com ([2607:f8b0:4864:20::b41]:33290) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRlbI-0005Yg-SC for qemu-devel@nongnu.org; Fri, 17 May 2019 18:45:16 -0400 Received: by mail-yb1-xb41.google.com with SMTP id k128so1597218ybf.0 for ; Fri, 17 May 2019 15:45:16 -0700 (PDT) Received: from dionysus.attlocal.net (69-222-133-165.lightspeed.tukrga.sbcglobal.net. [69.222.133.165]) by smtp.gmail.com with ESMTPSA id u73sm2480260ywf.62.2019.05.17.15.45.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 15:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7+yQx6OLxf+FYJ6x1tpH2MOMowTuy0Bufj466O5eB5Q=; b=B+xj45yMVSCbvtpPUuFWgPhf/Wg7HJ41aW/rDILhKzKJuUhm+QYkeJG/FEMtNs2uiM JHcboJQhN2FK2SSl1haLAFrCvwi3yVmL6Fd/R1aIDLymRLNwrBXmHgp8QMxDznWhDl8J nVLQh9u+z8yd2+hzg0Rb4PtoiAk6MnjuU7YEkMrVviDbmXBgKGsdjhFF7KAMfswrp36s apF4OodbN73piRNIWuVF8J6PeCqAbGFS9VEqz6Vsx0d7qC7HmyeTVrzvTNFkvxXtb/ys hnj9SVGlTEYyw5zg+BIuknNFyVikEx3HNxVgnViPDoToas/fVU/3APjyF/HfnZ5SNeQ+ 23vw== 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=7+yQx6OLxf+FYJ6x1tpH2MOMowTuy0Bufj466O5eB5Q=; b=VqdKIDUVRffyn5grcx5Qp7AecjdQlsxPaSC3pbVnEjOUSeKiTvOX1XTsNTeI1t0FBC 2XOXqAc4YF6AsRGjV3eJ3KX0GWcexoPPgU/s4AQgzWXeSEpG+VR+bqHvyIH06tNPnqvM mxIQ2BjLAK0PuZ9Jv3SfcojOWqgBZ2Mu8lvbOmxyZWF+3fvdAxAtbSqBLU9nG99jdnAH cs0oZLAcuwxLB7jcXI6Dd9LoE5goTpkIUvxDQgUbrJoRtVV3IGY6CGRyQf9yiFLK7CRX 5Et9mrS+KUVQ5oqFQX8/Jk1GZeolV8phgPoX0gcxEGgwh+c0oTKUgZRsu8qylYUbsFlt VvHg== X-Gm-Message-State: APjAAAVP9V8UTWGrc4uJ3nplLUYV0wK/ZGuWQPMvBFXppSS6qv9fHzDz pAWx7a5zTMc+V3DeV4GePgoxMXfkDKhT7w== X-Google-Smtp-Source: APXvYqzfjpvKZYxPTPIXCjTPpehftjtuaKvuvKNoha09Q1hUkqAJsCreJYThWG5H1W9vaMScZZqK6A== X-Received: by 2002:a25:ba0c:: with SMTP id t12mr28684641ybg.70.1558133116318; Fri, 17 May 2019 15:45:16 -0700 (PDT) From: Jan Bobek To: qemu-devel@nongnu.org Date: Fri, 17 May 2019 18:44:45 -0400 Message-Id: <20190517224450.15566-7-jan.bobek@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190517224450.15566-1-jan.bobek@gmail.com> References: <20190517224450.15566-1-jan.bobek@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b41 Subject: [Qemu-devel] [RISU v2 06/11] risu_i386: remove old unused code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Bobek , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The code being removed is a remnant of the past implementation; it has since been replaced by its more powerful, architecture-independent counterpart in reginfo.c. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Jan Bobek Reviewed-by: Richard Henderson --- risu_i386.c | 58 ----------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/risu_i386.c b/risu_i386.c index 06d95e5..9962b8f 100644 --- a/risu_i386.c +++ b/risu_i386.c @@ -16,13 +16,6 @@ #include "risu.h" #include "risu_reginfo_i386.h" =20 -struct reginfo master_ri, apprentice_ri; - -static int insn_is_ud2(uint32_t insn) -{ - return ((insn & 0xffff) =3D=3D 0x0b0f); -} - void advance_pc(void *vuc) { ucontext_t *uc =3D (ucontext_t *) vuc; @@ -57,54 +50,3 @@ uintptr_t get_pc(struct reginfo *ri) { return ri->gregs[REG_E(IP)]; } - -int send_register_info(int sock, void *uc) -{ - struct reginfo ri; - fill_reginfo(&ri, uc); - return send_data_pkt(sock, &ri, sizeof(ri)); -} - -/* Read register info from the socket and compare it with that from the - * ucontext. Return 0 for match, 1 for end-of-test, 2 for mismatch. - * NB: called from a signal handler. - */ -int recv_and_compare_register_info(int sock, void *uc) -{ - int resp; - fill_reginfo(&master_ri, uc); - recv_data_pkt(sock, &apprentice_ri, sizeof(apprentice_ri)); - if (memcmp(&master_ri, &apprentice_ri, sizeof(master_ri)) !=3D 0) { - /* mismatch */ - resp =3D 2; - } else if (insn_is_ud2(master_ri.faulting_insn)) { - /* end of test */ - resp =3D 1; - } else { - /* either successful match or expected undef */ - resp =3D 0; - } - send_response_byte(sock, resp); - return resp; -} - -/* Print a useful report on the status of the last comparison - * done in recv_and_compare_register_info(). This is called on - * exit, so need not restrict itself to signal-safe functions. - * Should return 0 if it was a good match (ie end of test) - * and 1 for a mismatch. - */ -int report_match_status(void) -{ - fprintf(stderr, "match status...\n"); - fprintf(stderr, "master reginfo:\n"); - dump_reginfo(&master_ri); - fprintf(stderr, "apprentice reginfo:\n"); - dump_reginfo(&apprentice_ri); - if (memcmp(&master_ri, &apprentice_ri, sizeof(master_ri)) =3D=3D 0) { - fprintf(stderr, "match!\n"); - return 0; - } - fprintf(stderr, "mismatch!\n"); - return 1; -} --=20 2.20.1