From owner-freebsd-hackers@freebsd.org Mon Oct 10 23:17:40 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D96C07720 for ; Mon, 10 Oct 2016 23:17:40 +0000 (UTC) (envelope-from romapera15@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64C19825 for ; Mon, 10 Oct 2016 23:17:40 +0000 (UTC) (envelope-from romapera15@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id l131so7439288lfl.2 for ; Mon, 10 Oct 2016 16:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=N3lTfGdWcNESFeJwbtng9JNmoxZsgLOTVGWiWbgoLvc=; b=A931ieyujHG5s0uaNucuT/W5yJJdK6FzcpEiXiwnP6nRHYmsrZQ0vMEQP9lojI0Bjz GNB3g6X7SIxjiz0x+uMGqdgcZeYvneTywOkYNAduTmg1csC4eeiNH/2lR+jQnRFRtDFG dA8rUGQx8ybAUCK2xBJSTqy++TLWUoRNhajg8QhZbbi8nKPg3MMgoHmuYF1k6uiK3nC4 Q4nKICz8ON4FFQL+lUGr4UkpfA2aUNs/gHBhQdFqUnYfGxKejk/W8lUHGv5CB9oSeS+w cOM0nmin4AiAE0/LDPpTzG5EQnQXigcjITEvHNgAm6IDm66lekxIGCoOz74+IqeWAPIz +atg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=N3lTfGdWcNESFeJwbtng9JNmoxZsgLOTVGWiWbgoLvc=; b=erEikPCvClvNbsqSuR8IWEncyl33xtZRjyus/yGGd3kCUJDRJnOQK9npDxcTjjVnlW k3M801chkANqN4KDUuKp52ZFJexBNbj0vna/49CsUOLKkr0Sk5A4IVq1JgZ55g9Vq1T5 EH1edmkUbGsWZXQRGNwgKwRnTBN/HP6JcY6Z/pbljMG+sErmGPD889rGzqenqy/rECzR dLV2/SbnPWT3nXpbkwYIJHpR3BV1UyWMwZBL8OJSk2/hn5G22N+oQB7/tw8wPuS2IUgj 8wXV8IrUSgx0yV09YfuPnU3I7rf4ADszUGerbtMwaTWocbFDzHnCtF7m9nas+AbAfumc 1FUQ== X-Gm-Message-State: AA6/9RkZOCS+nwM/kHRST3AHUtvBxfIh727i/Z2zRyn109CrTolG0gAGtIqxLVA8lP8JxM5ANWCnmpTF9ki2cA== X-Received: by 10.46.1.209 with SMTP id f78mr399142lji.38.1476141457534; Mon, 10 Oct 2016 16:17:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.158.4 with HTTP; Mon, 10 Oct 2016 16:17:36 -0700 (PDT) From: =?UTF-8?Q?fran=C3=A7ai_s?= Date: Mon, 10 Oct 2016 20:17:36 -0300 Message-ID: Subject: What are the codes that contain the marcos that are created directly or the .word directives that are used in their work to make certain things work that cannot work otherwise? To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 23:17:41 -0000 It has come to my attention the following: "The minority of FreeBSD developers either create a macro expands to something like ".word =E2=80=9C or sometimes the .word is just = hard coded inline when there=E2=80=99s only going to be one of them, sometimes e= xpose them both in assembly and in C code, in which case what we do varies a bit to accommodate the different language=E2=80=99s syntax. It is rare, but has happened, that we only expose it to C code. Generally, though, the minority of FreeBSD developers try to add support for the opcodes to gas so that get the constraint testing it does (making sure the opcode is supported at the level you are compiling, making sure it isn=E2=80=99t in a delay slot or violating some other precondition for its = use). People generally don=E2=80=99t write in raw machine opcodes. That is indepe= ndent of FreeBSD. However, a few, specialized people will find the need to do it from time to time. Usually because they are porting FreeBSD to a newer processor that needs newer opcodes to do context switching, optimize interrupt handling, code with a new type of cache coherency, etc. These people look up the assembler in the docs from the vendor and then create the .word workaround to make sure things work. If they have the time, they may add it to our somewhat ancient gas assembler as well." What are the codes that contain the marcos that I described above sometimes when doing specific, low-level coding? What are the codes that contain the marcos that are created directly or the .word directives that are used in their work to make certain things work that cannot work otherwise?