From owner-freebsd-drivers@freebsd.org Sun Oct 9 14:06:42 2016 Return-Path: Delivered-To: freebsd-drivers@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 9515CC076F2 for ; Sun, 9 Oct 2016 14:06:42 +0000 (UTC) (envelope-from romapera15@gmail.com) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (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 1969EA20 for ; Sun, 9 Oct 2016 14:06:42 +0000 (UTC) (envelope-from romapera15@gmail.com) Received: by mail-lf0-x22a.google.com with SMTP id b75so76615359lfg.3 for ; Sun, 09 Oct 2016 07:06:42 -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=V2loyVUVAOOINnq9/S595feh6d81CKQmX7hbyduh6jc=; b=gscCwxdwwq3ycZhjnsxgmHCBU3zpQROVTsZ0dpNG6oI8GYh6CmTFU36tPjiJILljH4 ql6xvZeg/McZRuTVL7THGtswqA4KTQJCDLZ6PqtacP5fozZU1ZGat7pkndMsDInoMvuh i/7djRArsd5rqfDzBs5khAMB5KLQAr88IuV62O4dhR36hbfZRNKn2B7Z+DLDFXTtoIMM qz6zBuNQf8i2XtZ7x0mxaUMChWVtsgml4lRHn+N20M7T5p69HPSiL/x3/PywnBtPgyTb HvF4f7rvL9T7sQ3/2Ez+NMSIbNwk2xjV1FVI+3llvFibw9lMYNaWBt5sf/3p5NbHsMa4 bt6A== 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=V2loyVUVAOOINnq9/S595feh6d81CKQmX7hbyduh6jc=; b=ZUyrDLzEzcLmfIL2pI2udEFqd8ZFbY8N9Y8G0aLDntQoIpwDw0/Wqtl7gnxbOFOo0C jwB/OFTvzUi4JmAQas5n53qU++h1M7kZlj0HgSXn4hGjp+wxg7Jq4+7MV6hQM4wcqwGZ X7Jc7sPZtzcPecfgmmdS9Ifex8UbUPrhg4ydquV2kWyXkLEoGugvwrYNP9NMqAuxP2qz QfwvViVkyaOb7uliTC7fXUGbVRy4L+CS3g39oXxMI68ZSK0nym6zFWyGE8ebS8meLtMj 4eSUszOFDStQmo8WB810JsnWg0K66Rt8qsweY6B0QT1dyipoogbmX++tF/NWjokUwXl+ DOKg== X-Gm-Message-State: AA6/9RmFpEU4PmB1HLMNBGVVBvRnoAgzMDERZbVYJJpLRrwxM92pO2d9siTCiz4/S4h2FnrmVLHZCD+j5fHhVA== X-Received: by 10.25.151.212 with SMTP id z203mr3842090lfd.79.1476021999601; Sun, 09 Oct 2016 07:06:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.158.4 with HTTP; Sun, 9 Oct 2016 07:06:38 -0700 (PDT) From: =?UTF-8?Q?fran=C3=A7ai_s?= Date: Sun, 9 Oct 2016 11:06:38 -0300 Message-ID: Subject: What are the codes that contain the marcos that are created directly or the .word directives? To: freebsd-drivers@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-drivers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 14:06:42 -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." A few, specialized people still will find the need of write in raw machine opcodes from time to time because usually 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 still look up the assembler in the docs from the vendor and then create the .word workaround to make sure things work? If they still have the time, they still may add it to our somewhat ancient gas assembler as well? Some developers of FreeBSD still use the marcos that I described above sometimes when doing specific, low-level coding? A handful of developers of FreeBSD still create the marcos directly or use the .word directives in their work to make certain things work that cannot work otherwise? If yes, 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? If is not possible speak what are all this codes, please, quote good amount of examples.