From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 7937E3870864 for ; Wed, 5 Jun 2024 17:33:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7937E3870864 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7937E3870864 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717608839; cv=none; b=X9STD7hbPjgOjLvj0Ne9uTmm/8Mjgkh5NiqSJLXmzDt35GbzTFaHIMBQo5bLgSgfUTKicArujThIWRYD/gd16f2B49MKMnFV6HZhmS86QL4jubroCmd8s/0U5eFzRjtcWJMysnW815k4+cKAR4fM93+r2EQBRgcH3Bjie35rQOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717608839; c=relaxed/simple; bh=MONor5inXrcqATylgtULTt6vh4DoFBo8pifpPpz1cOA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WeNmNBxCXtG9AtAUbT7aFNSY7obvb82Kvz4Zn8RhYuJRkjQ2WWefm0JnqoW/2S+Fpvm8rcHCZHldTZlryzbBO+MgU4QEPnYypbsuufXlYb4Lg8HZU0wwPiISLslOon9wHe/RRw4XIWnhWz/ad+goPc4d/lNTgPoZkrgUlI1A+lw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717608837; 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=I2g3uc1xmx5wK3hzwc8h1AdxblPS3rvy41GwzOsHQ80=; b=OJqskS1kJkWWJpzcx+4Da1UeqCMYmgSY0mDpqkQeP8gyZMBPm/noFuCx/BbzV0uZnaffZg JQX15DTFCfcnDDvcSSc5ULArbi2LbrvPiIeRNGBezbDnY/fK447NfAbqk6sV+HWOgzIQJq mDo1F/hX5ACYZOhtYyymI+lpF/wllgw= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-361-4rpMdBVbNrWbpAGxswvT5g-1; Wed, 05 Jun 2024 13:33:55 -0400 X-MC-Unique: 4rpMdBVbNrWbpAGxswvT5g-1 Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-6f6c8bac16dso6323764a34.2 for ; Wed, 05 Jun 2024 10:33:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717608834; x=1718213634; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I2g3uc1xmx5wK3hzwc8h1AdxblPS3rvy41GwzOsHQ80=; b=QR+TqMZlO1O5fju5NjCxc0iGFytgJtOMqRIj4u9DLjlHhokFRJO6qobeV064RaxkgM LNrdMAM/b2/7JotXfzb221ZGeX7r3INXuuFt9ut79kfZwRg3C/kMpw3KbJa9MnPdN66A uj/VDPAsIOtw6bsUmeL7e43E+5jwvjvLTpGr1f+qz+a8u5cRscOOmA/77vhAjg5nuHao 4uuMoMagwJp3j5IJ4g11QLfrf6a6JgfQWh+fRunuMZGjOlNy7dQOnRUBST+Uq6Kpakye ud8ffAJYvhgqOu7Jy5ou8CpZ6X7W1kJ0w4QJJOk+v18HLw+xdV9D9SdzEKrNmqPc1/19 Cveg== X-Gm-Message-State: AOJu0YzbFzIh4+dyYEjG7a1uyqOl3swfymgM/W9Yi5c0WC1cuvNLwFfF 42DxVAoAck248lBwI10Mu3pG9AgAMZIoBEqjqH4ckBQ2Sa1SUxS9JtjfYPnZZcD6QSQYPJGIkN0 metE3E0uZb2/hxncJ9JMfKxtX+9ienn/V5JQDIiZERMhm1TaiLz5A6UyYsWl5O7BVU6A= X-Received: by 2002:a05:6870:2007:b0:254:421b:3dc5 with SMTP id 586e51a60fabf-254421b682fmr150954fac.46.1717608834479; Wed, 05 Jun 2024 10:33:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnruK72H7qS3wIjy2Kmg38HLYBmZYXxXbT8C9zlPlaIrkCOOAYxRC9Z6pKhV8P8CqpWxIDOA== X-Received: by 2002:a05:6870:2007:b0:254:421b:3dc5 with SMTP id 586e51a60fabf-254421b682fmr150925fac.46.1717608833947; Wed, 05 Jun 2024 10:33:53 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:92c5::1001? ([2804:14d:8084:92c5::1001]) by smtp.gmail.com with ESMTPSA id af79cd13be357-794f901a818sm420800885a.80.2024.06.05.10.33.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 10:33:53 -0700 (PDT) Message-ID: <4e69730a-faba-4c05-b68d-264942d7d1e8@redhat.com> Date: Wed, 5 Jun 2024 14:33:51 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] gdb: Start supporting AVX instruction To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240521202800.2865871-1-blarsen@redhat.com> <20240521202800.2865871-2-blarsen@redhat.com> <87r0dbnzdb.fsf@tromey.com> From: Guinevere Larsen In-Reply-To: <87r0dbnzdb.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/5/24 13:11, Tom Tromey wrote: >>>>>> "Guinevere" == Guinevere Larsen writes: > Guinevere> + /* These are used by VEX and XOP prefixes. */ > Guinevere> + uint8_t map_select; > Guinevere> + uint8_t vvvv; > Guinevere> + uint8_t pp; > Guinevere> + uint8_t l; > > Are these the names used by the ISA? Since if not they are pretty ugly. Yes, these are the ISA names for those bits. I would use more descriptive names instead of ISA ones, but I have no idea what they are supposed to mean. > > Guinevere> +static bool > Guinevere> +i386_record_vex (struct i386_record_s *ir, uint8_t rex_w, uint8_t rex_r, > Guinevere> + int opcode, struct gdbarch *gdbarch) > Guinevere> +{ > Guinevere> + switch (opcode) > Guinevere> + { > Guinevere> + default: > Guinevere> + gdb_printf (gdb_stderr, > Guinevere> + _("Process record does not support VEX instruction 0x%02x " > Guinevere> + "at address %s.\n"), > Guinevere> + (unsigned int) (opcode), > Guinevere> + paddress (gdbarch, ir->orig_addr)); > Guinevere> + return -1; > > This should use true or false, not -1, because the function returns > bool. nice catch! the function should be returning int instead. > > I wouldn't be surprised to get some kind of dead code warning here, > since the switch only has a single branch. no warnings in my system... but that is possible, I guess. Do you think it would be better to merge this commit with the following one? -- Cheers, Guinevere Larsen She/Her/Hers > > Tom >