From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AB09C433E2 for ; Thu, 16 Jul 2020 12:22:12 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 541BC2065F for ; Thu, 16 Jul 2020 12:22:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HfO0+kDc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 541BC2065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jw2t0-0007s5-Km; Thu, 16 Jul 2020 08:21:14 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1jw2sx-0007rt-5P for Kernelnewbies@kernelnewbies.org; Thu, 16 Jul 2020 08:21:11 -0400 Received: by mail-qk1-x72e.google.com with SMTP id z63so5245195qkb.8 for ; Thu, 16 Jul 2020 05:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Gd30hB9ONZ1EHh+v1jAVLZUxLXl5sPs11K5o+R6gpWA=; b=HfO0+kDcdCUYhJzWEv6QahN6v9iQ4vUrKmRBDwJFfpSWz0o13N7VbMs3PLXw9uWutI dlTRtAhZngxcsWt+HL1Gt8JFP+K4iuirJ3ZFwjT2FjV9cAMTl2Hr9ik3lLFhgMw7kwUc E0NyrnIYEdfKF3QCikCZYbTEmo6GPH48WrbbIaMgy/X6iQKJRSJq0vqpOephf1+l+5md ar+Y64EtsrgsG1cXVSUgEFxnOzKcc6PKa1CQ3TGMpH/kOi5BXDoLtT1HhcWXdSNIuAXd dEInNrl3u/F6wwpXNrxn6qdftlAJW5jsUk53BnRpjy0+kghJkYUjmWG86NJB06stZMR5 5tNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Gd30hB9ONZ1EHh+v1jAVLZUxLXl5sPs11K5o+R6gpWA=; b=m6CFF7BwQgvkbbimN+G8tu2tFLTpQKPYMhYjY79Z7u47sh9MIB5DrmbwbR5IihMa/c r8lI13fvGD8lxxgv2hw3F3dN/evONeEFB4qda8SMHNwKf6UV/PDP0T3lU1o4/m8Jccne 7/921UJmwmya8U8rpkM1EQfJw2iIS0MEyFarBYDDvvCYsqRwHx3JK94Phkb2xSsspu/5 C8p+1gHg+xiIIrxDtaAf48gxncx5xL/3WlHlrbbfgvuexqZJ5hSh/eeXrRQ28rdg70PF lPMHKQyxatjtitY10VSjCYvJBPJG90+cSYZGC2PoJovUDhU6VPesw3ym77CHiYBRysON AmXA== X-Gm-Message-State: AOAM531VDOdF2IhNGp2TKOx0vaNaPjkzMHmB3wuFiIxxkbfhW3TFLrOi wZ8KxoatkYDRn20PxrjPVqyi2dgF41ZYC0DDRwgLVCVNfHTyWg== X-Google-Smtp-Source: ABdhPJwDpAB5cZfmJGbqZbL4Hjg38fya23CJ6JI6RYd00NbqKfAoxhERkgk/6tMbatVKpvfD35YKdl2TnM/nwq6LcPM= X-Received: by 2002:a37:b141:: with SMTP id a62mr3311956qkf.201.1594902070012; Thu, 16 Jul 2020 05:21:10 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?5a2Z5LiW6b6ZIHN1bnNoaWxvbmc=?= Date: Thu, 16 Jul 2020 20:20:36 +0800 Message-ID: Subject: How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))? To: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Hi, list Here is the code snippet: #define ipipe_read_tsc(t) \ __asm__ __volatile__("rdtsc" : "=A"(t)) I found that the rdtsc (Read Time-Stamp Counter) instruction is used to determine how many CPU ticks took place since the processor was reset. But what does "=A"(t) mean? Thank you for your attention to this matter. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies