From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 3 Feb 2016 07:24:25 -0800 To: 9fans@9fans.net Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] FP register usage in Plan9 assembler Topicbox-Message-UUID: 82204f90-ead9-11e9-9d60-3106f5b1d025 On Tue Feb 2 08:43:47 PST 2016, sstallion@gmail.com wrote: > Hi Giacomo, > > It's probably worth mentioning that learning assembly using the Plan 9 > assembler is probably a bad idea. *a makes heavy use of pseudo > instructions and registers and unless you're well versed in its > quirks, can be very confusing when looking at more common assembly > dialects. Many instructions are directly encoded in the instruction > stream, largely due to the fact that it is more difficult than it > should be to extend the assembler as architectures evolve*. More > mechanically, Plan 9 makes use of a loader, which causes a number of > operations you would expect to be present in the assembler to be > deferred until later. hi, steve! i've found the plan 9 assemblers to be straight-forward enough. i love the consistency from one architecture to another. i like the fact that there are so few meta-directives, and i do like the fact that the linker will do the obvious rearrangments of plan 9 assembly, including automatic delay slot filling, and other such fiddly bits. obviously, this is just an opinion, so ymmv. i think this is off the original point, but as to modifying the assmbler. to add a new instruction, the linker, assembler and libmach need modification. typically this is a matter of adding a line to each one for assembly, linking, and disassembly, respecively. it's worth looking at the addition of the ymm, and then zmm registers and those patterns to 6[al] and libmach. this is an example of adding a new instruction encoding to an existing arch. > * The diff to update support for ARMv7-A to 5a came in at over 2800 > lines; this was to add a handful of instructions. do you perhaps mean the linker? the pi kernels, which supports v6 (original) and v7 (pi2) rely on small asm files for arch-specific functions. i think you provided some explaination of why this approach would not work for v5, but unfortunately, i don't remember it. - erik