Deutsch English Français Italiano |
<2024Oct12.104557@mips.complang.tuwien.ac.at> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Re: is Vax addressing sane today Date: Sat, 12 Oct 2024 08:45:57 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 47 Message-ID: <2024Oct12.104557@mips.complang.tuwien.ac.at> References: <vbd6b9$g147$1@dont-email.me> <09ce1622b872f0b0fa944e868a8c97be@www.novabbs.org> <vbnisc$2hb59$1@dont-email.me> <2024Sep10.094353@mips.complang.tuwien.ac.at> <vckf9d$178f2$1@dont-email.me> <O2DHO.184073$kxD8.113118@fx11.iad> <e290e18a59651f93e4b46f4839713b1c@www.novabbs.org> <dfXIO.169387$1m96.107616@fx15.iad> Injection-Date: Sat, 12 Oct 2024 11:12:29 +0200 (CEST) Injection-Info: dont-email.me; posting-host="29d5d06e203f002c66a9502ffb11d396"; logging-data="109941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HtZgECMl7/UmasXUUnFo/" Cancel-Lock: sha1:WZvTBdkvlq3h3gPdgyWIcyhKykk= X-newsreader: xrn 10.11 Bytes: 3497 EricP <ThatWouldBeTelling@thevillage.com> writes: >But then, risc processors mostly, started using exceptions for housekeeping >- SPARC for register window sliding, Alpha for byte, word and misaligned >memory access On Alpha the assembler expands byte, word and unaligned access mnemonics into sequences of machine instructions; if you compile for BWX extensions, byte and word mnemonics get compiled into BWX instructions. If the machine does not have the BWX extensions and it encounters a BWX instruction, the result is an illegal instruction signal at least on Linux. This terminates your typical program, so it's not at all frequent. Concerning unaligned accesses, if you use a load or store that requires alignment, Digital OSF/1 (and the later versions with various names) by default produced a signal rather than fixing it up, so again programs are typically terminated, and the exception is not at all frequent. There is a system call and a tool (uac) that allows telling the OS to fix up unaligned accesses, but it played no role in my experience while I was still using Digital OSF/1 (including it's successors). On Linux the default behaviour was to fix up the unaligned accesses and to log that in the system log. There were a few such messages in the log per day, so that obviously was not a frequent occurence, either. I wrote a program that allowed me to change the behaviour <https://www.complang.tuwien.ac.at/anton/uace.c>, mainly because I wanted to get a signal when an unaligned access happens. As for the unaligned-access mnemonics, these were obviously barely used: I found that gas generates wrong code for ustq several years after Alpha was introduced, so obviously no software running under Linux has used this mnemonic. >The solution for Alpha was to add back the byte and word instructions, >and add misaligned access support to all memory ops. Alpha added BWX instructions, but not because it had used trapping to emulate them earlier; Old or portable binaries continued to use instruction sequences. Alpha traps when you do, e.g., an unaligned ldq in all Alpha implementations I have had contact with (up to a 800MHz 21264B). - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>