Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: drb@ihatespam.msu.edu (Dennis Boone) Newsgroups: comp.compilers Subject: Re: PR1ME C compiler pointer management Date: Sat, 28 Sep 2019 11:08:02 -0500 Organization: Compilers Central Lines: 27 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-09-016@comp.compilers> References: <19-09-003@comp.compilers> <19-09-004@comp.compilers> <19-09-006@comp.compilers> <19-09-007@comp.compilers> <19-09-009@comp.compilers> <19-09-013@comp.compilers> <19-09-014@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="63783"; mail-complaints-to="abuse@iecc.com" Keywords: C, architecture, history Posted-Date: 28 Sep 2019 21:17:38 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2366 > I see that the PR1ME pointer value included fault and ring bits. > But the register set does not appear to contain special address > registers. There are base registers, and address registers for e.g. field operands used in packed decimal arithmetic or character string edit instructions. But for the most part, effective addresses would be computed from base registers or pointers in memory. > Do you know if casting an integer to a pointer result could create > a value that trapped when the pointer was loaded into a register? > I assume it could trap if an attempt was made to treat the value as > an address. I don't think a trap would occur when the register was loaded. It would happen when you tried to use the register as an address. This would be unusual at best, though: see the above comment about base registers and memory pointers. Off the top, I think you might have to abuse the mapping of some of the user registers to locations 0-7 to get this to happen. I-mode is more general-register-y, so you might be able to use a general register as a pointer there. One version of the architecture manual is here if you're interested. https://sysovl.info/pages/blobs/prime/archhw/Sys%20Arch%20Ref%20Guide%20Rev%2019.2%20DOC3060-192P%201983.pdf De